class ExprEngine

Declaration

class ExprEngine { /* full declaration omitted */ };

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:123

Member Variables

private cross_tu::CrossTranslationUnitContext& CTU
private bool IsCTUEnabled
private clang::ento::AnalysisManager& AMgr
private clang::AnalysisDeclContextManager& AnalysisDeclContexts
private clang::ento::CoreEngine Engine
private clang::ento::ExplodedGraph& G
G - the simulation graph.
private clang::ento::ProgramStateManager StateMgr
StateMgr - Object that manages the data for all created states.
private clang::ento::SymbolManager& SymMgr
SymMgr - Object that manages the symbol information.
private clang::ento::MemRegionManager& MRMgr
MRMgr - MemRegionManager object that creates memory regions.
private clang::ento::SValBuilder& svalBuilder
svalBuilder - SValBuilder object that creates SVals from expressions.
private unsigned int currStmtIdx = 0
private const clang::ento::NodeBuilderContext* currBldrCtx = nullptr
private clang::ObjCNoReturn ObjCNoRet
Helper object to determine if an Objective-C message expression implicitly never returns.
private clang::ento::PathSensitiveBugReporter BR
The BugReporter associated with this engine. It is important that this object be placed at the very end of member variables so that its destructor is called before the rest of the ExprEngine is destroyed.
private clang::ento::SetOfConstDecls* VisitedCallees
The functions which have been analyzed through inlining. This is owned by AnalysisConsumer. It can be null.
private clang::ento::ExprEngine::InliningModes HowToInline
The flag, which specifies the mode of inlining for the engine.

Method Overview

  • private void BifurcateCall(const clang::ento::MemRegion * BifurReg, const clang::ento::CallEvent & Call, const clang::Decl * D, clang::ento::NodeBuilder & Bldr, clang::ento::ExplodedNode * Pred)
  • public void CreateCXXTemporaryObject(const clang::MaterializeTemporaryExpr * ME, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public std::string DumpGraph(ArrayRef<const clang::ento::ExplodedNode *> Nodes, llvm::StringRef Filename = "")
  • public std::string DumpGraph(bool trim = false, llvm::StringRef Filename = "")
  • public bool ExecuteWorkList(const clang::LocationContext * L, unsigned int Steps = 150000)
  • public bool ExecuteWorkListWithInitialState(const clang::LocationContext * L, unsigned int Steps, clang::ento::ProgramStateRef InitState, clang::ento::ExplodedNodeSet & Dst)
  • public ExprEngine(cross_tu::CrossTranslationUnitContext & CTU, clang::ento::AnalysisManager & mgr, clang::ento::SetOfConstDecls * VisitedCalleesIn, clang::ento::FunctionSummariesTy * FS, clang::ento::ExprEngine::InliningModes HowToInlineIn)
  • public void GenerateAutoTransition(clang::ento::ExplodedNode * N)
  • public void GenerateCallExitNode(clang::ento::ExplodedNode * N)
  • public void ProcessAutomaticObjDtor(const clang::CFGAutomaticObjDtor D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void ProcessBaseDtor(const clang::CFGBaseDtor D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void ProcessDeleteDtor(const clang::CFGDeleteDtor D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void ProcessImplicitDtor(const clang::CFGImplicitDtor D, clang::ento::ExplodedNode * Pred)
  • public void ProcessInitializer(const clang::CFGInitializer I, clang::ento::ExplodedNode * Pred)
  • public void ProcessLoopExit(const clang::Stmt * S, clang::ento::ExplodedNode * Pred)
  • public void ProcessMemberDtor(const clang::CFGMemberDtor D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void ProcessNewAllocator(const clang::CXXNewExpr * NE, clang::ento::ExplodedNode * Pred)
  • public void ProcessStmt(const clang::Stmt * S, clang::ento::ExplodedNode * Pred)
  • public void ProcessTemporaryDtor(const clang::CFGTemporaryDtor D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void ViewGraph(bool trim = false)
  • public void ViewGraph(ArrayRef<const clang::ento::ExplodedNode *> Nodes)
  • public void Visit(const clang::Stmt * S, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitArrayInitLoopExpr(const clang::ArrayInitLoopExpr * Ex, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitArraySubscriptExpr(const clang::ArraySubscriptExpr * Ex, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitAtomicExpr(const clang::AtomicExpr * E, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitBinaryOperator(const clang::BinaryOperator * B, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitBlockExpr(const clang::BlockExpr * BE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXBindTemporaryExpr(const clang::CXXBindTemporaryExpr * BTE, clang::ento::ExplodedNodeSet & PreVisit, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXCatchStmt(const clang::CXXCatchStmt * CS, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXConstructExpr(const clang::CXXConstructExpr * E, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXDeleteExpr(const clang::CXXDeleteExpr * CDE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXDestructor(clang::QualType ObjectType, const clang::ento::MemRegion * Dest, const clang::Stmt * S, bool IsBaseDtor, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst, clang::ento::EvalCallOptions & Options)
  • public void VisitCXXInheritedCtorInitExpr(const clang::CXXInheritedCtorInitExpr * E, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXNewAllocatorCall(const clang::CXXNewExpr * CNE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXNewExpr(const clang::CXXNewExpr * CNE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCXXThisExpr(const clang::CXXThisExpr * TE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCallExpr(const clang::CallExpr * CE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCast(const clang::CastExpr * CastE, const clang::Expr * Ex, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCommonDeclRefExpr(const clang::Expr * DR, const clang::NamedDecl * D, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitCompoundLiteralExpr(const clang::CompoundLiteralExpr * CL, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitDeclStmt(const clang::DeclStmt * DS, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitGCCAsmStmt(const clang::GCCAsmStmt * A, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitGuardedExpr(const clang::Expr * Ex, const clang::Expr * L, const clang::Expr * R, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitIncrementDecrementOperator(const clang::UnaryOperator * U, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitInitListExpr(const clang::InitListExpr * E, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitLambdaExpr(const clang::LambdaExpr * LE, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitLogicalExpr(const clang::BinaryOperator * B, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitLvalObjCIvarRefExpr(const clang::ObjCIvarRefExpr * DR, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitMSAsmStmt(const clang::MSAsmStmt * A, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitMemberExpr(const clang::MemberExpr * M, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitObjCAtSynchronizedStmt(const clang::ObjCAtSynchronizedStmt * S, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitObjCForCollectionStmt(const clang::ObjCForCollectionStmt * S, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitObjCMessage(const clang::ObjCMessageExpr * ME, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitOffsetOfExpr(const clang::OffsetOfExpr * Ex, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitReturnStmt(const clang::ReturnStmt * R, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitUnaryExprOrTypeTraitExpr(const clang::UnaryExprOrTypeTraitExpr * Ex, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public void VisitUnaryOperator(const clang::UnaryOperator * B, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • private static clang::ento::ProgramStateRef addObjectUnderConstruction(clang::ento::ProgramStateRef State, const clang::ConstructionContextItem & Item, const clang::LocationContext * LC, clang::ento::SVal V)
  • private void anchor()
  • private static bool areAllObjectsFullyConstructed(clang::ento::ProgramStateRef State, const clang::LocationContext * FromLC, const clang::LocationContext * ToLC)
  • public clang::ento::ProgramStateRef bindReturnValue(const clang::ento::CallEvent & Call, const clang::LocationContext * LCtx, clang::ento::ProgramStateRef State)
  • private static clang::ento::ProgramStateRef cleanupElidedDestructor(clang::ento::ProgramStateRef State, const clang::CXXBindTemporaryExpr * BTE, const clang::LocationContext * LC)
  • public clang::ento::SVal computeObjectUnderConstruction(const clang::Expr * E, clang::ento::ProgramStateRef State, const clang::LocationContext * LCtx, const clang::ConstructionContext * CC, clang::ento::EvalCallOptions & CallOpts, unsigned int Idx = 0)
  • private void conservativeEvalCall(const clang::ento::CallEvent & Call, clang::ento::NodeBuilder & Bldr, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef State)
  • private clang::ento::ProgramStateRef createTemporaryRegionIfNeeded(clang::ento::ProgramStateRef State, const clang::LocationContext * LC, const clang::Expr * InitWithAdjustments, const clang::Expr * Result = nullptr, const clang::ento::SubRegion ** OutRegionWithAdjustments = nullptr)
  • private void ctuBifurcate(const clang::ento::CallEvent & Call, const clang::Decl * D, clang::ento::NodeBuilder & Bldr, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef State)
  • public void defaultEvalCall(clang::ento::NodeBuilder & B, clang::ento::ExplodedNode * Pred, const clang::ento::CallEvent & Call, const clang::ento::EvalCallOptions & CallOpts = {})
  • private static clang::ento::ProgramStateRef elideDestructor(clang::ento::ProgramStateRef State, const clang::CXXBindTemporaryExpr * BTE, const clang::LocationContext * LC)
  • public void enqueueEndOfPath(clang::ento::ExplodedNodeSet & S)
  • private clang::ento::ProgramStateRef escapeValues(clang::ento::ProgramStateRef State, ArrayRef<clang::ento::SVal> Vs, clang::ento::PointerEscapeKind K, const clang::ento::CallEvent * Call = nullptr) const
  • public clang::ento::SVal evalBinOp(clang::ento::ProgramStateRef ST, BinaryOperator::Opcode Op, clang::ento::SVal LHS, clang::ento::SVal RHS, clang::QualType T)
  • private void evalBind(clang::ento::ExplodedNodeSet & Dst, const clang::Stmt * StoreE, clang::ento::ExplodedNode * Pred, clang::ento::SVal location, clang::ento::SVal Val, bool atDeclInit = false, const clang::ProgramPoint * PP = nullptr)
  • public void evalCall(clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNode * Pred, const clang::ento::CallEvent & Call)
  • public void evalEagerlyAssumeBinOpBifurcation(clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNodeSet & Src, const clang::Expr * Ex)
  • public void evalLoad(clang::ento::ExplodedNodeSet & Dst, const clang::Expr * NodeEx, const clang::Expr * BoundExpr, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef St, clang::ento::SVal location, const clang::ProgramPointTag * tag = nullptr, clang::QualType LoadTy = clang::QualType())
  • private void evalLoadCommon(clang::ento::ExplodedNodeSet & Dst, const clang::Expr * NodeEx, const clang::Expr * BoundEx, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef St, clang::ento::SVal location, const clang::ProgramPointTag * tag, clang::QualType LoadTy)
  • private void evalLocation(clang::ento::ExplodedNodeSet & Dst, const clang::Stmt * NodeEx, const clang::Stmt * BoundEx, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef St, clang::ento::SVal location, bool isLoad)
  • public void evalStore(clang::ento::ExplodedNodeSet & Dst, const clang::Expr * AssignE, const clang::Expr * StoreE, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef St, clang::ento::SVal TargetLV, clang::ento::SVal Val, const clang::ProgramPointTag * tag = nullptr)
  • private void examineStackFrames(const clang::Decl * D, const clang::LocationContext * LCtx, bool & IsRecursive, unsigned int & StackDepth)
  • private const clang::CXXConstructExpr * findDirectConstructorForCurrentCFGElement()
  • private void finishArgumentConstruction(clang::ento::ExplodedNodeSet & Dst, clang::ento::ExplodedNode * Pred, const clang::ento::CallEvent & Call)
  • private clang::ento::ProgramStateRef finishArgumentConstruction(clang::ento::ProgramStateRef State, const clang::ento::CallEvent & Call)
  • private static clang::ento::ProgramStateRef finishObjectConstruction(clang::ento::ProgramStateRef State, const clang::ConstructionContextItem & Item, const clang::LocationContext * LC)
  • public clang::AnalysisDeclContextManager & getAnalysisDeclContextManager()
  • public clang::ento::AnalysisManager & getAnalysisManager()
  • public clang::ento::BasicValueFactory & getBasicVals()
  • public clang::ento::BugReporter & getBugReporter()
  • public const clang::ento::NodeBuilderContext & getBuilderContext()
  • public clang::ento::CheckerManager & getCheckerManager() const
  • public clang::ento::ConstraintManager & getConstraintManager()
  • public clang::ASTContext & getContext() const
  • public const clang::ento::CoreEngine & getCoreEngine() const
  • public cross_tu::CrossTranslationUnitContext * getCrossTranslationUnitContext()
  • public clang::CFGElement getCurrentCFGElement()
  • public DataTag::Factory & getDataTags()
  • public clang::ento::ExplodedGraph & getGraph()
  • public const clang::ento::ExplodedGraph & getGraph() const
  • public static Optional<unsigned int> getIndexOfElementToConstruct(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx)
  • public clang::ento::ProgramStateRef getInitialState(const clang::LocationContext * InitLoc)
  • public static Optional<clang::ento::SVal> getObjectUnderConstruction(clang::ento::ProgramStateRef State, const clang::ConstructionContextItem & Item, const clang::LocationContext * LC)
  • public static Optional<unsigned int> getPendingInitLoop(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx)
  • public clang::ento::MemRegionManager & getRegionManager()
  • public const clang::LocationContext * getRootLocationContext() const
  • public clang::ento::SValBuilder & getSValBuilder()
  • public clang::ento::ProgramStateManager & getStateManager()
  • public const clang::Stmt * getStmt() const
  • public clang::ento::StoreManager & getStoreManager()
  • public clang::ento::SymbolManager & getSymbolManager()
  • public static std::pair<const ProgramPointTag *, const ProgramPointTag *> geteagerlyAssumeBinOpBifurcationTags()
  • public std::pair<ProgramStateRef, SVal> handleConstructionContext(const clang::Expr * E, clang::ento::ProgramStateRef State, const clang::LocationContext * LCtx, const clang::ConstructionContext * CC, clang::ento::EvalCallOptions & CallOpts, unsigned int Idx = 0)
  • private void handleConstructor(const clang::Expr * E, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • public clang::ento::ProgramStateRef handleLValueBitCast(clang::ento::ProgramStateRef state, const clang::Expr * Ex, const clang::LocationContext * LCtx, clang::QualType T, clang::QualType ExTy, const clang::CastExpr * CastE, clang::ento::StmtNodeBuilder & Bldr, clang::ento::ExplodedNode * Pred)
  • public clang::ento::ProgramStateRef handleLVectorSplat(clang::ento::ProgramStateRef state, const clang::LocationContext * LCtx, const clang::CastExpr * CastE, clang::ento::StmtNodeBuilder & Bldr, clang::ento::ExplodedNode * Pred)
  • public void handleUOExtension(ExplodedNodeSet::iterator I, const clang::UnaryOperator * U, clang::ento::StmtNodeBuilder & Bldr)
  • public bool hasEmptyWorkList() const
  • public static bool hasMoreIteration(clang::ento::ProgramStateRef State, const clang::ObjCForCollectionStmt * O, const clang::LocationContext * LC)
  • public bool hasWorkRemaining() const
  • private void inlineCall(clang::ento::WorkList * WList, const clang::ento::CallEvent & Call, const clang::Decl * D, clang::ento::NodeBuilder & Bldr, clang::ento::ExplodedNode * Pred, clang::ento::ProgramStateRef State)
  • private static bool isDestructorElided(clang::ento::ProgramStateRef State, const clang::CXXBindTemporaryExpr * BTE, const clang::LocationContext * LC)
  • private bool isHuge(clang::AnalysisDeclContext * ADC) const
  • private bool isLarge(clang::AnalysisDeclContext * ADC) const
  • private bool isSecondPhaseCTU()
  • private bool isSmall(clang::AnalysisDeclContext * ADC) const
  • private static clang::ento::SVal makeElementRegion(clang::ento::ProgramStateRef State, clang::ento::SVal LValue, clang::QualType & Ty, bool & IsArray, unsigned int Idx = 0)
  • private clang::ento::ExprEngine::CallInlinePolicy mayInlineCallKind(const clang::ento::CallEvent & Call, const clang::ento::ExplodedNode * Pred, clang::AnalyzerOptions & Opts, const clang::ento::EvalCallOptions & CallOpts)
  • private bool mayInlineDecl(clang::AnalysisDeclContext * ADC) const
  • public clang::ento::ProgramStateRef notifyCheckersOfPointerEscape(clang::ento::ProgramStateRef State, const clang::ento::InvalidatedSymbols * Invalidated, ArrayRef<const clang::ento::MemRegion *> ExplicitRegions, const clang::ento::CallEvent * Call, clang::ento::RegionAndSymbolInvalidationTraits & ITraits)
  • private void performTrivialCopy(clang::ento::NodeBuilder & Bldr, clang::ento::ExplodedNode * Pred, const clang::ento::CallEvent & Call)
  • public void printJson(llvm::raw_ostream & Out, clang::ento::ProgramStateRef State, const clang::LocationContext * LCtx, const char * NL, unsigned int Space, bool IsDot) const
  • public clang::ento::ProgramStateRef processAssume(clang::ento::ProgramStateRef state, clang::ento::SVal cond, bool assumption)
  • public void processBeginOfFunction(clang::ento::NodeBuilderContext & BC, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst, const clang::BlockEdge & L)
  • public void processBranch(const clang::Stmt * Condition, clang::ento::NodeBuilderContext & BuilderCtx, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst, const clang::CFGBlock * DstT, const clang::CFGBlock * DstF)
  • public void processCFGBlockEntrance(const clang::BlockEdge & L, clang::ento::NodeBuilderWithSinks & nodeBuilder, clang::ento::ExplodedNode * Pred)
  • public void processCFGElement(const clang::CFGElement E, clang::ento::ExplodedNode * Pred, unsigned int StmtIdx, clang::ento::NodeBuilderContext * Ctx)
  • public void processCallEnter(clang::ento::NodeBuilderContext & BC, clang::CallEnter CE, clang::ento::ExplodedNode * Pred)
  • public void processCallExit(clang::ento::ExplodedNode * Pred)
  • public void processCleanupTemporaryBranch(const clang::CXXBindTemporaryExpr * BTE, clang::ento::NodeBuilderContext & BldCtx, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst, const clang::CFGBlock * DstT, const clang::CFGBlock * DstF)
  • public void processEndOfFunction(clang::ento::NodeBuilderContext & BC, clang::ento::ExplodedNode * Pred, const clang::ReturnStmt * RS = nullptr)
  • public void processEndWorklist()
  • public void processIndirectGoto(clang::ento::IndirectGotoNodeBuilder & builder)
  • private clang::ento::ProgramStateRef processPointerEscapedOnBind(clang::ento::ProgramStateRef State, clang::ento::SVal Loc, clang::ento::SVal Val, const clang::LocationContext * LCtx)
  • public clang::ento::ProgramStateRef processPointerEscapedOnBind(clang::ento::ProgramStateRef State, ArrayRef<std::pair<SVal, SVal>> LocAndVals, const clang::LocationContext * LCtx, clang::ento::PointerEscapeKind Kind, const clang::ento::CallEvent * Call)
  • public inline clang::ento::ProgramStateRef processRegionChange(clang::ento::ProgramStateRef state, const clang::ento::MemRegion * MR, const clang::LocationContext * LCtx)
  • public clang::ento::ProgramStateRef processRegionChanges(clang::ento::ProgramStateRef state, const clang::ento::InvalidatedSymbols * invalidated, ArrayRef<const clang::ento::MemRegion *> ExplicitRegions, ArrayRef<const clang::ento::MemRegion *> Regions, const clang::LocationContext * LCtx, const clang::ento::CallEvent * Call)
  • public void processStaticInitializer(const clang::DeclStmt * DS, clang::ento::NodeBuilderContext & BuilderCtx, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst, const clang::CFGBlock * DstT, const clang::CFGBlock * DstF)
  • public void processSwitch(clang::ento::SwitchNodeBuilder & builder)
  • public void removeDead(clang::ento::ExplodedNode * Node, clang::ento::ExplodedNodeSet & Out, const clang::Stmt * ReferenceStmt, const clang::LocationContext * LC, const clang::Stmt * DiagnosticStmt = nullptr, ProgramPoint::Kind K = ProgramPoint::PreStmtPurgeDeadSymbolsKind)
  • public void removeDeadOnEndOfFunction(clang::ento::NodeBuilderContext & BC, clang::ento::ExplodedNode * Pred, clang::ento::ExplodedNodeSet & Dst)
  • private static clang::ento::ProgramStateRef removeIndexOfElementToConstruct(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx)
  • public static clang::ento::ProgramStateRef removeIterationState(clang::ento::ProgramStateRef State, const clang::ObjCForCollectionStmt * O, const clang::LocationContext * LC)
  • private static clang::ento::ProgramStateRef removePendingInitLoop(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx)
  • private bool replayWithoutInlining(clang::ento::ExplodedNode * P, const clang::LocationContext * CalleeLC)
  • private static clang::ento::ProgramStateRef setIndexOfElementToConstruct(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx, unsigned int Idx)
  • private static clang::ento::ProgramStateRef setPendingInitLoop(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx, unsigned int Idx)
  • public static clang::ento::ProgramStateRef setWhetherHasMoreIteration(clang::ento::ProgramStateRef State, const clang::ObjCForCollectionStmt * O, const clang::LocationContext * LC, bool HasMoreIteraton)
  • private bool shouldInlineArrayConstruction(const clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * CE, const clang::LocationContext * LCtx)
  • private bool shouldInlineCall(const clang::ento::CallEvent & Call, const clang::Decl * D, const clang::ento::ExplodedNode * Pred, const clang::ento::EvalCallOptions & CallOpts = {})
  • private bool shouldRepeatCtorCall(clang::ento::ProgramStateRef State, const clang::CXXConstructExpr * E, const clang::LocationContext * LCtx)
  • public clang::ento::ProgramStateRef updateObjectsUnderConstruction(clang::ento::SVal V, const clang::Expr * E, clang::ento::ProgramStateRef State, const clang::LocationContext * LCtx, const clang::ConstructionContext * CC, const clang::ento::EvalCallOptions & CallOpts)
  • public bool wasBlocksExhausted() const
  • public virtual ~ExprEngine()

Methods

void BifurcateCall(
    const clang::ento::MemRegion* BifurReg,
    const clang::ento::CallEvent& Call,
    const clang::Decl* D,
    clang::ento::NodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred)

Description

Either inline or process the call conservatively (or both), based on DynamicDispatchBifurcation data.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:849

Parameters

const clang::ento::MemRegion* BifurReg
const clang::ento::CallEvent& Call
const clang::Decl* D
clang::ento::NodeBuilder& Bldr
clang::ento::ExplodedNode* Pred

void CreateCXXTemporaryObject(
    const clang::MaterializeTemporaryExpr* ME,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Create a C++ temporary object for an rvalue.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:585

Parameters

const clang::MaterializeTemporaryExpr* ME
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

std::string DumpGraph(
    ArrayRef<const clang::ento::ExplodedNode*>
        Nodes,
    llvm::StringRef Filename = "")

Description

Dump the graph consisting of the given nodes to a specified filename. Generate a temporary filename if it's not provided.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:249

Parameters

ArrayRef<const clang::ento::ExplodedNode*> Nodes
llvm::StringRef Filename = ""

Returns

The filename the graph is written into.

std::string DumpGraph(
    bool trim = false,
    llvm::StringRef Filename = "")

Description

Dump graph to the specified filename. If filename is empty, generate a temporary one.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:244

Parameters

bool trim = false
llvm::StringRef Filename = ""

Returns

The filename the graph is written into.

bool ExecuteWorkList(
    const clang::LocationContext* L,
    unsigned int Steps = 150000)

Description

Returns true if there is still simulation state on the worklist.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:188

Parameters

const clang::LocationContext* L
unsigned int Steps = 150000

bool ExecuteWorkListWithInitialState(
    const clang::LocationContext* L,
    unsigned int Steps,
    clang::ento::ProgramStateRef InitState,
    clang::ento::ExplodedNodeSet& Dst)

Description

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.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:196

Parameters

const clang::LocationContext* L
unsigned int Steps
clang::ento::ProgramStateRef InitState
clang::ento::ExplodedNodeSet& Dst

ExprEngine(
    cross_tu::CrossTranslationUnitContext& CTU,
    clang::ento::AnalysisManager& mgr,
    clang::ento::SetOfConstDecls*
        VisitedCalleesIn,
    clang::ento::FunctionSummariesTy* FS,
    clang::ento::ExprEngine::InliningModes
        HowToInlineIn)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:181

Parameters

cross_tu::CrossTranslationUnitContext& CTU
clang::ento::AnalysisManager& mgr
clang::ento::SetOfConstDecls* VisitedCalleesIn
clang::ento::FunctionSummariesTy* FS
clang::ento::ExprEngine::InliningModes HowToInlineIn

void GenerateAutoTransition(
    clang::ento::ExplodedNode* N)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:236

Parameters

clang::ento::ExplodedNode* N

void GenerateCallExitNode(
    clang::ento::ExplodedNode* N)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:238

Parameters

clang::ento::ExplodedNode* N

void ProcessAutomaticObjDtor(
    const clang::CFGAutomaticObjDtor D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:311

Parameters

const clang::CFGAutomaticObjDtor D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void ProcessBaseDtor(
    const clang::CFGBaseDtor D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:315

Parameters

const clang::CFGBaseDtor D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void ProcessDeleteDtor(
    const clang::CFGDeleteDtor D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:313

Parameters

const clang::CFGDeleteDtor D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void ProcessImplicitDtor(
    const clang::CFGImplicitDtor D,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:307

Parameters

const clang::CFGImplicitDtor D
clang::ento::ExplodedNode* Pred

void ProcessInitializer(
    const clang::CFGInitializer I,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:305

Parameters

const clang::CFGInitializer I
clang::ento::ExplodedNode* Pred

void ProcessLoopExit(
    const clang::Stmt* S,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:303

Parameters

const clang::Stmt* S
clang::ento::ExplodedNode* Pred

void ProcessMemberDtor(
    const clang::CFGMemberDtor D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:317

Parameters

const clang::CFGMemberDtor D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void ProcessNewAllocator(
    const clang::CXXNewExpr* NE,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:309

Parameters

const clang::CXXNewExpr* NE
clang::ento::ExplodedNode* Pred

void ProcessStmt(const clang::Stmt* S,
                 clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:301

Parameters

const clang::Stmt* S
clang::ento::ExplodedNode* Pred

void ProcessTemporaryDtor(
    const clang::CFGTemporaryDtor D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:319

Parameters

const clang::CFGTemporaryDtor D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void ViewGraph(bool trim = false)

Description

Visualize the ExplodedGraph created by executing the simulation.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:253

Parameters

bool trim = false

void ViewGraph(
    ArrayRef<const clang::ento::ExplodedNode*>
        Nodes)

Description

Visualize a trimmed ExplodedGraph that only contains paths to the given nodes.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:257

Parameters

ArrayRef<const clang::ento::ExplodedNode*> Nodes

void Visit(const clang::Stmt* S,
           clang::ento::ExplodedNode* Pred,
           clang::ento::ExplodedNodeSet& Dst)

Description

Visit - Transfer function logic for all statements. Dispatches to other functions that handle specific kinds of statements.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:445

Parameters

const clang::Stmt* S
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitArrayInitLoopExpr(
    const clang::ArrayInitLoopExpr* Ex,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitArrayInitLoopExpr - Transfer function for array init loop.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:448

Parameters

const clang::ArrayInitLoopExpr* Ex
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitArraySubscriptExpr(
    const clang::ArraySubscriptExpr* Ex,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitArraySubscriptExpr - Transfer function for array accesses.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:452

Parameters

const clang::ArraySubscriptExpr* Ex
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitAtomicExpr(
    const clang::AtomicExpr* E,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitAtomicExpr - Transfer function for builtin atomic expressions

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:513

Parameters

const clang::AtomicExpr* E
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitBinaryOperator(
    const clang::BinaryOperator* B,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitBinaryOperator - Transfer function logic for binary operators.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:473

Parameters

const clang::BinaryOperator* B
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitBlockExpr(
    const clang::BlockExpr* BE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitBlockExpr - Transfer function logic for BlockExprs.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:465

Parameters

const clang::BlockExpr* BE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXBindTemporaryExpr(
    const clang::CXXBindTemporaryExpr* BTE,
    clang::ento::ExplodedNodeSet& PreVisit,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:553

Parameters

const clang::CXXBindTemporaryExpr* BTE
clang::ento::ExplodedNodeSet& PreVisit
clang::ento::ExplodedNodeSet& Dst

void VisitCXXCatchStmt(
    const clang::CXXCatchStmt* CS,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:557

Parameters

const clang::CXXCatchStmt* CS
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXConstructExpr(
    const clang::CXXConstructExpr* E,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:563

Parameters

const clang::CXXConstructExpr* E
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXDeleteExpr(
    const clang::CXXDeleteExpr* CDE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:581

Parameters

const clang::CXXDeleteExpr* CDE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXDestructor(
    clang::QualType ObjectType,
    const clang::ento::MemRegion* Dest,
    const clang::Stmt* S,
    bool IsBaseDtor,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::EvalCallOptions& Options)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:569

Parameters

clang::QualType ObjectType
const clang::ento::MemRegion* Dest
const clang::Stmt* S
bool IsBaseDtor
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst
clang::ento::EvalCallOptions& Options

void VisitCXXInheritedCtorInitExpr(
    const clang::CXXInheritedCtorInitExpr* E,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:566

Parameters

const clang::CXXInheritedCtorInitExpr* E
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXNewAllocatorCall(
    const clang::CXXNewExpr* CNE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:574

Parameters

const clang::CXXNewExpr* CNE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXNewExpr(
    const clang::CXXNewExpr* CNE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:578

Parameters

const clang::CXXNewExpr* CNE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCXXThisExpr(
    const clang::CXXThisExpr* TE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:560

Parameters

const clang::CXXThisExpr* TE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCallExpr(
    const clang::CallExpr* CE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitCall - Transfer function for function calls.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:478

Parameters

const clang::CallExpr* CE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCast(const clang::CastExpr* CastE,
               const clang::Expr* Ex,
               clang::ento::ExplodedNode* Pred,
               clang::ento::ExplodedNodeSet& Dst)

Description

VisitCast - Transfer function logic for all casts (implicit and explicit).

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:482

Parameters

const clang::CastExpr* CastE
const clang::Expr* Ex
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCommonDeclRefExpr(
    const clang::Expr* DR,
    const clang::NamedDecl* D,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Transfer function logic for DeclRefExprs and BlockDeclRefExprs.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:490

Parameters

const clang::Expr* DR
const clang::NamedDecl* D
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitCompoundLiteralExpr(
    const clang::CompoundLiteralExpr* CL,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitCompoundLiteralExpr - Transfer function logic for compound literals.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:486

Parameters

const clang::CompoundLiteralExpr* CL
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitDeclStmt(
    const clang::DeclStmt* DS,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitDeclStmt - Transfer function logic for DeclStmts.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:494

Parameters

const clang::DeclStmt* DS
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitGCCAsmStmt(
    const clang::GCCAsmStmt* A,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitGCCAsmStmt - Transfer function logic for inline asm.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:457

Parameters

const clang::GCCAsmStmt* A
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitGuardedExpr(
    const clang::Expr* Ex,
    const clang::Expr* L,
    const clang::Expr* R,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitGuardedExpr - Transfer function logic for ?, __builtin_choose

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:498

Parameters

const clang::Expr* Ex
const clang::Expr* L
const clang::Expr* R
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitIncrementDecrementOperator(
    const clang::UnaryOperator* U,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Handle ++ and -- (both pre- and post-increment).

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:549

Parameters

const clang::UnaryOperator* U
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitInitListExpr(
    const clang::InitListExpr* E,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:501

Parameters

const clang::InitListExpr* E
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitLambdaExpr(
    const clang::LambdaExpr* LE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitLambdaExpr - Transfer function logic for LambdaExprs.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:469

Parameters

const clang::LambdaExpr* LE
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitLogicalExpr(
    const clang::BinaryOperator* B,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitLogicalExpr - Transfer function logic for ' & & ', '||'

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:505

Parameters

const clang::BinaryOperator* B
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitLvalObjCIvarRefExpr(
    const clang::ObjCIvarRefExpr* DR,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Transfer function logic for computing the lvalue of an Objective-C ivar.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:521

Parameters

const clang::ObjCIvarRefExpr* DR
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitMSAsmStmt(
    const clang::MSAsmStmt* A,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitMSAsmStmt - Transfer function logic for MS inline asm.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:461

Parameters

const clang::MSAsmStmt* A
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitMemberExpr(
    const clang::MemberExpr* M,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitMemberExpr - Transfer function for member expressions.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:509

Parameters

const clang::MemberExpr* M
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitObjCAtSynchronizedStmt(
    const clang::ObjCAtSynchronizedStmt* S,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Transfer function logic for ObjCAtSynchronizedStmts.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:517

Parameters

const clang::ObjCAtSynchronizedStmt* S
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitObjCForCollectionStmt(
    const clang::ObjCForCollectionStmt* S,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitObjCForCollectionStmt - Transfer function logic for ObjCForCollectionStmt.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:526

Parameters

const clang::ObjCForCollectionStmt* S
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitObjCMessage(
    const clang::ObjCMessageExpr* ME,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:529

Parameters

const clang::ObjCMessageExpr* ME
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitOffsetOfExpr(
    const clang::OffsetOfExpr* Ex,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitOffsetOfExpr - Transfer function for offsetof.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:537

Parameters

const clang::OffsetOfExpr* Ex
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitReturnStmt(
    const clang::ReturnStmt* R,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitReturnStmt - Transfer function logic for return statements.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:533

Parameters

const clang::ReturnStmt* R
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitUnaryExprOrTypeTraitExpr(
    const clang::UnaryExprOrTypeTraitExpr* Ex,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitUnaryExprOrTypeTraitExpr - Transfer function for sizeof.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:541

Parameters

const clang::UnaryExprOrTypeTraitExpr* Ex
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

void VisitUnaryOperator(
    const clang::UnaryOperator* B,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

VisitUnaryOperator - Transfer function logic for unary operators.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:545

Parameters

const clang::UnaryOperator* B
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

static clang::ento::ProgramStateRef
addObjectUnderConstruction(
    clang::ento::ProgramStateRef State,
    const clang::ConstructionContextItem& Item,
    const clang::LocationContext* LC,
    clang::ento::SVal V)

Description

Store the location of a C++ object corresponding to a statement until the statement is actually encountered. For example, if a DeclStmt has CXXConstructExpr as its initializer, the object would be considered to be "under construction" between CXXConstructExpr and DeclStmt. This allows, among other things, to keep bindings to variable's fields made within the constructor alive until its declaration actually goes into scope.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:944

Parameters

clang::ento::ProgramStateRef State
const clang::ConstructionContextItem& Item
const clang::LocationContext* LC
clang::ento::SVal V

void anchor()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:124

static bool areAllObjectsFullyConstructed(
    clang::ento::ProgramStateRef State,
    const clang::LocationContext* FromLC,
    const clang::LocationContext* ToLC)

Description

Check if all objects under construction have been fully constructed for the given context range (including FromLC, not including ToLC). This is useful for assertions. Also checks if elided destructors were cleaned up.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:979

Parameters

clang::ento::ProgramStateRef State
const clang::LocationContext* FromLC
const clang::LocationContext* ToLC

clang::ento::ProgramStateRef bindReturnValue(
    const clang::ento::CallEvent& Call,
    const clang::LocationContext* LCtx,
    clang::ento::ProgramStateRef State)

Description

Create a new state in which the call return value is binded to the call origin expression.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:702

Parameters

const clang::ento::CallEvent& Call
const clang::LocationContext* LCtx
clang::ento::ProgramStateRef State

static clang::ento::ProgramStateRef
cleanupElidedDestructor(
    clang::ento::ProgramStateRef State,
    const clang::CXXBindTemporaryExpr* BTE,
    const clang::LocationContext* LC)

Description

Stop tracking the destructor that corresponds to an elided constructor.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:964

Parameters

clang::ento::ProgramStateRef State
const clang::CXXBindTemporaryExpr* BTE
const clang::LocationContext* LC

clang::ento::SVal computeObjectUnderConstruction(
    const clang::Expr* E,
    clang::ento::ProgramStateRef State,
    const clang::LocationContext* LCtx,
    const clang::ConstructionContext* CC,
    clang::ento::EvalCallOptions& CallOpts,
    unsigned int Idx = 0)

Description

Find location of the object that is being constructed by a given constructor. This should ideally always succeed but due to not being fully implemented it sometimes indicates that it failed via its out-parameter CallOpts; in such cases a fake temporary region is returned, which is better than nothing but does not represent the actual behavior of the program. The Idx parameter is used if we construct an array of objects. In that case it points to the index of the continous memory region. E.g.: For `int arr[4]` this index can be 0,1,2,3. For `int arr2[3][3]` this index can be 0,1,...,7,8. A multi-dimensional array is also a continous memory location in a row major order, so for arr[0][0] Idx is 0 and for arr[2][2] Idx is 8.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:729

Parameters

const clang::Expr* E
clang::ento::ProgramStateRef State
const clang::LocationContext* LCtx
const clang::ConstructionContext* CC
clang::ento::EvalCallOptions& CallOpts
unsigned int Idx = 0

void conservativeEvalCall(
    const clang::ento::CallEvent& Call,
    clang::ento::NodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef State)

Description

Conservatively evaluate call by invalidating regions and binding a conjured return value.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:844

Parameters

const clang::ento::CallEvent& Call
clang::ento::NodeBuilder& Bldr
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef State

clang::ento::ProgramStateRef
createTemporaryRegionIfNeeded(
    clang::ento::ProgramStateRef State,
    const clang::LocationContext* LC,
    const clang::Expr* InitWithAdjustments,
    const clang::Expr* Result = nullptr,
    const clang::ento::SubRegion**
        OutRegionWithAdjustments = nullptr)

Description

If the value of the given expression \p InitWithAdjustments is a NonLoc, copy it into a new temporary object region, and replace the value of the expression with that. If \p Result is provided, the new region will be bound to this expression instead of \p InitWithAdjustments. Returns the temporary region with adjustments into the optional OutRegionWithAdjustments out-parameter if a new region was indeed needed, otherwise sets it to nullptr.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:870

Parameters

clang::ento::ProgramStateRef State
const clang::LocationContext* LC
const clang::Expr* InitWithAdjustments
const clang::Expr* Result = nullptr
const clang::ento::SubRegion** OutRegionWithAdjustments = nullptr

void ctuBifurcate(
    const clang::ento::CallEvent& Call,
    const clang::Decl* D,
    clang::ento::NodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef State)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:836

Parameters

const clang::ento::CallEvent& Call
const clang::Decl* D
clang::ento::NodeBuilder& Bldr
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef State

void defaultEvalCall(
    clang::ento::NodeBuilder& B,
    clang::ento::ExplodedNode* Pred,
    const clang::ento::CallEvent& Call,
    const clang::ento::EvalCallOptions& CallOpts =
        {})

Description

Default implementation of call evaluation.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:712

Parameters

clang::ento::NodeBuilder& B
clang::ento::ExplodedNode* Pred
const clang::ento::CallEvent& Call
const clang::ento::EvalCallOptions& CallOpts = {}

static clang::ento::ProgramStateRef
elideDestructor(
    clang::ento::ProgramStateRef State,
    const clang::CXXBindTemporaryExpr* BTE,
    const clang::LocationContext* LC)

Description

If the given expression corresponds to a temporary that was used for passing into an elidable copy/move constructor and that constructor was actually elided, track that we also need to elide the destructor.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:958

Parameters

clang::ento::ProgramStateRef State
const clang::CXXBindTemporaryExpr* BTE
const clang::LocationContext* LC

void enqueueEndOfPath(
    clang::ento::ExplodedNodeSet& S)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:237

Parameters

clang::ento::ExplodedNodeSet& S

clang::ento::ProgramStateRef escapeValues(
    clang::ento::ProgramStateRef State,
    ArrayRef<clang::ento::SVal> Vs,
    clang::ento::PointerEscapeKind K,
    const clang::ento::CallEvent* Call =
        nullptr) const

Description

A simple wrapper when you only need to notify checkers of pointer-escape of some values.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:668

Parameters

clang::ento::ProgramStateRef State
ArrayRef<clang::ento::SVal> Vs
clang::ento::PointerEscapeKind K
const clang::ento::CallEvent* Call = nullptr

clang::ento::SVal evalBinOp(
    clang::ento::ProgramStateRef ST,
    BinaryOperator::Opcode Op,
    clang::ento::SVal LHS,
    clang::ento::SVal RHS,
    clang::QualType T)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:615

Parameters

clang::ento::ProgramStateRef ST
BinaryOperator::Opcode Op
clang::ento::SVal LHS
clang::ento::SVal RHS
clang::QualType T

void evalBind(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::Stmt* StoreE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::SVal location,
    clang::ento::SVal Val,
    bool atDeclInit = false,
    const clang::ProgramPoint* PP = nullptr)

Description

evalBind - Handle the semantics of binding a value to a specific location. This method is used by evalStore, VisitDeclStmt, and others.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:657

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::Stmt* StoreE
clang::ento::ExplodedNode* Pred
clang::ento::SVal location
clang::ento::SVal Val
bool atDeclInit = false
const clang::ProgramPoint* PP = nullptr

void evalCall(clang::ento::ExplodedNodeSet& Dst,
              clang::ento::ExplodedNode* Pred,
              const clang::ento::CallEvent& Call)

Description

Evaluate a call, running pre- and post-call checkers and allowing checkers to be responsible for handling the evaluation of the call itself.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:708

Parameters

clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNode* Pred
const clang::ento::CallEvent& Call

void evalEagerlyAssumeBinOpBifurcation(
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::ExplodedNodeSet& Src,
    const clang::Expr* Ex)

Description

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.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:592

Parameters

clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNodeSet& Src
const clang::Expr* Ex

void evalLoad(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::Expr* NodeEx,
    const clang::Expr* BoundExpr,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef St,
    clang::ento::SVal location,
    const clang::ProgramPointTag* tag = nullptr,
    clang::QualType LoadTy = clang::QualType())

Description

Simulate a read of the result of Ex.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:679

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::Expr* NodeEx
const clang::Expr* BoundExpr
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef St
clang::ento::SVal location
const clang::ProgramPointTag* tag = nullptr
clang::QualType LoadTy = clang::QualType()

void evalLoadCommon(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::Expr* NodeEx,
    const clang::Expr* BoundEx,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef St,
    clang::ento::SVal location,
    const clang::ProgramPointTag* tag,
    clang::QualType LoadTy)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:764

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::Expr* NodeEx
const clang::Expr* BoundEx
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef St
clang::ento::SVal location
const clang::ProgramPointTag* tag
clang::QualType LoadTy

void evalLocation(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::Stmt* NodeEx,
    const clang::Stmt* BoundEx,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef St,
    clang::ento::SVal location,
    bool isLoad)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:773

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::Stmt* NodeEx
const clang::Stmt* BoundEx
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef St
clang::ento::SVal location
bool isLoad

void evalStore(
    clang::ento::ExplodedNodeSet& Dst,
    const clang::Expr* AssignE,
    const clang::Expr* StoreE,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef St,
    clang::ento::SVal TargetLV,
    clang::ento::SVal Val,
    const clang::ProgramPointTag* tag = nullptr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:690

Parameters

clang::ento::ExplodedNodeSet& Dst
const clang::Expr* AssignE
const clang::Expr* StoreE
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef St
clang::ento::SVal TargetLV
clang::ento::SVal Val
const clang::ProgramPointTag* tag = nullptr

void examineStackFrames(
    const clang::Decl* D,
    const clang::LocationContext* LCtx,
    bool& IsRecursive,
    unsigned int& StackDepth)

Description

Count the stack depth and determine if the call is recursive.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:782

Parameters

const clang::Decl* D
const clang::LocationContext* LCtx
bool& IsRecursive
unsigned int& StackDepth

const clang::CXXConstructExpr*
findDirectConstructorForCurrentCFGElement()

Description

For a DeclStmt or CXXInitCtorInitializer, walk backward in the current CFG block to find the constructor expression that directly constructed into the storage for this statement. Returns null if the constructor for this statement created a temporary object region rather than directly constructing into an existing region.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:891

void finishArgumentConstruction(
    clang::ento::ExplodedNodeSet& Dst,
    clang::ento::ExplodedNode* Pred,
    const clang::ento::CallEvent& Call)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:761

Parameters

clang::ento::ExplodedNodeSet& Dst
clang::ento::ExplodedNode* Pred
const clang::ento::CallEvent& Call

clang::ento::ProgramStateRef
finishArgumentConstruction(
    clang::ento::ProgramStateRef State,
    const clang::ento::CallEvent& Call)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:759

Parameters

clang::ento::ProgramStateRef State
const clang::ento::CallEvent& Call

static clang::ento::ProgramStateRef
finishObjectConstruction(
    clang::ento::ProgramStateRef State,
    const clang::ConstructionContextItem& Item,
    const clang::LocationContext* LC)

Description

Mark the object sa fully constructed, cleaning up the state trait that tracks objects under construction.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:951

Parameters

clang::ento::ProgramStateRef State
const clang::ConstructionContextItem& Item
const clang::LocationContext* LC

clang::AnalysisDeclContextManager&
getAnalysisDeclContextManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:207

clang::ento::AnalysisManager& getAnalysisManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:205

clang::ento::BasicValueFactory& getBasicVals()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:426

clang::ento::BugReporter& getBugReporter()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:217

const clang::ento::NodeBuilderContext&
getBuilderContext()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:224

clang::ento::CheckerManager& getCheckerManager()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:211

clang::ento::ConstraintManager&
getConstraintManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:421

clang::ASTContext& getContext() const

Description

getContext - Return the ASTContext associated with this analysis.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:203

const clang::ento::CoreEngine& getCoreEngine()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:440

cross_tu::CrossTranslationUnitContext*
getCrossTranslationUnitContext()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:220

clang::CFGElement getCurrentCFGElement()

Description

Return the CFG element corresponding to the worklist element that is currently being processed by ExprEngine.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:696

DataTag::Factory& getDataTags()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:433

clang::ento::ExplodedGraph& getGraph()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:263

const clang::ento::ExplodedGraph& getGraph() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:264

static Optional<unsigned int>
getIndexOfElementToConstruct(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx)

Description

Retreives which element is being constructed in a non POD type array.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:622

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx

clang::ento::ProgramStateRef getInitialState(
    const clang::LocationContext* InitLoc)

Description

getInitialState - Return the initial state used for the root vertex in the ExplodedGraph.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:261

Parameters

const clang::LocationContext* InitLoc

static Optional<clang::ento::SVal>
getObjectUnderConstruction(
    clang::ento::ProgramStateRef State,
    const clang::ConstructionContextItem& Item,
    const clang::LocationContext* LC)

Description

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 \p Item in most cases.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:634

Parameters

clang::ento::ProgramStateRef State
const clang::ConstructionContextItem& Item
const clang::LocationContext* LC

static Optional<unsigned int> getPendingInitLoop(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx)

Description

Retreives the size of the array in the pending ArrayInitLoopExpr.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:626

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx

clang::ento::MemRegionManager& getRegionManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:431

const clang::LocationContext*
getRootLocationContext() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:231

clang::ento::SValBuilder& getSValBuilder()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:215

clang::ento::ProgramStateManager&
getStateManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:417

const clang::Stmt* getStmt() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:229

clang::ento::StoreManager& getStoreManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:419

clang::ento::SymbolManager& getSymbolManager()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:430

static std::pair<const ProgramPointTag*,
                 const ProgramPointTag*>
geteagerlyAssumeBinOpBifurcationTags()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:596

std::pair<ProgramStateRef, SVal>
handleConstructionContext(
    const clang::Expr* E,
    clang::ento::ProgramStateRef State,
    const clang::LocationContext* LCtx,
    const clang::ConstructionContext* CC,
    clang::ento::EvalCallOptions& CallOpts,
    unsigned int Idx = 0)

Description

A convenient wrapper around computeObjectUnderConstruction and updateObjectsUnderConstruction.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:747

Parameters

const clang::Expr* E
clang::ento::ProgramStateRef State
const clang::LocationContext* LCtx
const clang::ConstructionContext* CC
clang::ento::EvalCallOptions& CallOpts
unsigned int Idx = 0

void handleConstructor(
    const clang::Expr* E,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Common code that handles either a CXXConstructExpr or a CXXInheritedCtorInitExpr.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:895

Parameters

const clang::Expr* E
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

clang::ento::ProgramStateRef handleLValueBitCast(
    clang::ento::ProgramStateRef state,
    const clang::Expr* Ex,
    const clang::LocationContext* LCtx,
    clang::QualType T,
    clang::QualType ExTy,
    const clang::CastExpr* CastE,
    clang::ento::StmtNodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:598

Parameters

clang::ento::ProgramStateRef state
const clang::Expr* Ex
const clang::LocationContext* LCtx
clang::QualType T
clang::QualType ExTy
const clang::CastExpr* CastE
clang::ento::StmtNodeBuilder& Bldr
clang::ento::ExplodedNode* Pred

clang::ento::ProgramStateRef handleLVectorSplat(
    clang::ento::ProgramStateRef state,
    const clang::LocationContext* LCtx,
    const clang::CastExpr* CastE,
    clang::ento::StmtNodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:604

Parameters

clang::ento::ProgramStateRef state
const clang::LocationContext* LCtx
const clang::CastExpr* CastE
clang::ento::StmtNodeBuilder& Bldr
clang::ento::ExplodedNode* Pred

void handleUOExtension(
    ExplodedNodeSet::iterator I,
    const clang::UnaryOperator* U,
    clang::ento::StmtNodeBuilder& Bldr)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:610

Parameters

ExplodedNodeSet::iterator I
const clang::UnaryOperator* U
clang::ento::StmtNodeBuilder& Bldr

bool hasEmptyWorkList() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:437

static bool hasMoreIteration(
    clang::ento::ProgramStateRef State,
    const clang::ObjCForCollectionStmt* O,
    const clang::LocationContext* LC)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:911

Parameters

clang::ento::ProgramStateRef State
const clang::ObjCForCollectionStmt* O
const clang::LocationContext* LC

bool hasWorkRemaining() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:438

void inlineCall(
    clang::ento::WorkList* WList,
    const clang::ento::CallEvent& Call,
    const clang::Decl* D,
    clang::ento::NodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ProgramStateRef State)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:833

Parameters

clang::ento::WorkList* WList
const clang::ento::CallEvent& Call
const clang::Decl* D
clang::ento::NodeBuilder& Bldr
clang::ento::ExplodedNode* Pred
clang::ento::ProgramStateRef State

static bool isDestructorElided(
    clang::ento::ProgramStateRef State,
    const clang::CXXBindTemporaryExpr* BTE,
    const clang::LocationContext* LC)

Description

Returns true if the given expression corresponds to a temporary that was constructed for passing into an elidable copy/move constructor and that constructor was actually elided.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:971

Parameters

clang::ento::ProgramStateRef State
const clang::CXXBindTemporaryExpr* BTE
const clang::LocationContext* LC

bool isHuge(clang::AnalysisDeclContext* ADC) const

Description

See if the given AnalysisDeclContext is built for a function that we should never inline because it's legit gigantic.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:811

Parameters

clang::AnalysisDeclContext* ADC

bool isLarge(
    clang::AnalysisDeclContext* ADC) const

Description

See if the given AnalysisDeclContext is built for a function that we should inline carefully because it looks pretty large.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:807

Parameters

clang::AnalysisDeclContext* ADC

bool isSecondPhaseCTU()

Description

Returns true if the CTU analysis is running its second phase.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:840

bool isSmall(
    clang::AnalysisDeclContext* ADC) const

Description

See if the given AnalysisDeclContext is built for a function that we should always inline simply because it's small enough. Apart from "small" functions, we also have "large" functions (cf. isLarge()), some of which are huge (cf. isHuge()), and we classify the remaining functions as "medium".

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:803

Parameters

clang::AnalysisDeclContext* ADC

static clang::ento::SVal makeElementRegion(
    clang::ento::ProgramStateRef State,
    clang::ento::SVal LValue,
    clang::QualType& Ty,
    bool& IsArray,
    unsigned int Idx = 0)

Description

Returns a region representing the `Idx`th element of a (possibly multi-dimensional) array, for the purposes of element construction or destruction. On return, \p Ty will be set to the base type of the array. If the type is not an array type at all, the original value is returned. Otherwise the "IsArray" flag is set.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:883

Parameters

clang::ento::ProgramStateRef State
clang::ento::SVal LValue
clang::QualType& Ty
bool& IsArray
unsigned int Idx = 0

clang::ento::ExprEngine::CallInlinePolicy
mayInlineCallKind(
    const clang::ento::CallEvent& Call,
    const clang::ento::ExplodedNode* Pred,
    clang::AnalyzerOptions& Opts,
    const clang::ento::EvalCallOptions& CallOpts)

Description

See if a particular call should be inlined, by only looking at the call event and the current state of analysis.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:793

Parameters

const clang::ento::CallEvent& Call
const clang::ento::ExplodedNode* Pred
clang::AnalyzerOptions& Opts
const clang::ento::EvalCallOptions& CallOpts

bool mayInlineDecl(
    clang::AnalysisDeclContext* ADC) const

Description

See if the given AnalysisDeclContext is built for a function that we should inline, just by looking at the declaration of the function.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:815

Parameters

clang::AnalysisDeclContext* ADC

clang::ento::ProgramStateRef
notifyCheckersOfPointerEscape(
    clang::ento::ProgramStateRef State,
    const clang::ento::InvalidatedSymbols*
        Invalidated,
    ArrayRef<const clang::ento::MemRegion*>
        ExplicitRegions,
    const clang::ento::CallEvent* Call,
    clang::ento::
        RegionAndSymbolInvalidationTraits&
            ITraits)

Description

Call PointerEscape callback when a value escapes as a result of region invalidation.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:647

Parameters

clang::ento::ProgramStateRef State
const clang::ento::InvalidatedSymbols* Invalidated
ArrayRef<const clang::ento::MemRegion*> ExplicitRegions
const clang::ento::CallEvent* Call
clang::ento::RegionAndSymbolInvalidationTraits& ITraits
Specifies invalidation traits for regions/symbols.

void performTrivialCopy(
    clang::ento::NodeBuilder& Bldr,
    clang::ento::ExplodedNode* Pred,
    const clang::ento::CallEvent& Call)

Description

Models a trivial copy or move constructor or trivial assignment operator call with a simple bind.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:857

Parameters

clang::ento::NodeBuilder& Bldr
clang::ento::ExplodedNode* Pred
const clang::ento::CallEvent& Call

void printJson(llvm::raw_ostream& Out,
               clang::ento::ProgramStateRef State,
               const clang::LocationContext* LCtx,
               const char* NL,
               unsigned int Space,
               bool IsDot) const

Description

printJson - Called by ProgramStateManager to print checker-specific data.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:413

Parameters

llvm::raw_ostream& Out
clang::ento::ProgramStateRef State
const clang::LocationContext* LCtx
const char* NL
unsigned int Space
bool IsDot

clang::ento::ProgramStateRef processAssume(
    clang::ento::ProgramStateRef state,
    clang::ento::SVal cond,
    bool assumption)

Description

evalAssume - Callback function invoked by the ConstraintManager when making assumptions about state values.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:392

Parameters

clang::ento::ProgramStateRef state
clang::ento::SVal cond
bool assumption

void processBeginOfFunction(
    clang::ento::NodeBuilderContext& BC,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::BlockEdge& L)

Description

Called by CoreEngine. Used to notify checkers that processing a function has begun. Called for both inlined and and top-level functions.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:364

Parameters

clang::ento::NodeBuilderContext& BC
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst
const clang::BlockEdge& L

void processBranch(
    const clang::Stmt* Condition,
    clang::ento::NodeBuilderContext& BuilderCtx,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::CFGBlock* DstT,
    const clang::CFGBlock* DstF)

Description

ProcessBranch - Called by CoreEngine. Used to generate successor nodes by processing the 'effects' of a branch condition.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:329

Parameters

const clang::Stmt* Condition
clang::ento::NodeBuilderContext& BuilderCtx
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst
const clang::CFGBlock* DstT
const clang::CFGBlock* DstF

void processCFGBlockEntrance(
    const clang::BlockEdge& L,
    clang::ento::NodeBuilderWithSinks&
        nodeBuilder,
    clang::ento::ExplodedNode* Pred)

Description

Called by CoreEngine when processing the entrance of a CFGBlock.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:323

Parameters

const clang::BlockEdge& L
clang::ento::NodeBuilderWithSinks& nodeBuilder
clang::ento::ExplodedNode* Pred

void processCFGElement(
    const clang::CFGElement E,
    clang::ento::ExplodedNode* Pred,
    unsigned int StmtIdx,
    clang::ento::NodeBuilderContext* Ctx)

Description

processCFGElement - Called by CoreEngine. Used to generate new successor nodes by processing the 'effects' of a CFG element.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:298

Parameters

const clang::CFGElement E
clang::ento::ExplodedNode* Pred
unsigned int StmtIdx
clang::ento::NodeBuilderContext* Ctx

void processCallEnter(
    clang::ento::NodeBuilderContext& BC,
    clang::CallEnter CE,
    clang::ento::ExplodedNode* Pred)

Description

Generate the entry node of the callee.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:380

Parameters

clang::ento::NodeBuilderContext& BC
clang::CallEnter CE
clang::ento::ExplodedNode* Pred

void processCallExit(
    clang::ento::ExplodedNode* Pred)

Description

Generate the sequence of nodes that simulate the call exit and the post visit for CallExpr.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:385

Parameters

clang::ento::ExplodedNode* Pred

void processCleanupTemporaryBranch(
    const clang::CXXBindTemporaryExpr* BTE,
    clang::ento::NodeBuilderContext& BldCtx,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::CFGBlock* DstT,
    const clang::CFGBlock* DstF)

Description

Called by CoreEngine. Used to generate successor nodes for temporary destructors depending on whether the corresponding constructor was visited.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:339

Parameters

const clang::CXXBindTemporaryExpr* BTE
clang::ento::NodeBuilderContext& BldCtx
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst
const clang::CFGBlock* DstT
const clang::CFGBlock* DstF

void processEndOfFunction(
    clang::ento::NodeBuilderContext& BC,
    clang::ento::ExplodedNode* Pred,
    const clang::ReturnStmt* RS = nullptr)

Description

Called by CoreEngine. Used to notify checkers that processing a function has ended. Called for both inlined and and top-level functions.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:370

Parameters

clang::ento::NodeBuilderContext& BC
clang::ento::ExplodedNode* Pred
const clang::ReturnStmt* RS = nullptr

void processEndWorklist()

Description

Called by CoreEngine when the analysis worklist has terminated.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:388

void processIndirectGoto(
    clang::ento::IndirectGotoNodeBuilder& builder)

Description

processIndirectGoto - Called by CoreEngine. Used to generate successor nodes by processing the 'effects' of a computed goto jump.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:356

Parameters

clang::ento::IndirectGotoNodeBuilder& builder

clang::ento::ProgramStateRef
processPointerEscapedOnBind(
    clang::ento::ProgramStateRef State,
    clang::ento::SVal Loc,
    clang::ento::SVal Val,
    const clang::LocationContext* LCtx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:662

Parameters

clang::ento::ProgramStateRef State
clang::ento::SVal Loc
clang::ento::SVal Val
const clang::LocationContext* LCtx

clang::ento::ProgramStateRef
processPointerEscapedOnBind(
    clang::ento::ProgramStateRef State,
    ArrayRef<std::pair<SVal, SVal>> LocAndVals,
    const clang::LocationContext* LCtx,
    clang::ento::PointerEscapeKind Kind,
    const clang::ento::CallEvent* Call)

Description

Call PointerEscape callback when a value escapes as a result of bind.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:639

Parameters

clang::ento::ProgramStateRef State
ArrayRef<std::pair<SVal, SVal>> LocAndVals
const clang::LocationContext* LCtx
clang::ento::PointerEscapeKind Kind
const clang::ento::CallEvent* Call

inline clang::ento::ProgramStateRef
processRegionChange(
    clang::ento::ProgramStateRef state,
    const clang::ento::MemRegion* MR,
    const clang::LocationContext* LCtx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:406

Parameters

clang::ento::ProgramStateRef state
const clang::ento::MemRegion* MR
const clang::LocationContext* LCtx

clang::ento::ProgramStateRef processRegionChanges(
    clang::ento::ProgramStateRef state,
    const clang::ento::InvalidatedSymbols*
        invalidated,
    ArrayRef<const clang::ento::MemRegion*>
        ExplicitRegions,
    ArrayRef<const clang::ento::MemRegion*>
        Regions,
    const clang::LocationContext* LCtx,
    const clang::ento::CallEvent* Call)

Description

processRegionChanges - Called by ProgramStateManager whenever a change is made to the store. Used to update checkers that track region values.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:398

Parameters

clang::ento::ProgramStateRef state
const clang::ento::InvalidatedSymbols* invalidated
ArrayRef<const clang::ento::MemRegion*> ExplicitRegions
ArrayRef<const clang::ento::MemRegion*> Regions
const clang::LocationContext* LCtx
const clang::ento::CallEvent* Call

void processStaticInitializer(
    const clang::DeclStmt* DS,
    clang::ento::NodeBuilderContext& BuilderCtx,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst,
    const clang::CFGBlock* DstT,
    const clang::CFGBlock* DstF)

Description

Called by CoreEngine. Used to processing branching behavior at static initializers.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:347

Parameters

const clang::DeclStmt* DS
clang::ento::NodeBuilderContext& BuilderCtx
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst
const clang::CFGBlock* DstT
const clang::CFGBlock* DstF

void processSwitch(
    clang::ento::SwitchNodeBuilder& builder)

Description

ProcessSwitch - Called by CoreEngine. Used to generate successor nodes by processing the 'effects' of a switch statement.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:360

Parameters

clang::ento::SwitchNodeBuilder& builder

void removeDead(
    clang::ento::ExplodedNode* Node,
    clang::ento::ExplodedNodeSet& Out,
    const clang::Stmt* ReferenceStmt,
    const clang::LocationContext* LC,
    const clang::Stmt* DiagnosticStmt = nullptr,
    ProgramPoint::Kind K =
        ProgramPoint::PreStmtPurgeDeadSymbolsKind)

Description

Run the analyzer's garbage collection - remove dead symbols and bindings from the state. Checkers can participate in this process with two callbacks:\c checkLiveSymbols and \c checkDeadSymbols. See the CheckerDocumentation class for more information.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:291

Parameters

clang::ento::ExplodedNode* Node
The predecessor node, from which the processing should start.
clang::ento::ExplodedNodeSet& Out
The returned set of output nodes.
const clang::Stmt* 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.
const clang::LocationContext* LC
The location context of the \p 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.
const clang::Stmt* DiagnosticStmt = nullptr
Used as a location for any warnings that should occur while removing the dead (e.g. leaks). By default, the\p ReferenceStmt is used.
ProgramPoint::Kind K = ProgramPoint::PreStmtPurgeDeadSymbolsKind
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\p ReferenceStmt must either be a ReturnStmt or \c NULL. Otherwise, it must be ProgramPoint::PreStmtPurgeDeadSymbolsKind (the default) and \p ReferenceStmt must be valid (non-null).

void removeDeadOnEndOfFunction(
    clang::ento::NodeBuilderContext& BC,
    clang::ento::ExplodedNode* Pred,
    clang::ento::ExplodedNodeSet& Dst)

Description

Remove dead bindings/symbols before exiting a function.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:375

Parameters

clang::ento::NodeBuilderContext& BC
clang::ento::ExplodedNode* Pred
clang::ento::ExplodedNodeSet& Dst

static clang::ento::ProgramStateRef
removeIndexOfElementToConstruct(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:922

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx

static clang::ento::ProgramStateRef
removeIterationState(
    clang::ento::ProgramStateRef State,
    const clang::ObjCForCollectionStmt* O,
    const clang::LocationContext* LC)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:908

Parameters

clang::ento::ProgramStateRef State
const clang::ObjCForCollectionStmt* O
const clang::LocationContext* LC

static clang::ento::ProgramStateRef
removePendingInitLoop(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:932

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx

bool replayWithoutInlining(
    clang::ento::ExplodedNode* P,
    const clang::LocationContext* CalleeLC)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:853

Parameters

clang::ento::ExplodedNode* P
const clang::LocationContext* CalleeLC

static clang::ento::ProgramStateRef
setIndexOfElementToConstruct(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx,
    unsigned int Idx)

Description

Assuming we construct an array of non-POD types, this method allows us to store which element is to be constructed next.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:918

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx
unsigned int Idx

static clang::ento::ProgramStateRef
setPendingInitLoop(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx,
    unsigned int Idx)

Description

Sets the size of the array in a pending ArrayInitLoopExpr.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:927

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx
unsigned int Idx

static clang::ento::ProgramStateRef
setWhetherHasMoreIteration(
    clang::ento::ProgramStateRef State,
    const clang::ObjCForCollectionStmt* O,
    const clang::LocationContext* LC,
    bool HasMoreIteraton)

Description

Note whether this loop has any more iteratios to model. These methods are essentially an interface for a GDM trait. Further reading in ExprEngine::VisitObjCForCollectionStmt().

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:903

Parameters

clang::ento::ProgramStateRef State
const clang::ObjCForCollectionStmt* O
const clang::LocationContext* LC
bool HasMoreIteraton

bool shouldInlineArrayConstruction(
    const clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* CE,
    const clang::LocationContext* LCtx)

Description

Checks whether our policies allow us to inline a non-POD type array construction.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:824

Parameters

const clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* CE
const clang::LocationContext* LCtx

bool shouldInlineCall(
    const clang::ento::CallEvent& Call,
    const clang::Decl* D,
    const clang::ento::ExplodedNode* Pred,
    const clang::ento::EvalCallOptions& CallOpts =
        {})

Description

Checks our policies and decides weither the given call should be inlined.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:818

Parameters

const clang::ento::CallEvent& Call
const clang::Decl* D
const clang::ento::ExplodedNode* Pred
const clang::ento::EvalCallOptions& CallOpts = {}

bool shouldRepeatCtorCall(
    clang::ento::ProgramStateRef State,
    const clang::CXXConstructExpr* E,
    const clang::LocationContext* LCtx)

Description

Checks whether we construct an array of non-POD type, and decides if the constructor should be inkoved once again.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:830

Parameters

clang::ento::ProgramStateRef State
const clang::CXXConstructExpr* E
const clang::LocationContext* LCtx

clang::ento::ProgramStateRef
updateObjectsUnderConstruction(
    clang::ento::SVal V,
    const clang::Expr* E,
    clang::ento::ProgramStateRef State,
    const clang::LocationContext* LCtx,
    const clang::ConstructionContext* CC,
    const clang::ento::EvalCallOptions& CallOpts)

Description

Update the program state with all the path-sensitive information that's necessary to perform construction of an object with a given syntactic construction context. V and CallOpts have to be obtained from computeObjectUnderConstruction() invoked with the same set of the remaining arguments (E, State, LCtx, CC).

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:740

Parameters

clang::ento::SVal V
const clang::Expr* E
clang::ento::ProgramStateRef State
const clang::LocationContext* LCtx
const clang::ConstructionContext* CC
const clang::ento::EvalCallOptions& CallOpts

bool wasBlocksExhausted() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:436

virtual ~ExprEngine()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:185