clang
7.0.0
|
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
Classes | |
struct | EvalCallOptions |
Hints for figuring out of a call should be inlined during evalCall(). More... | |
Public Types | |
enum | InliningModes { Inline_Regular = 0, Inline_Minimal = 0x1 } |
The modes of inlining, which override the default analysis-wide settings. More... | |
Public Member Functions | |
ExprEngine (cross_tu::CrossTranslationUnitContext &CTU, AnalysisManager &mgr, bool gcEnabled, SetOfConstDecls *VisitedCalleesIn, FunctionSummariesTy *FS, InliningModes HowToInlineIn) | |
~ExprEngine () override | |
bool | ExecuteWorkList (const LocationContext *L, unsigned Steps=150000) |
Returns true if there is still simulation state on the worklist. More... | |
bool | ExecuteWorkListWithInitialState (const LocationContext *L, unsigned Steps, ProgramStateRef InitState, ExplodedNodeSet &Dst) |
Execute the work list with an initial state. More... | |
ASTContext & | getContext () const |
getContext - Return the ASTContext associated with this analysis. More... | |
AnalysisManager & | getAnalysisManager () override |
CheckerManager & | getCheckerManager () const |
SValBuilder & | getSValBuilder () |
BugReporter & | getBugReporter () |
cross_tu::CrossTranslationUnitContext * | getCrossTranslationUnitContext () override |
const NodeBuilderContext & | getBuilderContext () |
bool | isObjCGCEnabled () |
const Stmt * | getStmt () const |
void | GenerateAutoTransition (ExplodedNode *N) |
void | enqueueEndOfPath (ExplodedNodeSet &S) |
void | GenerateCallExitNode (ExplodedNode *N) |
void | ViewGraph (bool trim=false) |
Visualize the ExplodedGraph created by executing the simulation. More... | |
void | ViewGraph (ArrayRef< const ExplodedNode *> Nodes) |
Visualize a trimmed ExplodedGraph that only contains paths to the given nodes. More... | |
ProgramStateRef | getInitialState (const LocationContext *InitLoc) override |
getInitialState - Return the initial state used for the root vertex in the ExplodedGraph. More... | |
ExplodedGraph & | getGraph () |
const ExplodedGraph & | getGraph () const |
void | removeDead (ExplodedNode *Node, ExplodedNodeSet &Out, const Stmt *ReferenceStmt, const LocationContext *LC, const Stmt *DiagnosticStmt=nullptr, ProgramPoint::Kind K=ProgramPoint::PreStmtPurgeDeadSymbolsKind) |
Run the analyzer's garbage collection - remove dead symbols and bindings from the state. More... | |
void | processCFGElement (const CFGElement E, ExplodedNode *Pred, unsigned StmtIdx, NodeBuilderContext *Ctx) override |
processCFGElement - Called by CoreEngine. More... | |
void | ProcessStmt (const Stmt *S, ExplodedNode *Pred) |
void | ProcessLoopExit (const Stmt *S, ExplodedNode *Pred) |
void | ProcessInitializer (const CFGInitializer I, ExplodedNode *Pred) |
void | ProcessImplicitDtor (const CFGImplicitDtor D, ExplodedNode *Pred) |
void | ProcessNewAllocator (const CXXNewExpr *NE, ExplodedNode *Pred) |
void | ProcessAutomaticObjDtor (const CFGAutomaticObjDtor D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | ProcessDeleteDtor (const CFGDeleteDtor D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | ProcessBaseDtor (const CFGBaseDtor D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | ProcessMemberDtor (const CFGMemberDtor D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | ProcessTemporaryDtor (const CFGTemporaryDtor D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | processCFGBlockEntrance (const BlockEdge &L, NodeBuilderWithSinks &nodeBuilder, ExplodedNode *Pred) override |
Called by CoreEngine when processing the entrance of a CFGBlock. More... | |
void | processBranch (const Stmt *Condition, const Stmt *Term, NodeBuilderContext &BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF) override |
ProcessBranch - Called by CoreEngine. More... | |
void | processCleanupTemporaryBranch (const CXXBindTemporaryExpr *BTE, NodeBuilderContext &BldCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF) override |
Called by CoreEngine. More... | |
void | processStaticInitializer (const DeclStmt *DS, NodeBuilderContext &BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF) override |
Called by CoreEngine. More... | |
void | processIndirectGoto (IndirectGotoNodeBuilder &builder) override |
processIndirectGoto - Called by CoreEngine. More... | |
void | processSwitch (SwitchNodeBuilder &builder) override |
ProcessSwitch - Called by CoreEngine. More... | |
void | processBeginOfFunction (NodeBuilderContext &BC, ExplodedNode *Pred, ExplodedNodeSet &Dst, const BlockEdge &L) override |
Called by CoreEngine. More... | |
void | processEndOfFunction (NodeBuilderContext &BC, ExplodedNode *Pred, const ReturnStmt *RS=nullptr) override |
Called by CoreEngine. More... | |
void | removeDeadOnEndOfFunction (NodeBuilderContext &BC, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Remove dead bindings/symbols before exiting a function. More... | |
void | processCallEnter (NodeBuilderContext &BC, CallEnter CE, ExplodedNode *Pred) override |
Generate the entry node of the callee. More... | |
void | processCallExit (ExplodedNode *Pred) override |
Generate the sequence of nodes that simulate the call exit and the post visit for CallExpr. More... | |
void | processEndWorklist (bool hasWorkRemaining) override |
Called by CoreEngine when the analysis worklist has terminated. More... | |
ProgramStateRef | processAssume (ProgramStateRef state, SVal cond, bool assumption) override |
evalAssume - Callback function invoked by the ConstraintManager when making assumptions about state values. More... | |
ProgramStateRef | processRegionChanges (ProgramStateRef state, const InvalidatedSymbols *invalidated, ArrayRef< const MemRegion *> ExplicitRegions, ArrayRef< const MemRegion *> Regions, const LocationContext *LCtx, const CallEvent *Call) override |
processRegionChanges - Called by ProgramStateManager whenever a change is made to the store. More... | |
void | printState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep, const LocationContext *LCtx=nullptr) override |
printState - Called by ProgramStateManager to print checker-specific data. More... | |
ProgramStateManager & | getStateManager () override |
StoreManager & | getStoreManager () |
ConstraintManager & | getConstraintManager () |
BasicValueFactory & | getBasicVals () |
SymbolManager & | getSymbolManager () |
const SymbolManager & | getSymbolManager () const |
bool | wasBlocksExhausted () const |
bool | hasEmptyWorkList () const |
bool | hasWorkRemaining () const |
const CoreEngine & | getCoreEngine () const |
void | Visit (const Stmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Visit - Transfer function logic for all statements. More... | |
void | VisitArraySubscriptExpr (const ArraySubscriptExpr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitArraySubscriptExpr - Transfer function for array accesses. More... | |
void | VisitGCCAsmStmt (const GCCAsmStmt *A, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitGCCAsmStmt - Transfer function logic for inline asm. More... | |
void | VisitMSAsmStmt (const MSAsmStmt *A, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitMSAsmStmt - Transfer function logic for MS inline asm. More... | |
void | VisitBlockExpr (const BlockExpr *BE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitBlockExpr - Transfer function logic for BlockExprs. More... | |
void | VisitLambdaExpr (const LambdaExpr *LE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitLambdaExpr - Transfer function logic for LambdaExprs. More... | |
void | VisitBinaryOperator (const BinaryOperator *B, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitBinaryOperator - Transfer function logic for binary operators. More... | |
void | VisitCallExpr (const CallExpr *CE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitCall - Transfer function for function calls. More... | |
void | VisitCast (const CastExpr *CastE, const Expr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitCast - Transfer function logic for all casts (implicit and explicit). More... | |
void | VisitCompoundLiteralExpr (const CompoundLiteralExpr *CL, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitCompoundLiteralExpr - Transfer function logic for compound literals. More... | |
void | VisitCommonDeclRefExpr (const Expr *DR, const NamedDecl *D, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Transfer function logic for DeclRefExprs and BlockDeclRefExprs. More... | |
void | VisitDeclStmt (const DeclStmt *DS, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitDeclStmt - Transfer function logic for DeclStmts. More... | |
void | VisitGuardedExpr (const Expr *Ex, const Expr *L, const Expr *R, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitGuardedExpr - Transfer function logic for ?, __builtin_choose. More... | |
void | VisitInitListExpr (const InitListExpr *E, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitLogicalExpr (const BinaryOperator *B, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitLogicalExpr - Transfer function logic for '&&', '||'. More... | |
void | VisitMemberExpr (const MemberExpr *M, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitMemberExpr - Transfer function for member expressions. More... | |
void | VisitAtomicExpr (const AtomicExpr *E, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitAtomicExpr - Transfer function for builtin atomic expressions. More... | |
void | VisitObjCAtSynchronizedStmt (const ObjCAtSynchronizedStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Transfer function logic for ObjCAtSynchronizedStmts. More... | |
void | VisitLvalObjCIvarRefExpr (const ObjCIvarRefExpr *DR, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Transfer function logic for computing the lvalue of an Objective-C ivar. More... | |
void | VisitObjCForCollectionStmt (const ObjCForCollectionStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitObjCForCollectionStmt - Transfer function logic for ObjCForCollectionStmt. More... | |
void | VisitObjCMessage (const ObjCMessageExpr *ME, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitReturnStmt (const ReturnStmt *R, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitReturnStmt - Transfer function logic for return statements. More... | |
void | VisitOffsetOfExpr (const OffsetOfExpr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitOffsetOfExpr - Transfer function for offsetof. More... | |
void | VisitUnaryExprOrTypeTraitExpr (const UnaryExprOrTypeTraitExpr *Ex, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitUnaryExprOrTypeTraitExpr - Transfer function for sizeof. More... | |
void | VisitUnaryOperator (const UnaryOperator *B, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
VisitUnaryOperator - Transfer function logic for unary operators. More... | |
void | VisitIncrementDecrementOperator (const UnaryOperator *U, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Handle ++ and – (both pre- and post-increment). More... | |
void | VisitCXXBindTemporaryExpr (const CXXBindTemporaryExpr *BTE, ExplodedNodeSet &PreVisit, ExplodedNodeSet &Dst) |
void | VisitCXXCatchStmt (const CXXCatchStmt *CS, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitCXXThisExpr (const CXXThisExpr *TE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitCXXConstructExpr (const CXXConstructExpr *E, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitCXXDestructor (QualType ObjectType, const MemRegion *Dest, const Stmt *S, bool IsBaseDtor, ExplodedNode *Pred, ExplodedNodeSet &Dst, const EvalCallOptions &Options) |
void | VisitCXXNewAllocatorCall (const CXXNewExpr *CNE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitCXXNewExpr (const CXXNewExpr *CNE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | VisitCXXDeleteExpr (const CXXDeleteExpr *CDE, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
void | CreateCXXTemporaryObject (const MaterializeTemporaryExpr *ME, ExplodedNode *Pred, ExplodedNodeSet &Dst) |
Create a C++ temporary object for an rvalue. More... | |
void | evalEagerlyAssumeBinOpBifurcation (ExplodedNodeSet &Dst, ExplodedNodeSet &Src, const Expr *Ex) |
evalEagerlyAssumeBinOpBifurcation - Given the nodes in 'Src', eagerly assume symbolic expressions of the form 'x != 0' and generate new nodes (stored in Dst) with those assumptions. More... | |
SVal | evalMinus (SVal X) |
SVal | evalComplement (SVal X) |
ProgramStateRef | handleLValueBitCast (ProgramStateRef state, const Expr *Ex, const LocationContext *LCtx, QualType T, QualType ExTy, const CastExpr *CastE, StmtNodeBuilder &Bldr, ExplodedNode *Pred) |
ProgramStateRef | handleLVectorSplat (ProgramStateRef state, const LocationContext *LCtx, const CastExpr *CastE, StmtNodeBuilder &Bldr, ExplodedNode *Pred) |
void | handleUOExtension (ExplodedNodeSet::iterator I, const UnaryOperator *U, StmtNodeBuilder &Bldr) |
SVal | evalBinOp (ProgramStateRef state, BinaryOperator::Opcode op, NonLoc L, NonLoc R, QualType T) |
SVal | evalBinOp (ProgramStateRef state, BinaryOperator::Opcode op, NonLoc L, SVal R, QualType T) |
SVal | evalBinOp (ProgramStateRef ST, BinaryOperator::Opcode Op, SVal LHS, SVal RHS, QualType T) |
void | evalLoad (ExplodedNodeSet &Dst, const Expr *NodeEx, const Expr *BoundExpr, ExplodedNode *Pred, ProgramStateRef St, SVal location, const ProgramPointTag *tag=nullptr, QualType LoadTy=QualType()) |
Simulate a read of the result of Ex. More... | |
void | evalStore (ExplodedNodeSet &Dst, const Expr *AssignE, const Expr *StoreE, ExplodedNode *Pred, ProgramStateRef St, SVal TargetLV, SVal Val, const ProgramPointTag *tag=nullptr) |
evalStore - Handle the semantics of a store via an assignment. More... | |
CFGElement | getCurrentCFGElement () |
Return the CFG element corresponding to the worklist element that is currently being processed by ExprEngine. More... | |
ProgramStateRef | bindReturnValue (const CallEvent &Call, const LocationContext *LCtx, ProgramStateRef State) |
Create a new state in which the call return value is binded to the call origin expression. More... | |
void | evalCall (ExplodedNodeSet &Dst, ExplodedNode *Pred, const CallEvent &Call) |
Evaluate a call, running pre- and post-call checks and allowing checkers to be responsible for handling the evaluation of the call itself. More... | |
void | defaultEvalCall (NodeBuilder &B, ExplodedNode *Pred, const CallEvent &Call, const EvalCallOptions &CallOpts={}) |
Default implementation of call evaluation. More... | |
![]() | |
virtual | ~SubEngine () |
ProgramStateRef | processRegionChange (ProgramStateRef state, const MemRegion *MR, const LocationContext *LCtx) |
Static Public Member Functions | |
static std::pair< const ProgramPointTag *, const ProgramPointTag * > | geteagerlyAssumeBinOpBifurcationTags () |
static Optional< SVal > | getObjectUnderConstruction (ProgramStateRef State, const ConstructionContextItem &Item, const LocationContext *LC) |
By looking at a certain item that may be potentially part of an object's ConstructionContext, retrieve such object's location. More... | |
Protected Member Functions | |
void | evalBind (ExplodedNodeSet &Dst, const Stmt *StoreE, ExplodedNode *Pred, SVal location, SVal Val, bool atDeclInit=false, const ProgramPoint *PP=nullptr) |
evalBind - Handle the semantics of binding a value to a specific location. More... | |
ProgramStateRef | processPointerEscapedOnBind (ProgramStateRef State, SVal Loc, SVal Val, const LocationContext *LCtx) override |
Call PointerEscape callback when a value escapes as a result of bind. More... | |
ProgramStateRef | notifyCheckersOfPointerEscape (ProgramStateRef State, const InvalidatedSymbols *Invalidated, ArrayRef< const MemRegion *> ExplicitRegions, ArrayRef< const MemRegion *> Regions, const CallEvent *Call, RegionAndSymbolInvalidationTraits &ITraits) override |
Call PointerEscape callback when a value escapes as a result of region invalidation. More... | |
ProgramStateRef | escapeValue (ProgramStateRef State, SVal V, PointerEscapeKind K) const |
A simple wrapper when you only need to notify checkers of pointer-escape of a single value. More... | |
Definition at line 84 of file ExprEngine.h.
The modes of inlining, which override the default analysis-wide settings.
Enumerator | |
---|---|
Inline_Regular | Follow the default settings for inlining callees. |
Inline_Minimal | Do minimal inlining of callees. |
Definition at line 87 of file ExprEngine.h.
ExprEngine::ExprEngine | ( | cross_tu::CrossTranslationUnitContext & | CTU, |
AnalysisManager & | mgr, | ||
bool | gcEnabled, | ||
SetOfConstDecls * | VisitedCalleesIn, | ||
FunctionSummariesTy * | FS, | ||
InliningModes | HowToInlineIn | ||
) |
Definition at line 179 of file ExprEngine.cpp.
References clang::ento::ExplodedGraph::enableNodeReclamation(), clang::AnalyzerOptions::getGraphTrimInterval(), and clang::ento::AnalysisManager::options.
|
override |
Definition at line 201 of file ExprEngine.cpp.
References clang::ento::BugReporter::FlushReports().
ProgramStateRef ExprEngine::bindReturnValue | ( | const CallEvent & | Call, |
const LocationContext * | LCtx, | ||
ProgramStateRef | State | ||
) |
Create a new state in which the call return value is binded to the call origin expression.
Definition at line 533 of file ExprEngineCallAndReturn.cpp.
void ExprEngine::CreateCXXTemporaryObject | ( | const MaterializeTemporaryExpr * | ME, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Create a C++ temporary object for an rvalue.
Definition at line 27 of file ExprEngineCXX.cpp.
References evalBind(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::CallEvent::getArgSVal(), clang::ento::SVal::getAs(), clang::ento::CallEvent::getDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::CallEvent::getOriginExpr(), clang::DeclContext::getParent(), clang::ento::ExplodedNode::getState(), clang::MaterializeTemporaryExpr::GetTemporaryExpr(), clang::Expr::IgnoreParens(), clang::CXXRecordDecl::isEmpty(), clang::threadSafety::til::ThreadSafetyTIL::isTrivial(), clang::ento::SVal::isUnknownOrUndef(), clang::CodeGen::state, and clang::ento::NodeBuilder::takeNodes().
void ExprEngine::defaultEvalCall | ( | NodeBuilder & | B, |
ExplodedNode * | Pred, | ||
const CallEvent & | Call, | ||
const EvalCallOptions & | CallOpts = {} |
||
) |
Default implementation of call evaluation.
Definition at line 934 of file ExprEngineCallAndReturn.cpp.
References clang::ento::CallEvent::cloneWithState(), clang::ento::ExplodedNode::getState(), and isTrivialObjectAssignment().
Referenced by clang::ento::CheckerManager::runCheckersForEvalCall(), and VisitObjCMessage().
void clang::ento::ExprEngine::enqueueEndOfPath | ( | ExplodedNodeSet & | S | ) |
|
protected |
A simple wrapper when you only need to notify checkers of pointer-escape of a single value.
Definition at line 1117 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForPointerEscape().
Referenced by handleLValueBitCast(), and processPointerEscapedOnBind().
|
protected |
evalBind - Handle the semantics of binding a value to a specific location.
This method is used by evalStore, VisitDeclStmt, and others.
This method is used by evalStore and (soon) VisitDeclStmt, and others.
Definition at line 2690 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::SVal::getAs(), getCheckerManager(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), processPointerEscapedOnBind(), clang::ento::CheckerManager::runCheckersForBind(), and clang::CodeGen::state.
Referenced by CreateCXXTemporaryObject(), ProcessInitializer(), and VisitCXXNewExpr().
|
inline |
Definition at line 568 of file ExprEngine.h.
References clang::ento::SValBuilder::evalBinOpNN().
Referenced by getInitialState(), and VisitLogicalExpr().
|
inline |
Definition at line 573 of file ExprEngine.h.
References clang::ento::SVal::castAs(), clang::ento::SValBuilder::evalBinOpNN(), and clang::ento::SVal::isValid().
|
inline |
Definition at line 579 of file ExprEngine.h.
References clang::ento::SValBuilder::evalBinOp().
void ExprEngine::evalCall | ( | ExplodedNodeSet & | Dst, |
ExplodedNode * | Pred, | ||
const CallEvent & | Call | ||
) |
Evaluate a call, running pre- and post-call checks and allowing checkers to be responsible for handling the evaluation of the call itself.
Definition at line 508 of file ExprEngineCallAndReturn.cpp.
References getCheckerManager(), clang::ento::CheckerManager::runCheckersForEvalCall(), clang::ento::CheckerManager::runCheckersForPostCall(), and clang::ento::CheckerManager::runCheckersForPreCall().
Definition at line 547 of file ExprEngine.h.
References clang::ento::SVal::castAs(), clang::ento::SValBuilder::evalComplement(), clang::ento::SVal::isValid(), and X.
void ExprEngine::evalEagerlyAssumeBinOpBifurcation | ( | ExplodedNodeSet & | Dst, |
ExplodedNodeSet & | Src, | ||
const Expr * | Ex | ||
) |
evalEagerlyAssumeBinOpBifurcation - Given the nodes in 'Src', eagerly assume symbolic expressions of the form 'x != 0' and generate new nodes (stored in Dst) with those assumptions.
Definition at line 2855 of file ExprEngine.cpp.
References clang::ProgramPoint::castAs(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::SVal::getAs(), clang::ProgramPoint::getAs(), geteagerlyAssumeBinOpBifurcationTags(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::StmtPoint::getStmt(), clang::Expr::getType(), and P.
void ExprEngine::evalLoad | ( | ExplodedNodeSet & | Dst, |
const Expr * | NodeEx, | ||
const Expr * | BoundExpr, | ||
ExplodedNode * | Pred, | ||
ProgramStateRef | St, | ||
SVal | location, | ||
const ProgramPointTag * | tag = nullptr , |
||
QualType | LoadTy = QualType() |
||
) |
Simulate a read of the result of Ex.
Definition at line 2770 of file ExprEngine.cpp.
References clang::ento::ExplodedNodeSet::empty(), clang::ento::SVal::getAs(), and clang::ento::SVal::isUndef().
Referenced by VisitIncrementDecrementOperator().
Definition at line 543 of file ExprEngine.h.
References clang::ento::SVal::castAs(), clang::ento::SValBuilder::evalMinus(), clang::ento::SVal::isValid(), and X.
Referenced by handleLValueBitCast().
void ExprEngine::evalStore | ( | ExplodedNodeSet & | Dst, |
const Expr * | AssignE, | ||
const Expr * | LocationE, | ||
ExplodedNode * | Pred, | ||
ProgramStateRef | state, | ||
SVal | location, | ||
SVal | Val, | ||
const ProgramPointTag * | tag = nullptr |
||
) |
evalStore - Handle the semantics of a store via an assignment.
Dst | The node set to store generated state nodes |
AssignE | The assignment expression if the store happens in an assignment. |
LocationE | The location expression that is stored to. |
state | The current simulation state |
location | The location to store the value |
Val | The value to be stored |
Definition at line 2747 of file ExprEngine.cpp.
References clang::ento::ExplodedNodeSet::empty(), and clang::ento::SVal::isUndef().
Referenced by VisitBinaryOperator().
|
inline |
Returns true if there is still simulation state on the worklist.
Definition at line 167 of file ExprEngine.h.
References clang::ento::CoreEngine::ExecuteWorkList().
|
inline |
Execute the work list with an initial state.
Nodes that reaches the exit of the function are added into the Dst set, which represent the exit state of the function call. Returns true if there is still simulation state on the worklist.
Definition at line 175 of file ExprEngine.h.
References clang::ento::CoreEngine::ExecuteWorkListWithInitialState().
void clang::ento::ExprEngine::GenerateAutoTransition | ( | ExplodedNode * | N | ) |
void clang::ento::ExprEngine::GenerateCallExitNode | ( | ExplodedNode * | N | ) |
|
inlineoverridevirtual |
Implements clang::ento::SubEngine.
Definition at line 184 of file ExprEngine.h.
Referenced by clang::ento::CheckerContext::getAnalysisManager(), mayInlineDecl(), ProcessNewAllocator(), and VisitCXXBindTemporaryExpr().
|
inline |
Definition at line 379 of file ExprEngine.h.
References clang::ento::ProgramStateManager::getBasicVals().
Referenced by VisitInitListExpr(), and VisitLogicalExpr().
|
inline |
Definition at line 192 of file ExprEngine.h.
Referenced by clang::ento::CheckerContext::emitReport(), and clang::ento::CheckerContext::getBugReporter().
|
inline |
Definition at line 199 of file ExprEngine.h.
Referenced by clang::ento::CheckerManager::runCheckersForEvalCall().
|
inline |
Definition at line 186 of file ExprEngine.h.
References clang::ento::AnalysisManager::getCheckerManager().
Referenced by escapeValue(), evalBind(), evalCall(), notifyCheckersOfPointerEscape(), printState(), processAssume(), processBeginOfFunction(), processBranch(), processEndWorklist(), processRegionChanges(), VisitArraySubscriptExpr(), VisitAtomicExpr(), VisitBinaryOperator(), VisitCallExpr(), VisitCast(), VisitCXXConstructExpr(), VisitCXXNewAllocatorCall(), VisitDeclStmt(), VisitLambdaExpr(), VisitLvalObjCIvarRefExpr(), VisitMemberExpr(), VisitObjCMessage(), VisitReturnStmt(), VisitUnaryExprOrTypeTraitExpr(), and VisitUnaryOperator().
|
inline |
Definition at line 374 of file ExprEngine.h.
References clang::ento::ProgramStateManager::getConstraintManager().
Referenced by clang::ento::CheckerContext::getConstraintManager().
|
inline |
getContext - Return the ASTContext associated with this analysis.
Definition at line 182 of file ExprEngine.h.
References clang::ento::AnalysisManager::getASTContext().
Referenced by clang::ento::CheckerContext::getASTContext(), clang::ento::CheckerContext::getLangOpts(), handleLValueBitCast(), handleLVectorSplat(), processBranch(), processCallExit(), ProcessDeleteDtor(), ProcessInitializer(), ProcessStmt(), ProcessTemporaryDtor(), ViewGraph(), VisitArraySubscriptExpr(), VisitBlockExpr(), VisitCommonDeclRefExpr(), VisitCXXNewAllocatorCall(), VisitCXXThisExpr(), VisitInitListExpr(), and VisitOffsetOfExpr().
|
inline |
Definition at line 392 of file ExprEngine.h.
Referenced by processCallExit().
|
inlineoverridevirtual |
Implements clang::ento::SubEngine.
Definition at line 195 of file ExprEngine.h.
|
inline |
Return the CFG element corresponding to the worklist element that is currently being processed by ExprEngine.
Definition at line 644 of file ExprEngine.h.
References clang::ento::NodeBuilderContext::getBlock(), and P.
Referenced by VisitCXXConstructExpr().
|
static |
Definition at line 2845 of file ExprEngine.cpp.
Referenced by evalEagerlyAssumeBinOpBifurcation().
|
inline |
Definition at line 223 of file ExprEngine.h.
|
inline |
Definition at line 224 of file ExprEngine.h.
References Node, and clang::ProgramPoint::PreStmtPurgeDeadSymbolsKind.
|
overridevirtual |
getInitialState - Return the initial state used for the root vertex in the ExplodedGraph.
Implements clang::ento::SubEngine.
Definition at line 209 of file ExprEngine.cpp.
References evalBinOp(), clang::ento::SVal::getAs(), clang::ento::SValBuilder::getConditionType(), clang::ento::MemRegionManager::getCXXStaticTempObjectRegion(), clang::ento::MemRegionManager::getCXXTempObjectRegion(), clang::ento::SValBuilder::getCXXThis(), clang::LocationContext::getDecl(), clang::ento::ProgramStateManager::getInitialState(), clang::IdentifierInfo::getName(), getObjectUnderConstruction(), clang::LocationContext::getParent(), clang::LocationContext::getStackFrame(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::ento::Loc::isLocType(), clang::Type::isMemberPointerType(), clang::ento::SValBuilder::makeZeroVal(), clang::SD_Static, clang::SD_Thread, clang::Expr::skipRValueSubobjectAdjustments(), clang::CodeGen::state, and State.
|
static |
By looking at a certain item that may be potentially part of an object's ConstructionContext, retrieve such object's location.
A particular statement can be transparently passed as Item
in most cases.
Definition at line 443 of file ExprEngine.cpp.
References clang::serialized_diags::create(), and clang::LocationContext::getStackFrame().
Referenced by getInitialState(), clang::ento::CallEvent::isArgumentConstructedDirectly(), processCleanupTemporaryBranch(), ProcessInitializer(), ProcessTemporaryDtor(), VisitCXXBindTemporaryExpr(), VisitCXXConstructExpr(), and VisitCXXNewExpr().
|
inlineoverridevirtual |
Implements clang::ento::SubEngine.
Definition at line 370 of file ExprEngine.h.
Referenced by clang::ento::CheckerContext::getStateManager(), processBranch(), processCallExit(), VisitCallExpr(), VisitCXXConstructExpr(), VisitCXXNewAllocatorCall(), VisitCXXNewExpr(), and VisitObjCMessage().
const Stmt* clang::ento::ExprEngine::getStmt | ( | ) | const |
|
inline |
Definition at line 372 of file ExprEngine.h.
References clang::ento::ProgramStateManager::getStoreManager().
Referenced by clang::ento::CheckerContext::getStoreManager(), ProcessBaseDtor(), processCallExit(), ProcessDeleteDtor(), removeDead(), VisitCXXConstructExpr(), and VisitCXXNewExpr().
|
inline |
Definition at line 190 of file ExprEngine.h.
Referenced by clang::ento::CheckerContext::getSValBuilder(), ProcessBaseDtor(), ProcessInitializer(), ProcessMemberDtor(), VisitCXXConstructExpr(), and VisitInitListExpr().
|
inline |
Definition at line 384 of file ExprEngine.h.
|
inline |
Definition at line 385 of file ExprEngine.h.
ProgramStateRef ExprEngine::handleLValueBitCast | ( | ProgramStateRef | state, |
const Expr * | Ex, | ||
const LocationContext * | LCtx, | ||
QualType | T, | ||
QualType | ExTy, | ||
const CastExpr * | CastE, | ||
StmtNodeBuilder & | Bldr, | ||
ExplodedNode * | Pred | ||
) |
Definition at line 256 of file ExprEngineC.cpp.
References escapeValue(), clang::ento::SValBuilder::evalCast(), evalMinus(), clang::ento::StmtNodeBuilder::generateNode(), clang::CastExpr::getCastKind(), getContext(), clang::ASTContext::getLValueReferenceType(), clang::ASTContext::getRValueReferenceType(), clang::Expr::getType(), clang::Type::isLValueReferenceType(), clang::Type::isRValueReferenceType(), clang::ento::SVal::isUnknown(), clang::ento::PSK_EscapeOther, and clang::CodeGen::state.
ProgramStateRef ExprEngine::handleLVectorSplat | ( | ProgramStateRef | state, |
const LocationContext * | LCtx, | ||
const CastExpr * | CastE, | ||
StmtNodeBuilder & | Bldr, | ||
ExplodedNode * | Pred | ||
) |
Definition at line 282 of file ExprEngineC.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::StmtNodeBuilder::generateNode(), getContext(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::Expr::isGLValue(), and clang::CodeGen::state.
void ExprEngine::handleUOExtension | ( | ExplodedNodeSet::iterator | I, |
const UnaryOperator * | U, | ||
StmtNodeBuilder & | Bldr | ||
) |
Definition at line 870 of file ExprEngineC.cpp.
|
inline |
Definition at line 389 of file ExprEngine.h.
References clang::ento::CoreEngine::getWorkList(), and clang::ento::WorkList::hasWork().
|
inline |
Definition at line 390 of file ExprEngine.h.
References clang::ento::CoreEngine::hasWorkRemaining().
|
inline |
Definition at line 204 of file ExprEngine.h.
Referenced by clang::ento::CheckerContext::isObjCGCEnabled().
|
overrideprotectedvirtual |
Call PointerEscape callback when a value escapes as a result of region invalidation.
[in] | ITraits | Specifies invalidation traits for regions/symbols. |
Implements clang::ento::SubEngine.
Definition at line 2645 of file ExprEngine.cpp.
References getCheckerManager(), clang::ento::PSK_EscapeOther, and clang::ento::CheckerManager::runCheckersForPointerEscape().
|
overridevirtual |
printState - Called by ProgramStateManager to print checker-specific data.
Implements clang::ento::SubEngine.
Definition at line 540 of file ExprEngine.cpp.
References clang::LocationContext::dumpStack(), getCheckerManager(), printObjectsUnderConstructionForContext(), and clang::ento::CheckerManager::runCheckersForPrintState().
|
overridevirtual |
evalAssume - Callback function invoked by the ConstraintManager when making assumptions about state values.
evalAssume - Called by ConstraintManager.
Used to call checker-specific logic for handling assumptions on symbolic values.
Implements clang::ento::SubEngine.
Definition at line 506 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForEvalAssume().
void ExprEngine::ProcessAutomaticObjDtor | ( | const CFGAutomaticObjDtor | D, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 892 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::SVal::getAsRegion(), clang::ento::MemRegion::getBaseRegion(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::CFGAutomaticObjDtor::getTriggerStmt(), clang::ValueDecl::getType(), clang::CFGAutomaticObjDtor::getVarDecl(), clang::ento::ExprEngine::EvalCallOptions::IsArrayCtorOrDtor, clang::Type::isReferenceType(), clang::CodeGen::state, clang::ast_matchers::varDecl, and VisitCXXDestructor().
Referenced by ProcessImplicitDtor().
void ExprEngine::ProcessBaseDtor | ( | const CFGBaseDtor | D, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 966 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::StoreManager::evalDerivedToBase(), clang::CFGBaseDtor::getBaseSpecifier(), clang::ento::SValBuilder::getCXXThis(), clang::LocationContext::getDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::loc::MemRegionVal::getRegion(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), getStoreManager(), getSValBuilder(), clang::CXXBaseSpecifier::getType(), clang::CXXBaseSpecifier::isVirtual(), and VisitCXXDestructor().
Referenced by ProcessImplicitDtor().
|
overridevirtual |
Called by CoreEngine.
Used to notify checkers that processing a function has begun. Called for both inlined and and top-level functions.
Implements clang::ento::SubEngine.
Definition at line 2190 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForBeginFunction().
Referenced by processCallEnter().
|
overridevirtual |
ProcessBranch - Called by CoreEngine.
Used to generate successor nodes by processing the 'effects' of a branch condition.
Implements clang::ento::SubEngine.
Definition at line 2024 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::BranchNodeBuilder::generateNode(), clang::ento::NodeBuilderContext::getBlock(), getCheckerManager(), getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::Stmt::getLocStart(), clang::ento::ExplodedNode::getState(), getStateManager(), clang::ento::BranchNodeBuilder::isFeasible(), clang::ento::SVal::isUnknown(), clang::ento::SVal::isUnknownOrUndef(), clang::ento::BranchNodeBuilder::markInfeasible(), RecoverCastedSymbol(), ResolveCondition(), clang::ento::CheckerManager::runCheckersForBranchCondition(), and X.
|
overridevirtual |
Generate the entry node of the callee.
Implements clang::ento::SubEngine.
Definition at line 40 of file ExprEngineCallAndReturn.cpp.
References clang::ento::ExplodedNode::addPredecessor(), clang::CFGBlock::empty(), clang::ento::CoreEngine::enqueue(), clang::CallEnter::getCalleeContext(), clang::CallEnter::getEntry(), clang::ento::ExplodedGraph::getNode(), clang::ento::ExplodedNode::getState(), Node, processBeginOfFunction(), clang::CodeGen::state, clang::CFGBlock::succ_begin(), and clang::CFGBlock::succ_size().
|
overridevirtual |
Generate the sequence of nodes that simulate the call exit and the post visit for CallExpr.
The call exit is simulated with a sequence of nodes, which occur between CallExitBegin and CallExitEnd.
The following operations occur between the two program points:
Implements clang::ento::SubEngine.
Definition at line 203 of file ExprEngineCallAndReturn.cpp.
References clang::ento::ExplodedNode::addPredecessor(), adjustReturnValue(), clang::AnalyzerOptions::AnalysisPurgeOpt, clang::ento::SVal::castAs(), clang::ento::SValBuilder::evalCast(), clang::CallEventManager::getCaller(), clang::ento::ProgramStateManager::getCallEventManager(), getContext(), getCoreEngine(), clang::ento::SValBuilder::getCXXThis(), clang::ento::CallEvent::getDeclaredResultType(), getLastStmt(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedGraph::getNode(), clang::LocationContext::getParent(), clang::ASTContext::getPointerType(), clang::ento::ExplodedNode::getStackFrame(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), getStateManager(), getStoreManager(), clang::QualType::isNull(), clang::ento::AnalysisManager::options, clang::ProgramPoint::PostStmtPurgeDeadSymbolsKind, removeDead(), clang::CodeGen::state, and wasDifferentDeclUsedForInlining().
|
overridevirtual |
Called by CoreEngine when processing the entrance of a CFGBlock.
Block entrance. (Update counters).
Implements clang::ento::SubEngine.
Definition at line 1845 of file ExprEngine.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ento::NodeBuilderWithSinks::generateNode(), clang::ento::NodeBuilderWithSinks::generateSink(), clang::ento::NodeBuilderContext::getBlock(), clang::ento::NodeBuilder::getContext(), clang::LocationContext::getDecl(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::ProgramPoint::getLocationContext(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), clang::CFGBlock::getTerminator(), clang::ento::getWidenedLoopState(), clang::ento::isUnrolledState(), and clang::ento::updateLoopStack().
|
overridevirtual |
processCFGElement - Called by CoreEngine.
Used to generate new successor nodes by processing the 'effects' of a CFG element.
Implements clang::ento::SubEngine.
Definition at line 560 of file ExprEngine.cpp.
|
overridevirtual |
Called by CoreEngine.
Used to generate successor nodes for temporary destructors depending on whether the corresponding constructor was visited.
Implements clang::ento::SubEngine.
Definition at line 1072 of file ExprEngine.cpp.
References clang::ento::BranchNodeBuilder::generateNode(), clang::ento::ExplodedNode::getLocationContext(), getObjectUnderConstruction(), clang::ento::ExplodedNode::getState(), and clang::ento::BranchNodeBuilder::markInfeasible().
void ExprEngine::ProcessDeleteDtor | ( | const CFGDeleteDtor | D, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 926 of file ExprEngine.cpp.
References clang::CXXDeleteExpr::getArgument(), clang::ASTContext::getAsArrayType(), clang::Type::getAsCXXRecordDecl(), clang::ento::SVal::getAsRegion(), clang::ASTContext::getBaseElementType(), getContext(), clang::CFGDeleteDtor::getDeleteExpr(), clang::CXXDeleteExpr::getDestroyedType(), clang::CXXRecordDecl::getDestructor(), clang::ento::StoreManager::GetElementZeroRegion(), clang::ento::ExplodedNode::getLocationContext(), clang::CXXDeleteExpr::getLocStart(), clang::ento::ExplodedNode::getState(), getStoreManager(), clang::ento::ExprEngine::EvalCallOptions::IsArrayCtorOrDtor, clang::CXXDeleteExpr::isArrayForm(), and VisitCXXDestructor().
Referenced by ProcessImplicitDtor().
|
overridevirtual |
Called by CoreEngine.
ProcessEndPath - Called by CoreEngine.
Used to notify checkers that processing a function has ended. Called for both inlined and and top-level functions.
Used to generate end-of-path nodes when the control reaches the end of a function.
Implements clang::ento::SubEngine.
Definition at line 2200 of file ExprEngine.cpp.
References clang::ento::ExplodedNode::getLocationContext(), clang::LocationContext::getParent(), clang::LocationContext::getStackFrame(), and clang::ento::ExplodedNode::getState().
|
overridevirtual |
Called by CoreEngine when the analysis worklist has terminated.
Implements clang::ento::SubEngine.
Definition at line 556 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForEndAnalysis().
void ExprEngine::ProcessImplicitDtor | ( | const CFGImplicitDtor | D, |
ExplodedNode * | Pred | ||
) |
Definition at line 846 of file ExprEngine.cpp.
References clang::CFGElement::AutomaticObjectDtor, clang::CFGElement::BaseDtor, clang::CFGElement::castAs(), clang::CFGElement::DeleteDtor, clang::ento::CoreEngine::enqueue(), clang::ento::NodeBuilderContext::getBlock(), clang::CFGElement::getKind(), clang::CFGElement::MemberDtor, ProcessAutomaticObjDtor(), ProcessBaseDtor(), ProcessDeleteDtor(), ProcessMemberDtor(), ProcessTemporaryDtor(), and clang::CFGElement::TemporaryDtor.
|
overridevirtual |
processIndirectGoto - Called by CoreEngine.
Used to generate successor nodes by processing the 'effects' of a computed goto jump.
Implements clang::ento::SubEngine.
Definition at line 2149 of file ExprEngine.cpp.
References clang::ento::SVal::getAs(), clang::ento::IndirectGotoNodeBuilder::getLocationContext(), clang::ento::IndirectGotoNodeBuilder::getState(), clang::ento::IndirectGotoNodeBuilder::getTarget(), and clang::CodeGen::state.
void ExprEngine::ProcessInitializer | ( | const CFGInitializer | I, |
ExplodedNode * | Pred | ||
) |
Definition at line 758 of file ExprEngine.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ast_matchers::decl, evalBind(), clang::ento::NodeBuilder::generateNode(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), clang::ArraySubscriptExpr::getBase(), getContext(), clang::ento::SValBuilder::getCXXThis(), clang::CXXCtorInitializer::getIndirectMember(), clang::CXXCtorInitializer::getInit(), clang::CFGInitializer::getInitializer(), clang::ento::ExplodedNode::getLocationContext(), clang::CXXCtorInitializer::getMember(), getObjectUnderConstruction(), clang::CXXCtorInitializer::getSourceLocation(), clang::ento::ExplodedNode::getState(), getSValBuilder(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::IgnoreImplicit(), clang::ento::ExplodedNodeSet::insert(), clang::CXXCtorInitializer::isAnyMemberInitializer(), clang::Type::isArrayType(), clang::CXXCtorInitializer::isBaseInitializer(), clang::CXXCtorInitializer::isDelegatingInitializer(), clang::CXXCtorInitializer::isIndirectMemberInitializer(), clang::Type::isReferenceType(), and clang::ento::SVal::isUnknownOrUndef().
void ExprEngine::ProcessLoopExit | ( | const Stmt * | S, |
ExplodedNode * | Pred | ||
) |
Definition at line 740 of file ExprEngine.cpp.
void ExprEngine::ProcessMemberDtor | ( | const CFGMemberDtor | D, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 985 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::SValBuilder::getCXXThis(), clang::LocationContext::getDecl(), clang::CFGMemberDtor::getFieldDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::loc::MemRegionVal::getRegion(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), getSValBuilder(), clang::ValueDecl::getType(), clang::ento::ExprEngine::EvalCallOptions::IsArrayCtorOrDtor, and VisitCXXDestructor().
Referenced by ProcessImplicitDtor().
void ExprEngine::ProcessNewAllocator | ( | const CXXNewExpr * | NE, |
ExplodedNode * | Pred | ||
) |
Definition at line 873 of file ExprEngine.cpp.
References clang::ento::CoreEngine::enqueue(), clang::ento::NodeBuilder::generateNode(), getAnalysisManager(), clang::ento::NodeBuilderContext::getBlock(), clang::ento::ExplodedNode::getLocationContext(), clang::CXXNewExpr::getLocStart(), clang::CXXNewExpr::getOperatorNew(), clang::ento::ExplodedNode::getState(), clang::AnalyzerOptions::mayInlineCXXAllocator(), clang::ento::AnalysisManager::options, and VisitCXXNewAllocatorCall().
|
overrideprotectedvirtual |
Call PointerEscape callback when a value escapes as a result of bind.
Implements clang::ento::SubEngine.
Definition at line 2609 of file ExprEngine.cpp.
References escapeValue(), clang::ento::SVal::getAs(), clang::ento::PSK_EscapeOnBind, and State.
Referenced by evalBind().
|
overridevirtual |
processRegionChanges - Called by ProgramStateManager whenever a change is made to the store.
Used to update checkers that track region values.
Implements clang::ento::SubEngine.
Definition at line 512 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForRegionChanges().
|
overridevirtual |
Called by CoreEngine.
Used to processing branching behavior at static initializers.
Implements clang::ento::SubEngine.
void ExprEngine::ProcessStmt | ( | const Stmt * | S, |
ExplodedNode * | Pred | ||
) |
Definition at line 710 of file ExprEngine.cpp.
References getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::Stmt::getLocStart(), clang::ento::ExplodedGraph::reclaimRecentlyAllocatedNodes(), removeDead(), and shouldRemoveDeadBindings().
|
overridevirtual |
ProcessSwitch - Called by CoreEngine.
Used to generate successor nodes by processing the 'effects' of a switch statement.
Implements clang::ento::SubEngine.
Definition at line 2266 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::SwitchNodeBuilder::getCondition(), clang::ento::SwitchNodeBuilder::getLocationContext(), clang::ento::SwitchNodeBuilder::getState(), clang::ento::SVal::isUndef(), and clang::CodeGen::state.
void ExprEngine::ProcessTemporaryDtor | ( | const CFGTemporaryDtor | D, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 1009 of file ExprEngine.cpp.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::ExplodedNodeSet::empty(), clang::ento::NodeBuilder::generateNode(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::SVal::getAsRegion(), clang::CFGTemporaryDtor::getBindTemporaryExpr(), getContext(), clang::CFGImplicitDtor::getDestructorDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::CXXBindTemporaryExpr::getLocStart(), getObjectUnderConstruction(), clang::ento::ExplodedNode::getState(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::Expr::getType(), clang::ento::ExprEngine::EvalCallOptions::IsArrayCtorOrDtor, clang::ento::ExprEngine::EvalCallOptions::IsCtorOrDtorWithImproperlyModeledTargetRegion, clang::ento::ExprEngine::EvalCallOptions::IsTemporaryCtorOrDtor, clang::ento::ExplodedNodeSet::size(), State, and VisitCXXDestructor().
Referenced by ProcessImplicitDtor().
void ExprEngine::removeDead | ( | ExplodedNode * | Node, |
ExplodedNodeSet & | Out, | ||
const Stmt * | ReferenceStmt, | ||
const LocationContext * | LC, | ||
const Stmt * | DiagnosticStmt = nullptr , |
||
ProgramPoint::Kind | K = ProgramPoint::PreStmtPurgeDeadSymbolsKind |
||
) |
Run the analyzer's garbage collection - remove dead symbols and bindings from the state.
Checkers can participate in this process with two callbacks: checkLiveSymbols
and checkDeadSymbols
. See the CheckerDocumentation class for more information.
Node | The predecessor node, from which the processing should start. |
Out | The returned set of output nodes. |
ReferenceStmt | The statement which is about to be processed. Everything needed for this statement should be considered live. A null statement means that everything in child LocationContexts is dead. |
LC | The location context of the ReferenceStmt . A null location context means that we have reached the end of analysis and that all statements and local variables should be considered dead. |
DiagnosticStmt | Used as a location for any warnings that should occur while removing the dead (e.g. leaks). By default, the ReferenceStmt is used. |
K | Denotes whether this is a pre- or post-statement purge. This must only be ProgramPoint::PostStmtPurgeDeadSymbolsKind if an entire location context is being cleared, in which case the ReferenceStmt must either be a ReturnStmt or NULL . Otherwise, it must be ProgramPoint::PreStmtPurgeDeadSymbolsKind (the default) and ReferenceStmt must be valid (non-null). |
Definition at line 622 of file ExprEngine.cpp.
References clang::LocationContext::getParent(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), getStoreManager(), clang::ProgramPoint::PostStmtPurgeDeadSymbolsKind, and clang::ProgramPoint::PreStmtPurgeDeadSymbolsKind.
Referenced by processCallExit(), ProcessStmt(), and removeDeadOnEndOfFunction().
void ExprEngine::removeDeadOnEndOfFunction | ( | NodeBuilderContext & | BC, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Remove dead bindings/symbols before exiting a function.
Definition at line 161 of file ExprEngineCallAndReturn.cpp.
References clang::ento::ExplodedNodeSet::Add(), clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getBody(), getLastStmt(), clang::ento::ExplodedNode::getLocationContext(), clang::ProgramPoint::PostStmtPurgeDeadSymbolsKind, and removeDead().
Visualize the ExplodedGraph created by executing the simulation.
Definition at line 3142 of file ExprEngine.cpp.
void ExprEngine::ViewGraph | ( | ArrayRef< const ExplodedNode *> | Nodes | ) |
Visualize a trimmed ExplodedGraph that only contains paths to the given nodes.
Definition at line 3173 of file ExprEngine.cpp.
References getContext(), and clang::ASTContext::getSourceManager().
void ExprEngine::Visit | ( | const Stmt * | S, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Visit - Transfer function logic for all statements.
Dispatches to other functions that handle specific kinds of statements.
Definition at line 1139 of file ExprEngine.cpp.
void ExprEngine::VisitArraySubscriptExpr | ( | const ArraySubscriptExpr * | Ex, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitArraySubscriptExpr - Transfer function for array accesses.
Definition at line 2440 of file ExprEngine.cpp.
References clang::ASTContext::CharTy, clang::ento::StmtNodeBuilder::generateNode(), clang::ArraySubscriptExpr::getBase(), getCheckerManager(), getContext(), clang::ArraySubscriptExpr::getIdx(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::QualType::isCForbiddenLValueType(), clang::Expr::isGLValue(), clang::Type::isVectorType(), clang::Type::isVoidType(), Node, clang::ProgramPoint::PostLValueKind, clang::ento::CheckerManager::runCheckersForPostStmt(), clang::ento::CheckerManager::runCheckersForPreStmt(), and clang::CodeGen::state.
void ExprEngine::VisitAtomicExpr | ( | const AtomicExpr * | E, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitAtomicExpr - Transfer function for builtin atomic expressions.
Definition at line 2567 of file ExprEngine.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitBinaryOperator | ( | const BinaryOperator * | B, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitBinaryOperator - Transfer function logic for binary operators.
Definition at line 41 of file ExprEngineC.cpp.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::NodeBuilderContext::blockCount(), conjureOffsetSymbolOnLocation(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::ExplodedNodeSet::end(), evalStore(), getCheckerManager(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::IgnoreParens(), clang::BinaryOperator::isAdditiveOp(), clang::BinaryOperator::isAssignmentOp(), clang::Expr::isGLValue(), clang::ento::SVal::isUnknown(), clang::ento::CheckerManager::runCheckersForPreStmt(), and clang::CodeGen::state.
void ExprEngine::VisitBlockExpr | ( | const BlockExpr * | BE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitBlockExpr - Transfer function logic for BlockExprs.
Definition at line 193 of file ExprEngineC.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ento::SVal::getAsRegion(), clang::BlockExpr::getBlockDecl(), clang::ento::SValBuilder::getBlockPointer(), clang::ASTContext::getCanonicalType(), getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::Expr::getType(), and State.
void ExprEngine::VisitCallExpr | ( | const CallExpr * | CE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitCall - Transfer function for function calls.
Definition at line 480 of file ExprEngineCallAndReturn.cpp.
References clang::ento::ProgramStateManager::getCallEventManager(), getCheckerManager(), clang::ento::ExplodedNode::getLocationContext(), clang::CallEventManager::getSimpleCall(), clang::ento::ExplodedNode::getState(), getStateManager(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitCast | ( | const CastExpr * | CastE, |
const Expr * | Ex, | ||
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitCast - Transfer function logic for all casts (implicit and explicit).
Definition at line 298 of file ExprEngineC.cpp.
References clang::CastExpr::getCastKind(), getCheckerManager(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitCommonDeclRefExpr | ( | const Expr * | DR, |
const NamedDecl * | D, | ||
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Transfer function logic for DeclRefExprs and BlockDeclRefExprs.
Definition at line 2349 of file ExprEngine.cpp.
References clang::ento::SVal::castAs(), clang::ento::StmtNodeBuilder::generateNode(), clang::CXXRecordDecl::getCaptureFields(), getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::DeclContext::getParent(), clang::ento::ExplodedNode::getState(), clang::Expr::isGLValue(), clang::ProgramPoint::PostLValueKind, and clang::CodeGen::state.
void ExprEngine::VisitCompoundLiteralExpr | ( | const CompoundLiteralExpr * | CL, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitCompoundLiteralExpr - Transfer function logic for compound literals.
Definition at line 537 of file ExprEngineC.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), clang::CompoundLiteralExpr::getInitializer(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::Expr::isGLValue(), and State.
void ExprEngine::VisitCXXBindTemporaryExpr | ( | const CXXBindTemporaryExpr * | BTE, |
ExplodedNodeSet & | PreVisit, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 1090 of file ExprEngine.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), getAnalysisManager(), getObjectUnderConstruction(), and Node.
void ExprEngine::VisitCXXCatchStmt | ( | const CXXCatchStmt * | CS, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 734 of file ExprEngineCXX.cpp.
References clang::ento::ExplodedNodeSet::Add(), clang::ento::NodeBuilderContext::blockCount(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::StmtNodeBuilder::generateNode(), clang::CXXCatchStmt::getExceptionDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::ValueDecl::getType(), and clang::CodeGen::state.
void ExprEngine::VisitCXXConstructExpr | ( | const CXXConstructExpr * | E, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 307 of file ExprEngineCXX.cpp.
References clang::ento::ExplodedNodeSet::Add(), clang::ento::NodeBuilder::begin(), clang::CXXConstructExpr::CK_Complete, clang::CXXConstructExpr::CK_Delegating, clang::CXXConstructExpr::CK_NonVirtualBase, clang::CXXConstructExpr::CK_VirtualBase, clang::ento::StoreManager::evalDerivedToBase(), clang::ento::StmtNodeBuilder::generateNode(), clang::CFGElement::getAs(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), clang::ento::ProgramStateManager::getCallEventManager(), clang::StackFrameContext::getCallSite(), getCheckerManager(), clang::CXXConstructExpr::getConstructionKind(), getCurrentCFGElement(), clang::CallEventManager::getCXXConstructorCall(), clang::ento::MemRegionManager::getCXXTempObjectRegion(), clang::ento::SValBuilder::getCXXThis(), clang::LocationContext::getDecl(), clang::ento::ExplodedNode::getLocationContext(), getObjectUnderConstruction(), clang::ParentMap::getParent(), clang::LocationContext::getParentMap(), clang::ento::SValBuilder::getRegionManager(), clang::LocationContext::getStackFrame(), clang::ento::ExplodedNode::getState(), getStateManager(), getStoreManager(), getSValBuilder(), clang::Expr::getType(), clang::ento::ExprEngine::EvalCallOptions::IsCtorOrDtorWithImproperlyModeledTargetRegion, clang::ProgramPoint::PreStmtKind, clang::ento::CheckerManager::runCheckersForPreStmt(), clang::ento::ExplodedNodeSet::size(), State, and MultiVersioning::Target.
void ExprEngine::VisitCXXDeleteExpr | ( | const CXXDeleteExpr * | CDE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 727 of file ExprEngineCXX.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), clang::ento::ExplodedNode::getState(), and clang::CodeGen::state.
void ExprEngine::VisitCXXDestructor | ( | QualType | ObjectType, |
const MemRegion * | Dest, | ||
const Stmt * | S, | ||
bool | IsBaseDtor, | ||
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst, | ||
const EvalCallOptions & | Options | ||
) |
Definition at line 511 of file ExprEngineCXX.cpp.
Referenced by ProcessAutomaticObjDtor(), ProcessBaseDtor(), ProcessDeleteDtor(), ProcessMemberDtor(), and ProcessTemporaryDtor().
void ExprEngine::VisitCXXNewAllocatorCall | ( | const CXXNewExpr * | CNE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 548 of file ExprEngineCXX.cpp.
References clang::ento::ProgramStateManager::getCallEventManager(), getCheckerManager(), getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::CXXNewExpr::getStartLoc(), clang::ento::ExplodedNode::getState(), getStateManager(), and clang::ento::CheckerManager::runCheckersForPreCall().
Referenced by ProcessNewAllocator().
void ExprEngine::VisitCXXNewExpr | ( | const CXXNewExpr * | CNE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 617 of file ExprEngineCXX.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ento::SValBuilder::conjureSymbolVal(), evalBind(), clang::ento::SValBuilder::evalCast(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::AnalysisManager::getAnalyzerOptions(), clang::ento::SVal::getAs(), clang::Type::getAs(), clang::ento::SVal::getAsRegion(), clang::ento::ProgramStateManager::getCallEventManager(), clang::ento::SValBuilder::getConjuredHeapSymbolVal(), clang::CallEventManager::getCXXAllocatorCall(), clang::ento::StoreManager::GetElementZeroRegion(), clang::CXXNewExpr::getInitializer(), clang::ento::ExplodedNode::getLocationContext(), getObjectUnderConstruction(), clang::CXXNewExpr::getOperatorNew(), clang::CXXNewExpr::getPlacementArg(), clang::ento::NodeBuilder::getResults(), clang::ento::ExplodedNode::getState(), getStateManager(), getStoreManager(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CXXNewExpr::isArray(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::ento::SVal::isUnknown(), clang::AnalyzerOptions::mayInlineCXXAllocator(), clang::ento::ExplodedNodeSet::size(), and clang::ento::NodeBuilder::takeNodes().
void ExprEngine::VisitCXXThisExpr | ( | const CXXThisExpr * | TE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 753 of file ExprEngineCXX.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), getContext(), clang::ento::MemRegionManager::getCXXThisRegion(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::SValBuilder::getRegionManager(), clang::ento::ExplodedNode::getState(), clang::Expr::getType(), and clang::CodeGen::state.
void ExprEngine::VisitDeclStmt | ( | const DeclStmt * | DS, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitDeclStmt - Transfer function logic for DeclStmts.
Definition at line 562 of file ExprEngineC.cpp.
References clang::DeclStmt::decl_begin(), getCheckerManager(), clang::ento::ExplodedNodeSet::insert(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitGCCAsmStmt | ( | const GCCAsmStmt * | A, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitGCCAsmStmt - Transfer function logic for inline asm.
Definition at line 2896 of file ExprEngine.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), clang::ento::SVal::getAs(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::AsmStmt::outputs(), and X.
void ExprEngine::VisitGuardedExpr | ( | const Expr * | Ex, |
const Expr * | L, | ||
const Expr * | R, | ||
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitGuardedExpr - Transfer function logic for ?, __builtin_choose.
Definition at line 744 of file ExprEngineC.cpp.
References clang::ento::NodeBuilderContext::blockCount(), clang::ProgramPoint::castAs(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::StmtNodeBuilder::generateNode(), clang::ProgramPoint::getAs(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::Expr::IgnoreParens(), clang::ento::ExplodedNode::pred_begin(), clang::CodeGen::state, and VisitOffsetOfExpr().
void ExprEngine::VisitIncrementDecrementOperator | ( | const UnaryOperator * | U, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Handle ++ and – (both pre- and post-increment).
Definition at line 1023 of file ExprEngineC.cpp.
References evalLoad(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::UnaryOperator::getSubExpr(), clang::Expr::IgnoreParens(), clang::UnaryOperator::isIncrementDecrementOp(), and clang::CodeGen::state.
void ExprEngine::VisitInitListExpr | ( | const InitListExpr * | E, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 695 of file ExprEngineC.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), getBasicVals(), clang::ASTContext::getCanonicalType(), getContext(), clang::ento::BasicValueFactory::getEmptySValList(), clang::InitListExpr::getInit(), clang::ento::ExplodedNode::getLocationContext(), clang::InitListExpr::getNumInits(), clang::ento::ExplodedNode::getState(), getSValBuilder(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::Type::isArrayType(), clang::Expr::isGLValue(), clang::Type::isRecordType(), clang::Type::isVectorType(), clang::ento::SValBuilder::makeCompoundVal(), clang::ento::SValBuilder::makeZeroVal(), clang::ento::BasicValueFactory::prependSVal(), clang::InitListExpr::rbegin(), clang::InitListExpr::rend(), and clang::CodeGen::state.
void ExprEngine::VisitLambdaExpr | ( | const LambdaExpr * | LE, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitLambdaExpr - Transfer function logic for LambdaExprs.
Definition at line 769 of file ExprEngineCXX.cpp.
References clang::LambdaExpr::capture_init_begin(), clang::LambdaExpr::capture_init_end(), clang::RecordDecl::field_begin(), clang::ento::StmtNodeBuilder::generateNode(), clang::FieldDecl::getCapturedVLAType(), getCheckerManager(), clang::ento::MemRegionManager::getCXXTempObjectRegion(), clang::LambdaExpr::getLambdaClass(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::SValBuilder::getRegionManager(), clang::VariableArrayType::getSizeExpr(), clang::ento::ExplodedNode::getState(), clang::FieldDecl::hasCapturedVLAType(), clang::ProgramPoint::PostLValueKind, and clang::ento::CheckerManager::runCheckersForPostStmt().
void ExprEngine::VisitLogicalExpr | ( | const BinaryOperator * | B, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitLogicalExpr - Transfer function logic for '&&', '||'.
Definition at line 626 of file ExprEngineC.cpp.
References clang::CFGElement::castAs(), clang::ProgramPoint::castAs(), clang::CFGBlock::empty(), evalBinOp(), clang::ento::SValBuilder::evalCast(), clang::ProgramPoint::getAs(), getBasicVals(), clang::BlockEdge::getDst(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::BinaryOperator::getOpcode(), clang::BlockEdge::getSrc(), clang::ento::ExplodedNode::getState(), clang::CFGTerminator::getStmt(), clang::CFGBlock::getTerminator(), clang::Expr::getType(), getValue(), clang::Type::isVectorType(), clang::ento::SValBuilder::makeIntVal(), P, clang::ento::ExplodedNode::pred_begin(), clang::ento::ExplodedNode::pred_size(), clang::CFGBlock::rbegin(), clang::CodeGen::state, clang::CFGBlock::succ_begin(), clang::CFGBlock::succ_size(), and X.
void ExprEngine::VisitLvalObjCIvarRefExpr | ( | const ObjCIvarRefExpr * | DR, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Transfer function logic for computing the lvalue of an Objective-C ivar.
Definition at line 22 of file ExprEngineObjC.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), clang::ObjCIvarRefExpr::getBase(), getCheckerManager(), clang::ObjCIvarRefExpr::getDecl(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::ento::CheckerManager::runCheckersForPostStmt(), and clang::CodeGen::state.
void ExprEngine::VisitMemberExpr | ( | const MemberExpr * | M, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitMemberExpr - Transfer function for member expressions.
Definition at line 2491 of file ExprEngine.cpp.
References getCheckerManager(), clang::MemberExpr::getMemberDecl(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitMSAsmStmt | ( | const MSAsmStmt * | A, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitMSAsmStmt - Transfer function logic for MS inline asm.
Definition at line 2919 of file ExprEngine.cpp.
References clang::ento::StmtNodeBuilder::generateNode(), and clang::ento::ExplodedNode::getState().
void ExprEngine::VisitObjCAtSynchronizedStmt | ( | const ObjCAtSynchronizedStmt * | S, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Transfer function logic for ObjCAtSynchronizedStmts.
Definition at line 39 of file ExprEngineObjC.cpp.
void ExprEngine::VisitObjCForCollectionStmt | ( | const ObjCForCollectionStmt * | S, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitObjCForCollectionStmt - Transfer function logic for ObjCForCollectionStmt.
Definition at line 86 of file ExprEngineObjC.cpp.
void ExprEngine::VisitObjCMessage | ( | const ObjCMessageExpr * | ME, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
Definition at line 151 of file ExprEngineObjC.cpp.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::SVal::castAs(), clang::ento::CallEventRef< T >::cloneWithState(), defaultEvalCall(), clang::ento::ExplodedNodeSet::end(), clang::ento::StmtNodeBuilder::generateNode(), clang::ento::StmtNodeBuilder::generateSink(), clang::ento::ProgramStateManager::getCallEventManager(), getCheckerManager(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), clang::CallEventManager::getObjCMethodCall(), clang::ento::ExplodedNode::getState(), getStateManager(), clang::ProgramPoint::getTag(), clang::ObjCNoReturn::isImplicitNoReturn(), clang::ento::SVal::isUndef(), clang::ProgramPoint::PreStmtKind, clang::ento::CheckerManager::runCheckersForObjCMessageNil(), clang::ento::CheckerManager::runCheckersForPostCall(), clang::ento::CheckerManager::runCheckersForPostObjCMessage(), clang::ento::CheckerManager::runCheckersForPreCall(), clang::ento::CheckerManager::runCheckersForPreObjCMessage(), and State.
void ExprEngine::VisitOffsetOfExpr | ( | const OffsetOfExpr * | Ex, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitOffsetOfExpr - Transfer function for offsetof.
Definition at line 809 of file ExprEngineC.cpp.
References clang::Expr::EvaluateAsInt(), clang::ento::StmtNodeBuilder::generateNode(), clang::Type::getAs(), getContext(), clang::ento::ExplodedNode::getLocationContext(), clang::ento::ExplodedNode::getState(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Type::isBuiltinType(), clang::Type::isSignedIntegerType(), clang::ento::SValBuilder::makeIntVal(), VisitUnaryExprOrTypeTraitExpr(), and X.
Referenced by VisitGuardedExpr().
void ExprEngine::VisitReturnStmt | ( | const ReturnStmt * | R, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitReturnStmt - Transfer function logic for return statements.
Definition at line 1024 of file ExprEngineCallAndReturn.cpp.
References clang::ento::ExplodedNodeSet::begin(), clang::ento::ExplodedNodeSet::end(), clang::ento::StmtNodeBuilder::generateNode(), getCheckerManager(), clang::ReturnStmt::getRetValue(), and clang::ento::CheckerManager::runCheckersForPreStmt().
void ExprEngine::VisitUnaryExprOrTypeTraitExpr | ( | const UnaryExprOrTypeTraitExpr * | Ex, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitUnaryExprOrTypeTraitExpr - Transfer function for sizeof.
Definition at line 828 of file ExprEngineC.cpp.
References getCheckerManager(), clang::UnaryExprOrTypeTraitExpr::getTypeOfArgument(), and clang::ento::CheckerManager::runCheckersForPreStmt().
Referenced by VisitOffsetOfExpr().
void ExprEngine::VisitUnaryOperator | ( | const UnaryOperator * | B, |
ExplodedNode * | Pred, | ||
ExplodedNodeSet & | Dst | ||
) |
VisitUnaryOperator - Transfer function logic for unary operators.
Definition at line 887 of file ExprEngineC.cpp.
References getCheckerManager(), and clang::ento::CheckerManager::runCheckersForPreStmt().
|
inline |
Definition at line 388 of file ExprEngine.h.
References clang::ento::CoreEngine::wasBlocksExhausted().