clang 22.0.0git
|
An Origin is a symbolic identifier that represents the set of possible loans a pointer-like object could hold at any given time. More...
Public Member Functions | |
Origin (OriginID ID, const clang::ValueDecl *D) | |
Origin (OriginID ID, const clang::Expr *E) | |
const clang::ValueDecl * | getDecl () const |
const clang::Expr * | getExpr () const |
Public Attributes | |
OriginID | ID |
llvm::PointerUnion< const clang::ValueDecl *, const clang::Expr * > | Ptr |
A pointer to the AST node that this origin represents. | |
An Origin is a symbolic identifier that represents the set of possible loans a pointer-like object could hold at any given time.
TODO: Enhance the origin model to handle complex types, pointer indirection and reborrowing. The plan is to move from a single origin per variable/expression to a "list of origins" governed by the Type. For example, the type 'int**' would have two origins. See discussion: https://github.com/llvm/llvm-project/pull/142313/commits/0cd187b01e61b200d92ca0b640789c1586075142#r2137644238
Definition at line 63 of file LifetimeSafety.cpp.
|
inline |
Definition at line 70 of file LifetimeSafety.cpp.
|
inline |
Definition at line 71 of file LifetimeSafety.cpp.
|
inline |
Definition at line 73 of file LifetimeSafety.cpp.
References Ptr.
Referenced by clang::lifetimes::internal::OriginManager::dump().
|
inline |
Definition at line 76 of file LifetimeSafety.cpp.
References Ptr.
Referenced by clang::lifetimes::internal::OriginManager::dump().
OriginID clang::lifetimes::internal::Origin::ID |
Definition at line 64 of file LifetimeSafety.cpp.
llvm::PointerUnion<const clang::ValueDecl *, const clang::Expr *> clang::lifetimes::internal::Origin::Ptr |
A pointer to the AST node that this origin represents.
This union distinguishes between origins from declarations (variables or parameters) and origins from expressions.
Definition at line 68 of file LifetimeSafety.cpp.