14#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_ORIGINS_H
15#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_ORIGINS_H
26 return OS << ID.Value;
42 llvm::PointerUnion<const clang::ValueDecl *, const clang::Expr *>
Ptr;
80 OriginID getNextOriginID() {
return NextOriginID++; }
86 llvm::DenseMap<const clang::ValueDecl *, OriginID> DeclToOriginID;
87 llvm::DenseMap<const clang::Expr *, OriginID> ExprToOriginID;
This represents one expression.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
const Origin & getOrigin(OriginID ID) const
OriginID getOrCreate(const Expr &E)
llvm::ArrayRef< Origin > getOrigins() const
void dump(OriginID OID, llvm::raw_ostream &OS) const
Origin & addOrigin(OriginID ID, const clang::ValueDecl &D)
OriginID get(const Expr &E)
utils::ID< struct OriginTag > OriginID
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, LoanID ID)
An Origin is a symbolic identifier that represents the set of possible loans a pointer-like object co...
Origin(OriginID ID, const clang::Expr *E)
const clang::Expr * getExpr() const
const clang::ValueDecl * getDecl() const
llvm::PointerUnion< const clang::ValueDecl *, const clang::Expr * > Ptr
A pointer to the AST node that this origin represents.
Origin(OriginID ID, const clang::ValueDecl *D)
A generic, type-safe wrapper for an ID, distinguished by its Tag type.