|
clang 22.0.0git
|
A placeholder loan held by a function parameter, representing a borrow from the caller's scope. More...
#include "clang/Analysis/Analyses/LifetimeSafety/Loans.h"
Public Member Functions | |
| PlaceholderLoan (LoanID ID, const ParmVarDecl *PVD) | |
| const ParmVarDecl * | getParmVarDecl () const |
| void | dump (llvm::raw_ostream &OS) const override |
| Public Member Functions inherited from clang::lifetimes::internal::Loan | |
| Loan (Kind K, LoanID ID) | |
| virtual | ~Loan ()=default |
| Kind | getKind () const |
| LoanID | getID () const |
Static Public Member Functions | |
| static bool | classof (const Loan *L) |
Additional Inherited Members | |
| Public Types inherited from clang::lifetimes::internal::Loan | |
| enum class | Kind : uint8_t { Path , Placeholder } |
| TODO: Represent opaque loans. More... | |
A placeholder loan held by a function parameter, representing a borrow from the caller's scope.
Created at function entry for each pointer or reference parameter with an origin. Unlike PathLoan, placeholder loans:
When a placeholder loan escapes the function (e.g., via return), it indicates the parameter should be marked [[clang::lifetimebound]], enabling lifetime annotation suggestions.
|
inline |
Definition at line 102 of file Loans.h.
References clang::lifetimes::internal::Loan::Loan(), and clang::lifetimes::internal::Loan::Placeholder.
Definition at line 109 of file Loans.h.
References clang::lifetimes::internal::Loan::getKind(), clang::lifetimes::internal::Loan::Loan(), and clang::lifetimes::internal::Loan::Placeholder.
|
overridevirtual |
Implements clang::lifetimes::internal::Loan.
Definition at line 18 of file Loans.cpp.
References clang::lifetimes::internal::Loan::getID().
|
inline |