|
clang 22.0.0git
|
Manages the creation, storage, and retrieval of origins for pointer-like variables and expressions. More...
#include "clang/Analysis/Analyses/LifetimeSafety/Origins.h"
Public Member Functions | |
| OriginManager (ASTContext &AST) | |
| OriginList * | getOrCreateList (const ValueDecl *D) |
| Gets or creates the OriginList for a given ValueDecl. | |
| OriginList * | getOrCreateList (const Expr *E) |
| Gets or creates the OriginList for a given Expr. | |
| const Origin & | getOrigin (OriginID ID) const |
| llvm::ArrayRef< Origin > | getOrigins () const |
| unsigned | getNumOrigins () const |
| void | dump (OriginID OID, llvm::raw_ostream &OS) const |
| void | collectMissingOrigins (Stmt &FunctionBody, LifetimeSafetyStats &LSStats) |
| Collects statistics about expressions that lack associated origins. | |
Manages the creation, storage, and retrieval of origins for pointer-like variables and expressions.
|
inlineexplicit |
| void clang::lifetimes::internal::OriginManager::collectMissingOrigins | ( | Stmt & | FunctionBody, |
| LifetimeSafetyStats & | LSStats ) |
Collects statistics about expressions that lack associated origins.
Definition at line 192 of file Origins.cpp.
Referenced by clang::lifetimes::internal::collectLifetimeStats().
| void clang::lifetimes::internal::OriginManager::dump | ( | OriginID | OID, |
| llvm::raw_ostream & | OS ) const |
Definition at line 168 of file Origins.cpp.
References clang::QualType::getAsString(), clang::lifetimes::internal::Origin::getDecl(), clang::lifetimes::internal::Origin::getExpr(), getOrigin(), clang::Stmt::getStmtClassName(), and clang::lifetimes::internal::Origin::Ty.
Referenced by clang::lifetimes::internal::IssueFact::dump(), clang::lifetimes::internal::OriginEscapesFact::dump(), clang::lifetimes::internal::OriginFlowFact::dump(), and clang::lifetimes::internal::UseFact::dump().
|
inline |
Definition at line 151 of file Origins.h.
Referenced by clang::lifetimes::internal::computePersistentOrigins().
| OriginList * clang::lifetimes::internal::OriginManager::getOrCreateList | ( | const Expr * | E | ) |
Gets or creates the OriginList for a given Expr.
Creates a list based on the expression's type and value category:
Definition at line 124 of file Origins.cpp.
References clang::lifetimes::internal::doesDeclHaveStorage(), getOrCreateList(), clang::Expr::getType(), clang::lifetimes::internal::hasOrigins(), clang::Expr::IgnoreParens(), clang::Expr::isGLValue(), clang::Type::isReferenceType(), and clang::lifetimes::internal::OriginList::setInnerOriginList().
| OriginList * clang::lifetimes::internal::OriginManager::getOrCreateList | ( | const ValueDecl * | D | ) |
Gets or creates the OriginList for a given ValueDecl.
Creates a list structure mirroring the levels of indirection in the declaration's type (e.g., int** p creates list of size 2).
Definition at line 115 of file Origins.cpp.
References clang::ValueDecl::getType(), and clang::lifetimes::internal::hasOrigins().
Referenced by getOrCreateList().
Definition at line 187 of file Origins.cpp.
Referenced by dump().
|
inline |