class ExplodedNode

Declaration

class ExplodedNode : public Node { /* full declaration omitted */ };

Description

Node - This class is used to maintain the singly linked bucket list in a folding set.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:65

Inherits from: FoldingSetBase::Node

Member Variables

private const clang::ProgramPoint Location
Location - The program location (within a function body) associated with this node.
private clang::ento::ProgramStateRef State
State - The state associated with this node.
private clang::ento::ExplodedNode::NodeGroup Preds
Preds - The predecessors of this node.
private clang::ento::ExplodedNode::NodeGroup Succs
Succs - The successors of this node.
private int64_t Id

Method Overview

Inherited from FoldingSetBase::Node:

Methods

ExplodedNode(const clang::ProgramPoint& loc,
             clang::ento::ProgramStateRef state,
             int64_t Id,
             bool IsSink)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:137

Parameters

const clang::ProgramPoint& loc
clang::ento::ProgramStateRef state
int64_t Id
bool IsSink

static void Profile(
    llvm::FoldingSetNodeID& ID,
    const clang::ProgramPoint& Loc,
    const clang::ento::ProgramStateRef& state,
    bool IsSink)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:179

Parameters

llvm::FoldingSetNodeID& ID
const clang::ProgramPoint& Loc
const clang::ento::ProgramStateRef& state
bool IsSink

void Profile(llvm::FoldingSetNodeID& ID) const

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

Parameters

llvm::FoldingSetNodeID& ID

void addPredecessor(clang::ento::ExplodedNode* V,
                    clang::ento::ExplodedGraph& G)

Description

addPredeccessor - Adds a predecessor to the current node, and in tandem add this node as a successor of the other node.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:195

Parameters

clang::ento::ExplodedNode* V
clang::ento::ExplodedGraph& G

template <typename T>
T& getAnalysis() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:164

Templates

T

clang::CFG& getCFG() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:156

const clang::CFGBlock* getCFGBlock() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:158

const clang::Decl& getCodeDecl() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:154

const clang::Stmt*
getCurrentOrPreviousStmtForDiagnostics() const

Description

Find the statement that was executed at or immediately before this node. Useful when any nearby statement will do. If the statement belongs to a body-farmed definition, retrieve the call site for that definition.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:292

const clang::ento::ExplodedNode* getFirstPred()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:212

clang::ento::ExplodedNode* getFirstPred()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:208

const clang::ento::ExplodedNode* getFirstSucc()
    const

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

clang::ento::ExplodedNode* getFirstSucc()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:216

int64_t getID() const

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

clang::ProgramPoint getLocation() const

Description

getLocation - Returns the edge associated with the given node.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:144

template <typename T>
Optional<T> getLocationAs() const&

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:170

Templates

T

const clang::LocationContext* getLocationContext()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:146

const clang::Stmt* getNextStmtForDiagnostics()
    const

Description

Find the next statement that was executed on this node's execution path. Useful for explaining control flow that follows the current node. If the statement belongs to a body-farmed definition, retrieve the call site for that definition.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:280

const clang::ParentMap& getParentMap() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:160

const clang::Stmt* getPreviousStmtForDiagnostics()
    const

Description

Find the statement that was executed immediately before this node. Useful when the node corresponds to a CFG block entrance. If the statement belongs to a body-farmed definition, retrieve the call site for that definition.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:286

clang::ento::SVal getSVal(
    const clang::Stmt* S) const

Description

Get the value of an arbitrary expression at this node.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:175

Parameters

const clang::Stmt* S

const clang::StackFrameContext* getStackFrame()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:150

const clang::ento::ProgramStateRef& getState()
    const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:168

const clang::Stmt* getStmtForDiagnostics() const

Description

If the node's program point corresponds to a statement, retrieve that statement. Useful for figuring out where to put a warning or a note. If the statement belongs to a body-farmed definition, retrieve the call site for that definition.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:274

bool hasSinglePred() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:204

bool isSink() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:202

bool isTrivial() const

Description

The node is trivial if it has only one successor, only one predecessor, it's predecessor has only one successor, and its program state is the same as the program state of the previous node. Trivial nodes may be skipped while printing exploded graph.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:268

clang::ento::ExplodedNode::pred_iterator
pred_begin()

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

clang::ento::ExplodedNode::const_pred_iterator
pred_begin() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:241

bool pred_empty() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:200

clang::ento::ExplodedNode::const_pred_iterator
pred_end() const

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

clang::ento::ExplodedNode::pred_iterator
pred_end()

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

unsigned int pred_size() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:198

clang::ento::ExplodedNode::const_pred_range
preds() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:247

clang::ento::ExplodedNode::pred_range preds()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:239

void replacePredecessor(
    clang::ento::ExplodedNode* node)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:296

Parameters

clang::ento::ExplodedNode* node

void replaceSuccessor(
    clang::ento::ExplodedNode* node)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:295

Parameters

clang::ento::ExplodedNode* node

clang::ento::ExplodedNode::const_succ_iterator
succ_begin() const

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

clang::ento::ExplodedNode::succ_iterator
succ_begin()

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

bool succ_empty() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:199

clang::ento::ExplodedNode::succ_iterator
succ_end()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:250

clang::ento::ExplodedNode::const_succ_iterator
succ_end() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:256

unsigned int succ_size() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:197

clang::ento::ExplodedNode::succ_range succs()

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:251

clang::ento::ExplodedNode::const_succ_range
succs() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:259