clang  6.0.0svn
Public Member Functions | List of all members
clang::ento::StmtNodeBuilder Class Reference

This builder class is useful for generating nodes that resulted from visiting a statement. More...

#include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h"

Inheritance diagram for clang::ento::StmtNodeBuilder:
Inheritance graph
[legend]
Collaboration diagram for clang::ento::StmtNodeBuilder:
Collaboration graph
[legend]

Public Member Functions

 StmtNodeBuilder (ExplodedNode *SrcNode, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, NodeBuilder *Enclosing=nullptr)
 Constructs a StmtNodeBuilder. More...
 
 StmtNodeBuilder (ExplodedNodeSet &SrcSet, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, NodeBuilder *Enclosing=nullptr)
 
 ~StmtNodeBuilder () override
 
ExplodedNodegenerateNode (const Stmt *S, ExplodedNode *Pred, ProgramStateRef St, const ProgramPointTag *tag=nullptr, ProgramPoint::Kind K=ProgramPoint::PostStmtKind)
 
ExplodedNodegenerateSink (const Stmt *S, ExplodedNode *Pred, ProgramStateRef St, const ProgramPointTag *tag=nullptr, ProgramPoint::Kind K=ProgramPoint::PostStmtKind)
 
- Public Member Functions inherited from clang::ento::NodeBuilder
 NodeBuilder (ExplodedNode *SrcNode, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, bool F=true)
 
 NodeBuilder (const ExplodedNodeSet &SrcSet, ExplodedNodeSet &DstSet, const NodeBuilderContext &Ctx, bool F=true)
 
virtual ~NodeBuilder ()
 
ExplodedNodegenerateNode (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
 Generates a node in the ExplodedGraph. More...
 
ExplodedNodegenerateSink (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
 Generates a sink in the ExplodedGraph. More...
 
const ExplodedNodeSetgetResults ()
 
iterator begin ()
 Iterators through the results frontier. More...
 
iterator end ()
 
const NodeBuilderContextgetContext ()
 
bool hasGeneratedNodes ()
 
void takeNodes (const ExplodedNodeSet &S)
 
void takeNodes (ExplodedNode *N)
 
void addNodes (const ExplodedNodeSet &S)
 
void addNodes (ExplodedNode *N)
 

Additional Inherited Members

- Public Types inherited from clang::ento::NodeBuilder
typedef ExplodedNodeSet::iterator iterator
 
- Protected Member Functions inherited from clang::ento::NodeBuilder
virtual bool checkResults ()
 Checkes if the results are ready. More...
 
bool hasNoSinksInFrontier ()
 
virtual void finalizeResults ()
 Allow subclasses to finalize results before result_begin() is executed. More...
 
ExplodedNodegenerateNodeImpl (const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred, bool MarkAsSink=false)
 
- Protected Attributes inherited from clang::ento::NodeBuilder
const NodeBuilderContextC
 
bool Finalized
 Specifies if the builder results have been finalized. More...
 
bool HasGeneratedNodes
 
ExplodedNodeSetFrontier
 The frontier set - a set of nodes which need to be propagated after the builder dies. More...
 

Detailed Description

This builder class is useful for generating nodes that resulted from visiting a statement.

The main difference from its parent NodeBuilder is that it creates a statement specific ProgramPoint.

Definition at line 349 of file CoreEngine.h.

Constructor & Destructor Documentation

◆ StmtNodeBuilder() [1/2]

clang::ento::StmtNodeBuilder::StmtNodeBuilder ( ExplodedNode SrcNode,
ExplodedNodeSet DstSet,
const NodeBuilderContext Ctx,
NodeBuilder Enclosing = nullptr 
)
inline

Constructs a StmtNodeBuilder.

If the builder is going to process nodes currently owned by another builder(with larger scope), use Enclosing builder to transfer ownership.

Definition at line 356 of file CoreEngine.h.

References clang::ento::NodeBuilder::takeNodes().

◆ StmtNodeBuilder() [2/2]

clang::ento::StmtNodeBuilder::StmtNodeBuilder ( ExplodedNodeSet SrcSet,
ExplodedNodeSet DstSet,
const NodeBuilderContext Ctx,
NodeBuilder Enclosing = nullptr 
)
inline

Definition at line 364 of file CoreEngine.h.

◆ ~StmtNodeBuilder()

StmtNodeBuilder::~StmtNodeBuilder ( )
override

Definition at line 676 of file CoreEngine.cpp.

Member Function Documentation

◆ generateNode()

ExplodedNode* clang::ento::StmtNodeBuilder::generateNode ( const Stmt S,
ExplodedNode Pred,
ProgramStateRef  St,
const ProgramPointTag tag = nullptr,
ProgramPoint::Kind  K = ProgramPoint::PostStmtKind 
)
inline

◆ generateSink()

ExplodedNode* clang::ento::StmtNodeBuilder::generateSink ( const Stmt S,
ExplodedNode Pred,
ProgramStateRef  St,
const ProgramPointTag tag = nullptr,
ProgramPoint::Kind  K = ProgramPoint::PostStmtKind 
)
inline

Definition at line 389 of file CoreEngine.h.

Referenced by clang::ento::ExprEngine::VisitObjCMessage().


The documentation for this class was generated from the following files: