|
clang 23.0.0git
|
Represents the storage location being borrowed, e.g., a specific stack variable or a field within it: var.field. More...
#include "clang/Analysis/Analyses/LifetimeSafety/Loans.h"
Public Types | |
| enum class | Kind : uint8_t { ValueDecl , MaterializeTemporary , PlaceholderParam , PlaceholderThis , NewAllocation } |
Public Member Functions | |
| AccessPath (const clang::ValueDecl *D) | |
| AccessPath (const clang::MaterializeTemporaryExpr *MTE) | |
| AccessPath (const CXXNewExpr *New) | |
| AccessPath (const AccessPath &Other) | |
| AccessPath & | operator= (const AccessPath &)=delete |
| Kind | getKind () const |
| const clang::ValueDecl * | getAsValueDecl () const |
| const clang::MaterializeTemporaryExpr * | getAsMaterializeTemporaryExpr () const |
| const ParmVarDecl * | getAsPlaceholderParam () const |
| const CXXMethodDecl * | getAsPlaceholderThis () const |
| const CXXNewExpr * | getAsNewAllocation () const |
| bool | operator== (const AccessPath &RHS) const |
| bool | operator!= (const AccessPath &RHS) const |
| void | dump (llvm::raw_ostream &OS) const |
Static Public Member Functions | |
| static AccessPath | Placeholder (const ParmVarDecl *PVD) |
| static AccessPath | Placeholder (const CXXMethodDecl *MD) |
Represents the storage location being borrowed, e.g., a specific stack variable or a field within it: var.field.
Placeholder paths never expire within the function scope, as they represent storage from the caller's scope.
TODO: Model access paths of other types, e.g. field, array subscript, heap allocation not through new, and globals.
|
strong |
|
inline |
Definition at line 60 of file Loans.h.
References ValueDecl.
Referenced by AccessPath(), operator!=(), operator=(), operator==(), Placeholder(), and Placeholder().
|
inline |
Definition at line 61 of file Loans.h.
References MaterializeTemporary.
|
inline |
Definition at line 63 of file Loans.h.
References New, and NewAllocation.
|
inline |
Definition at line 70 of file Loans.h.
References AccessPath(), and clang::Other.
| void clang::lifetimes::internal::AccessPath::dump | ( | llvm::raw_ostream & | OS | ) | const |
Definition at line 13 of file Loans.cpp.
References getAsMaterializeTemporaryExpr(), getAsNewAllocation(), getAsPlaceholderParam(), getAsValueDecl(), MaterializeTemporary, NewAllocation, PlaceholderParam, PlaceholderThis, and ValueDecl.
Referenced by clang::lifetimes::internal::ExpireFact::dump().
|
inline |
Definition at line 80 of file Loans.h.
References clang::cast(), and MaterializeTemporary.
Referenced by dump().
|
inline |
Definition at line 96 of file Loans.h.
References clang::cast(), and NewAllocation.
Referenced by dump().
|
inline |
Definition at line 86 of file Loans.h.
References clang::cast(), and PlaceholderParam.
Referenced by dump().
|
inline |
Definition at line 91 of file Loans.h.
References clang::cast(), and PlaceholderThis.
|
inline |
Definition at line 75 of file Loans.h.
References clang::cast(), and ValueDecl.
Referenced by dump().
|
inline |
|
inline |
Definition at line 105 of file Loans.h.
References AccessPath().
|
delete |
References AccessPath().
|
inline |
Definition at line 102 of file Loans.h.
References AccessPath().
|
inlinestatic |
Definition at line 67 of file Loans.h.
References AccessPath(), and PlaceholderThis.
|
inlinestatic |
Definition at line 64 of file Loans.h.
References AccessPath(), and PlaceholderParam.