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) {}
73 bool IsGslConstruction =
false);
75 template <
typename Destination,
typename Source>
76 void flowOrigin(
const Destination &D,
const Source &S) {
77 flow(getOriginsList(D), getOriginsList(S),
false);
80 template <
typename Destination,
typename Source>
81 void killAndFlowOrigin(
const Destination &D,
const Source &S) {
82 flow(getOriginsList(D), getOriginsList(S),
true);
109 llvm::DenseMap<const DeclRefExpr *, UseFact *> UseFacts;
118 llvm::DenseSet<const ValueDecl *> MovedDecls;
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 the point where the lifetime of an automatic object ends.
Represents C++ object destructor implicitly generated at the end of full expression for temporary obj...
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]).
ConditionalOperator - The ?
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.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
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 VisitMemberExpr(const MemberExpr *ME)
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 VisitConditionalOperator(const ConditionalOperator *CO)
void VisitCXXMemberCallExpr(const CXXMemberCallExpr *MCE)
A list of origins representing levels of indirection for pointer-like types.