15#ifndef LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_FACTSGENERATOR_H
16#define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_FACTSGENERATOR_H
23#include "llvm/ADT/SmallVector.h"
32 : FactMgr(FactMgr), AC(AC) {}
62 bool IsGslConstruction =
false);
64 template <
typename Destination,
typename Source>
65 void flowOrigin(
const Destination &D,
const Source &S) {
69 DestOID, SrcOID,
false));
72 template <
typename Destination,
typename Source>
73 void killAndFlowOrigin(
const Destination &D,
const Source &S) {
76 CurrentBlockFacts.push_back(
77 FactMgr.
createFact<OriginFlowFact>(DestOID, SrcOID,
true));
101 llvm::DenseMap<const DeclRefExpr *, UseFact *> UseFacts;
This file defines AnalysisDeclContext, a class that manages the analysis context data for context sen...
static bool handleAssignment(EvalInfo &Info, const Expr *E, const LValue &LVal, QualType LValType, APValue &Val)
Perform an assignment of Val to LVal. Takes ownership of Val.
AnalysisDeclContext contains the context data for the function, method or block under analysis.
A builtin binary operation expression such as "x + y" or "x <= y".
Represents C++ object destructor implicitly generated for automatic object or temporary bound to cons...
Represents a call to a C++ constructor.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Represents a call to a member function that may be written either with member call syntax (e....
The null pointer literal (C++11 [lex.nullptr])
A call to an overloaded operator written using operator syntax.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
A reference to a declared variable, function, enum, etc.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
This represents one expression.
Represents a function declaration or definition.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Describes an C or C++ initializer list.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
FactType * createFact(Args &&...args)
OriginManager & getOriginMgr()
void VisitDeclRefExpr(const DeclRefExpr *DRE)
void VisitBinaryOperator(const BinaryOperator *BO)
void VisitCallExpr(const CallExpr *CE)
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE)
void VisitReturnStmt(const ReturnStmt *RS)
FactsGenerator(FactManager &FactMgr, AnalysisDeclContext &AC)
void VisitCXXConstructExpr(const CXXConstructExpr *CCE)
void VisitImplicitCastExpr(const ImplicitCastExpr *ICE)
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *FCE)
void VisitInitListExpr(const InitListExpr *ILE)
void VisitCXXNullPtrLiteralExpr(const CXXNullPtrLiteralExpr *N)
void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *OCE)
void VisitUnaryOperator(const UnaryOperator *UO)
void VisitDeclStmt(const DeclStmt *DS)
void VisitCXXMemberCallExpr(const CXXMemberCallExpr *MCE)
OriginID getOrCreate(const Expr &E)
OriginID get(const Expr &E)
utils::ID< struct OriginTag > OriginID