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
- public ExplodedNode(const clang::ProgramPoint & loc, clang::ento::ProgramStateRef state, int64_t Id, bool IsSink)
- public static void Profile(llvm::FoldingSetNodeID & ID, const clang::ProgramPoint & Loc, const clang::ento::ProgramStateRef & state, bool IsSink)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public void addPredecessor(clang::ento::ExplodedNode * V, clang::ento::ExplodedGraph & G)
- public template <typename T>T & getAnalysis() const
- public clang::CFG & getCFG() const
- public const clang::CFGBlock * getCFGBlock() const
- public const clang::Decl & getCodeDecl() const
- public const clang::Stmt * getCurrentOrPreviousStmtForDiagnostics() const
- public const clang::ento::ExplodedNode * getFirstPred() const
- public clang::ento::ExplodedNode * getFirstPred()
- public const clang::ento::ExplodedNode * getFirstSucc() const
- public clang::ento::ExplodedNode * getFirstSucc()
- public int64_t getID() const
- public clang::ProgramPoint getLocation() const
- public template <typename T>Optional<T> getLocationAs() const &
- public const clang::LocationContext * getLocationContext() const
- public const clang::Stmt * getNextStmtForDiagnostics() const
- public const clang::ParentMap & getParentMap() const
- public const clang::Stmt * getPreviousStmtForDiagnostics() const
- public clang::ento::SVal getSVal(const clang::Stmt * S) const
- public const clang::StackFrameContext * getStackFrame() const
- public const clang::ento::ProgramStateRef & getState() const
- public const clang::Stmt * getStmtForDiagnostics() const
- public bool hasSinglePred() const
- public bool isSink() const
- public bool isTrivial() const
- public clang::ento::ExplodedNode::pred_iterator pred_begin()
- public clang::ento::ExplodedNode::const_pred_iterator pred_begin() const
- public bool pred_empty() const
- public clang::ento::ExplodedNode::const_pred_iterator pred_end() const
- public clang::ento::ExplodedNode::pred_iterator pred_end()
- public unsigned int pred_size() const
- public clang::ento::ExplodedNode::const_pred_range preds() const
- public clang::ento::ExplodedNode::pred_range preds()
- private void replacePredecessor(clang::ento::ExplodedNode * node)
- private void replaceSuccessor(clang::ento::ExplodedNode * node)
- public clang::ento::ExplodedNode::const_succ_iterator succ_begin() const
- public clang::ento::ExplodedNode::succ_iterator succ_begin()
- public bool succ_empty() const
- public clang::ento::ExplodedNode::succ_iterator succ_end()
- public clang::ento::ExplodedNode::const_succ_iterator succ_end() const
- public unsigned int succ_size() const
- public clang::ento::ExplodedNode::succ_range succs()
- public clang::ento::ExplodedNode::const_succ_range succs() const
Inherited from FoldingSetBase::Node:
Methods
¶ExplodedNode(const clang::ProgramPoint& loc,
clang::ento::ProgramStateRef state,
int64_t Id,
bool IsSink)
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)
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
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:188
Parameters
¶void addPredecessor(clang::ento::ExplodedNode* V,
clang::ento::ExplodedGraph& G)
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
¶template <typename T>
T& getAnalysis() const
template <typename T>
T& getAnalysis() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:164
Templates
- T
¶clang::CFG& getCFG() const
clang::CFG& getCFG() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:156
¶const clang::CFGBlock* getCFGBlock() const
const clang::CFGBlock* getCFGBlock() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:158
¶const clang::Decl& getCodeDecl() const
const clang::Decl& getCodeDecl() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:154
¶const clang::Stmt*
getCurrentOrPreviousStmtForDiagnostics() const
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
const clang::ento::ExplodedNode* getFirstPred()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:212
¶clang::ento::ExplodedNode* getFirstPred()
clang::ento::ExplodedNode* getFirstPred()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:208
¶const clang::ento::ExplodedNode* getFirstSucc()
const
const clang::ento::ExplodedNode* getFirstSucc()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:220
¶clang::ento::ExplodedNode* getFirstSucc()
clang::ento::ExplodedNode* getFirstSucc()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:216
¶int64_t getID() const
int64_t getID() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:261
¶clang::ProgramPoint getLocation() const
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&
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
const clang::LocationContext* getLocationContext()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:146
¶const clang::Stmt* getNextStmtForDiagnostics()
const
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
const clang::ParentMap& getParentMap() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:160
¶const clang::Stmt* getPreviousStmtForDiagnostics()
const
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
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
const clang::StackFrameContext* getStackFrame()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:150
¶const clang::ento::ProgramStateRef& getState()
const
const clang::ento::ProgramStateRef& getState()
const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:168
¶const clang::Stmt* getStmtForDiagnostics() const
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
bool hasSinglePred() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:204
¶bool isSink() const
bool isSink() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:202
¶bool isTrivial() const
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()
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
clang::ento::ExplodedNode::const_pred_iterator
pred_begin() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:241
¶bool pred_empty() const
bool pred_empty() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:200
¶clang::ento::ExplodedNode::const_pred_iterator
pred_end() const
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()
clang::ento::ExplodedNode::pred_iterator
pred_end()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:238
¶unsigned int pred_size() const
unsigned int pred_size() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:198
¶clang::ento::ExplodedNode::const_pred_range
preds() const
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()
clang::ento::ExplodedNode::pred_range preds()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:239
¶void replacePredecessor(
clang::ento::ExplodedNode* node)
void replacePredecessor(
clang::ento::ExplodedNode* node)
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:296
Parameters
¶void replaceSuccessor(
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::const_succ_iterator
succ_begin() const
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()
clang::ento::ExplodedNode::succ_iterator
succ_begin()
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:249
¶bool succ_empty() const
bool succ_empty() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:199
¶clang::ento::ExplodedNode::succ_iterator
succ_end()
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
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
unsigned int succ_size() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:197
¶clang::ento::ExplodedNode::succ_range succs()
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
clang::ento::ExplodedNode::const_succ_range
succs() const
Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h:259