clang
7.0.0svn
|
#include "clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h"
Classes | |
class | Auditor |
Public Types | |
using | succ_iterator = ExplodedNode *const * |
using | const_succ_iterator = const ExplodedNode *const * |
using | pred_iterator = ExplodedNode *const * |
using | const_pred_iterator = const ExplodedNode *const * |
Public Member Functions | |
ExplodedNode (const ProgramPoint &loc, ProgramStateRef state, bool IsSink) | |
ProgramPoint | getLocation () const |
getLocation - Returns the edge associated with the given node. More... | |
const LocationContext * | getLocationContext () const |
const StackFrameContext * | getStackFrame () const |
const Decl & | getCodeDecl () const |
CFG & | getCFG () const |
ParentMap & | getParentMap () const |
template<typename T > | |
T & | getAnalysis () const |
const ProgramStateRef & | getState () const |
template<typename T > | |
Optional< T > | getLocationAs () const LLVM_LVALUE_FUNCTION |
SVal | getSVal (const Stmt *S) const |
Get the value of an arbitrary expression at this node. More... | |
void | Profile (llvm::FoldingSetNodeID &ID) const |
void | addPredecessor (ExplodedNode *V, ExplodedGraph &G) |
addPredeccessor - Adds a predecessor to the current node, and in tandem add this node as a successor of the other node. More... | |
unsigned | succ_size () const |
unsigned | pred_size () const |
bool | succ_empty () const |
bool | pred_empty () const |
bool | isSink () const |
bool | hasSinglePred () const |
ExplodedNode * | getFirstPred () |
const ExplodedNode * | getFirstPred () const |
const ExplodedNode * | getFirstSucc () const |
pred_iterator | pred_begin () |
pred_iterator | pred_end () |
const_pred_iterator | pred_begin () const |
const_pred_iterator | pred_end () const |
succ_iterator | succ_begin () |
succ_iterator | succ_end () |
const_succ_iterator | succ_begin () const |
const_succ_iterator | succ_end () const |
Static Public Member Functions | |
static void | Profile (llvm::FoldingSetNodeID &ID, const ProgramPoint &Loc, const ProgramStateRef &state, bool IsSink) |
static void | SetAuditor (Auditor *A) |
Friends | |
class | BranchNodeBuilder |
class | CoreEngine |
class | EndOfFunctionNodeBuilder |
class | ExplodedGraph |
class | IndirectGotoNodeBuilder |
class | NodeBuilder |
class | SwitchNodeBuilder |
Definition at line 66 of file ExplodedGraph.h.
using clang::ento::ExplodedNode::const_pred_iterator = const ExplodedNode * const * |
Definition at line 221 of file ExplodedGraph.h.
using clang::ento::ExplodedNode::const_succ_iterator = const ExplodedNode * const * |
Definition at line 219 of file ExplodedGraph.h.
using clang::ento::ExplodedNode::pred_iterator = ExplodedNode * const * |
Definition at line 220 of file ExplodedGraph.h.
using clang::ento::ExplodedNode::succ_iterator = ExplodedNode * const * |
Definition at line 218 of file ExplodedGraph.h.
|
inlineexplicit |
Definition at line 136 of file ExplodedGraph.h.
References isSink().
void ExplodedNode::addPredecessor | ( | ExplodedNode * | V, |
ExplodedGraph & | G | ||
) |
addPredeccessor - Adds a predecessor to the current node, and in tandem add this node as a successor of the other node.
Definition at line 223 of file ExplodedGraph.cpp.
References clang::ento::ExplodedNode::Auditor::AddEdge(), clang::ento::ExplodedGraph::getAllocator(), clang::ento::ExplodedGraph::getNodeAllocator(), isSink(), P, and clang::BumpVector< T >::push_back().
Referenced by clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::SwitchNodeBuilder::generateDefaultCaseNode(), clang::ento::NodeBuilder::generateNodeImpl(), clang::ento::ExprEngine::processCallEnter(), clang::ento::ExprEngine::processCallExit(), and Profile().
|
inline |
Definition at line 160 of file ExplodedGraph.h.
References clang::LocationContext::getAnalysis(), getLocationContext(), and clang::T.
|
inline |
Definition at line 155 of file ExplodedGraph.h.
References clang::LocationContext::getCFG(), and getLocationContext().
Referenced by isInevitablySinking().
|
inline |
Definition at line 153 of file ExplodedGraph.h.
References clang::LocationContext::getDecl(), and getLocationContext().
Referenced by GetAllocationSite(), and clang::ento::CXXSelfAssignmentBRVisitor::VisitNode().
|
inline |
Definition at line 205 of file ExplodedGraph.h.
References pred_begin(), and pred_empty().
Referenced by clang::ento::CoreEngine::dispatchWorkItem(), findExecutedLines(), generateAlternateExtensiveDiagnosticsForNode(), GenerateAlternateExtensivePathDiagnostic(), generateExtensiveDiagnosticsForNode(), GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), GenerateVisitorsOnlyPathDiagnostic(), getFirstPred(), GetPreviousStmt(), and peelOffOuterExpr().
|
inline |
Definition at line 209 of file ExplodedGraph.h.
References getFirstPred().
|
inline |
Definition at line 213 of file ExplodedGraph.h.
References succ_begin(), and succ_empty().
Referenced by clang::ento::PathDiagnosticLocation::getNextStmt().
|
inline |
getLocation - Returns the edge associated with the given node.
Definition at line 143 of file ExplodedGraph.h.
Referenced by alreadyExecutedAtLeastOneLoopIteration(), clang::ento::CoreEngine::dispatchWorkItem(), clang::ento::WorkList::enqueue(), clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), clang::ento::CoreEngine::ExecuteWorkList(), findBlockForNode(), generateAlternateExtensiveDiagnosticsForNode(), generateExtensiveDiagnosticsForNode(), generateMinimalDiagnosticsForBlockEdge(), generateMinimalDiagnosticsForNode(), GetAllocationSite(), getLocationContext(), clang::ento::CheckerContext::getLocationRegionIfPostStore(), clang::ento::StackHintGeneratorForSymbol::getMessage(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::ento::PathDiagnosticLocation::getStmt(), getStmtBeforeCond(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isSynthesizedAccessor(), clang::ento::WorkList::makeBFSBlockDFSContents(), clang::ento::WorkList::makeUnexploredFirst(), peelOffOuterExpr(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::mpi::MPIBugReporter::reportUnmatchedWait(), clang::ento::ExplodedGraph::trim(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::TrackConstraintBRVisitor::VisitNode(), clang::ento::UndefOrNullArgVisitor::VisitNode(), clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode(), clang::ento::CXXSelfAssignmentBRVisitor::VisitNode(), clang::ento::ConditionBRVisitor::VisitNodeImpl(), and clang::ento::ExprEngine::VisitObjCMessage().
Definition at line 167 of file ExplodedGraph.h.
References clang::ProgramPoint::getAs(), and clang::T.
Referenced by findExecutedLines(), isFunctionMacroExpansion(), isInitializationOfVar(), clang::ento::FindLastStoreBRVisitor::VisitNode(), and clang::ento::NilReceiverBRVisitor::VisitNode().
|
inline |
Definition at line 145 of file ExplodedGraph.h.
References getLocation(), and clang::ProgramPoint::getLocationContext().
Referenced by clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::ExprEngine::evalBind(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), findBlockForNode(), findExecutedLines(), generateAlternateExtensiveDiagnosticsForNode(), clang::ento::SwitchNodeBuilder::generateDefaultCaseNode(), generateExtensiveDiagnosticsForNode(), generateMinimalDiagnosticsForBlockEdge(), GenerateMinimalPathDiagnostic(), clang::ento::BranchNodeBuilder::generateNode(), GetAllocationSite(), getAnalysis(), getArgumentValueString(), getAsPointeeSymbol(), getCFG(), getCodeDecl(), clang::ento::CheckerContext::getCurrentAnalysisDeclContext(), clang::ento::BugReport::getDeclWithIssue(), clang::ento::CheckerContext::getLocationContext(), clang::ento::IndirectGotoNodeBuilder::getLocationContext(), clang::ento::SwitchNodeBuilder::getLocationContext(), getParentMap(), getStackFrame(), clang::ento::PathDiagnosticLocation::getStmt(), isFunctionMacroExpansion(), isInitializationOfVar(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isReferenceCountingPointerDestructor(), isSynthesizedAccessor(), clang::ento::WorkList::makeBFSBlockDFSContents(), clang::ento::WorkList::makeUnexploredFirst(), mayInlineDecl(), clang::ento::ConditionBRVisitor::patternMatch(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processBranch(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::ento::ExprEngine::processEndOfFunction(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::ExprEngine::ProcessMemberDtor(), clang::ento::ExprEngine::ProcessNewAllocator(), clang::ento::ExprEngine::ProcessStmt(), llvm::FoldingSetTrait< ObjectState >::Profile(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::removeDeadOnEndOfFunction(), clang::ento::CheckerManager::runCheckersForBranchCondition(), clang::ento::CheckerManager::runCheckersForCallEvent(), clang::ento::CheckerManager::runCheckersForEndFunction(), clang::ento::updateLoopStack(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ConditionBRVisitor::VisitConditionVariable(), clang::ento::ExprEngine::VisitCXXCatchStmt(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::ento::ExprEngine::VisitGCCAsmStmt(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ento::ExprEngine::VisitLambdaExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr(), clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode(), clang::ento::ExprEngine::VisitObjCMessage(), clang::ento::ExprEngine::VisitOffsetOfExpr(), and clang::ento::ConditionBRVisitor::VisitTrueTest().
|
inline |
Definition at line 157 of file ExplodedGraph.h.
References getLocationContext(), and clang::LocationContext::getParentMap().
Referenced by findExecutedLines().
|
inline |
Definition at line 149 of file ExplodedGraph.h.
References clang::LocationContext::getCurrentStackFrame(), and getLocationContext().
Referenced by clang::ento::CheckerContext::getStackFrame(), clang::ento::ExprEngine::processCleanupTemporaryBranch(), clang::ento::ExprEngine::processEndOfFunction(), and clang::ento::ExprEngine::ProcessTemporaryDtor().
|
inline |
Definition at line 164 of file ExplodedGraph.h.
Referenced by clang::ento::mpi::MPIChecker::checkDoubleNonblocking(), clang::ento::CheckerContext::CheckerContext(), checkInvariantViolation(), clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::ExprEngine::defaultEvalCall(), clang::ento::CoreEngine::enqueueStmtNode(), clang::ento::ExprEngine::evalBind(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), generateAlternateExtensiveDiagnosticsForNode(), generateExtensiveDiagnosticsForNode(), GetAllocationSite(), getArgumentValueString(), getAsPointeeSymbol(), getNullConstraint(), getReturnTypeForMethod(), clang::ento::CheckerContext::getState(), clang::ento::TrackConstraintBRVisitor::getTag(), isFunctionMacroExpansion(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), isReferenceCountingPointerDestructor(), isSynthesizedAccessor(), clang::ento::ConditionBRVisitor::patternMatch(), clang::ento::ExprEngine::ProcessAutomaticObjDtor(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processBranch(), clang::ento::ExprEngine::processCallEnter(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::processCFGBlockEntrance(), clang::ento::ExprEngine::processCleanupTemporaryBranch(), clang::ento::ExprEngine::ProcessDeleteDtor(), clang::ento::ExprEngine::processEndOfFunction(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::ExprEngine::ProcessMemberDtor(), clang::ento::ExprEngine::ProcessNewAllocator(), clang::ento::ExprEngine::ProcessTemporaryDtor(), llvm::FoldingSetTrait< ObjectState >::Profile(), REGISTER_TRAIT_WITH_PROGRAMSTATE(), clang::ento::ExprEngine::removeDead(), clang::ento::mpi::MPIBugReporter::reportUnmatchedWait(), clang::ento::CheckerManager::runCheckersForObjCMessage(), clang::ento::SuppressInlineDefensiveChecksVisitor::SuppressInlineDefensiveChecksVisitor(), clang::ento::updateLoopStack(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitCallExpr(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ConditionBRVisitor::VisitConditionVariable(), clang::ento::ExprEngine::VisitCXXCatchStmt(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitCXXDeleteExpr(), clang::ento::ExprEngine::VisitCXXNewAllocatorCall(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitCXXThisExpr(), clang::ento::ExprEngine::VisitGCCAsmStmt(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ento::ExprEngine::VisitLambdaExpr(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr(), clang::ento::ExprEngine::VisitMSAsmStmt(), clang::ento::FindLastStoreBRVisitor::VisitNode(), clang::ento::UndefOrNullArgVisitor::VisitNode(), clang::ento::SuppressInlineDefensiveChecksVisitor::VisitNode(), clang::ento::CXXSelfAssignmentBRVisitor::VisitNode(), clang::ento::ConditionBRVisitor::VisitNodeImpl(), clang::ento::ExprEngine::VisitObjCMessage(), clang::ento::ExprEngine::VisitOffsetOfExpr(), and clang::ento::ConditionBRVisitor::VisitTrueTest().
Get the value of an arbitrary expression at this node.
Definition at line 172 of file ExplodedGraph.h.
Referenced by clang::ento::CheckerContext::getCalleeDecl().
|
inline |
Definition at line 201 of file ExplodedGraph.h.
References pred_size().
Referenced by clang::ento::CoreEngine::dispatchWorkItem().
|
inline |
Definition at line 199 of file ExplodedGraph.h.
Referenced by clang::ento::ExplodedNodeSet::Add(), addPredecessor(), checkInvariantViolation(), clang::ento::CoreEngine::enqueueStmtNode(), ExplodedNode(), clang::ento::ExplodedNodeSet::ExplodedNodeSet(), clang::ento::NodeBuilderWithSinks::generateSink(), Profile(), and clang::ento::ExplodedGraph::trim().
|
inline |
Definition at line 223 of file ExplodedGraph.h.
Referenced by GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), GetAllocationSite(), getAsPointeeSymbol(), getFirstPred(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), pred_begin(), clang::ento::ExprEngine::VisitGuardedExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().
|
inline |
Definition at line 226 of file ExplodedGraph.h.
References pred_begin().
|
inline |
Definition at line 197 of file ExplodedGraph.h.
Referenced by GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), GetAllocationSite(), getAsPointeeSymbol(), getFirstPred(), and clang::ento::isPossiblyEscaped().
|
inline |
Definition at line 224 of file ExplodedGraph.h.
Referenced by pred_end().
|
inline |
Definition at line 229 of file ExplodedGraph.h.
References pred_end().
|
inline |
Definition at line 195 of file ExplodedGraph.h.
Referenced by hasSinglePred(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().
|
inlinestatic |
Definition at line 176 of file ExplodedGraph.h.
Referenced by Profile().
|
inline |
Definition at line 185 of file ExplodedGraph.h.
References addPredecessor(), isSink(), and Profile().
|
static |
Definition at line 49 of file ExplodedGraph.cpp.
References clang::ento::ExplodedGraph::ExplodedGraph(), and clang::ento::ExplodedGraph::~ExplodedGraph().
|
inline |
|
inline |
Definition at line 236 of file ExplodedGraph.h.
References succ_begin().
|
inline |
Definition at line 196 of file ExplodedGraph.h.
Referenced by getFirstSucc().
|
inline |
Definition at line 234 of file ExplodedGraph.h.
Referenced by llvm::GraphTraits< clang::ento::ExplodedNode * >::child_end(), llvm::GraphTraits< const clang::ento::ExplodedNode * >::child_end(), and succ_end().
|
inline |
Definition at line 239 of file ExplodedGraph.h.
References succ_end().
|
inline |
Definition at line 194 of file ExplodedGraph.h.
Referenced by clang::ento::ExplodedGraph::isInterestingLValueExpr().
|
friend |
Definition at line 67 of file ExplodedGraph.h.
|
friend |
Definition at line 68 of file ExplodedGraph.h.
|
friend |
Definition at line 69 of file ExplodedGraph.h.
|
friend |
Definition at line 70 of file ExplodedGraph.h.
|
friend |
Definition at line 71 of file ExplodedGraph.h.
|
friend |
Definition at line 72 of file ExplodedGraph.h.
|
friend |
Definition at line 73 of file ExplodedGraph.h.