|
clang 23.0.0git
|
A placeholder loan held by a function parameter or an implicit 'this' object, 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) | |
| PlaceholderLoan (LoanID ID, const CXXMethodDecl *MD) | |
| const ParmVarDecl * | getParmVarDecl () const |
| const CXXMethodDecl * | getMethodDecl () 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 or an implicit 'this' object, representing a borrow from the caller's scope.
Created at function entry for each pointer or reference parameter or for the implicit 'this' parameter of instance methods, with an origin. Unlike PathLoan, placeholder loans:
When a placeholder loan escapes the function (e.g., via return), it indicates the parameter or method should be marked [[clang::lifetimebound]], enabling lifetime annotation suggestions.
|
inline |
Definition at line 124 of file Loans.h.
References clang::lifetimes::internal::Loan::Loan(), and clang::lifetimes::internal::Loan::Placeholder.
|
inline |
Definition at line 127 of file Loans.h.
References clang::lifetimes::internal::Loan::Loan(), and clang::lifetimes::internal::Loan::Placeholder.
Definition at line 140 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 26 of file Loans.cpp.
References clang::lifetimes::internal::Loan::getID().
|
inline |
|
inline |