clang  8.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 ()=default
 
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
using iterator = ExplodedNodeSet::iterator
 
- Protected Member Functions inherited from clang::ento::NodeBuilder
virtual bool checkResults ()
 Checks 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 = false
 
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 370 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 377 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

◆ ~StmtNodeBuilder()

StmtNodeBuilder::~StmtNodeBuilder ( )
override

Definition at line 576 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

Definition at line 399 of file CoreEngine.h.

Referenced by clang::ento::ExprEngine::CreateCXXTemporaryObject(), clang::ento::ExprEngine::evalBind(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), clang::ento::ExprEngine::evalLoad(), clang::ento::ExprEngine::handleLValueBitCast(), clang::ento::ExprEngine::handleLVectorSplat(), clang::ento::ExprEngine::handleUOExtension(), clang::ento::ExprEngine::ProcessTemporaryDtor(), clang::ento::ExprEngine::removeDead(), clang::ento::ExprEngine::VisitArraySubscriptExpr(), clang::ento::ExprEngine::VisitAtomicExpr(), clang::ento::ExprEngine::VisitBlockExpr(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCompoundLiteralExpr(), clang::ento::ExprEngine::VisitCXXBindTemporaryExpr(), 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::VisitDeclStmt(), clang::ento::ExprEngine::VisitGCCAsmStmt(), clang::ento::ExprEngine::VisitGuardedExpr(), clang::ento::ExprEngine::VisitInitListExpr(), clang::ento::ExprEngine::VisitLambdaExpr(), clang::ento::ExprEngine::VisitLvalObjCIvarRefExpr(), clang::ento::ExprEngine::VisitMemberExpr(), clang::ento::ExprEngine::VisitMSAsmStmt(), clang::ento::ExprEngine::VisitObjCMessage(), clang::ento::ExprEngine::VisitOffsetOfExpr(), clang::ento::ExprEngine::VisitReturnStmt(), clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().

◆ generateSink()

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

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