clang  6.0.0svn
Public Member Functions | List of all members
clang::ento::UndefOrNullArgVisitor Class Referencefinal

When a region containing undefined value or '0' value is passed as an argument in a call, marks the call as interesting. More...

#include "clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h"

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

Public Member Functions

 UndefOrNullArgVisitor (const MemRegion *InR)
 
void Profile (llvm::FoldingSetNodeID &ID) const override
 
std::shared_ptr< PathDiagnosticPieceVisitNode (const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) override
 Return a diagnostic piece which should be associated with the given node. More...
 
- Public Member Functions inherited from clang::ento::BugReporterVisitor
 BugReporterVisitor ()=default
 
 BugReporterVisitor (const BugReporterVisitor &)=default
 
 BugReporterVisitor (BugReporterVisitor &&)
 
virtual ~BugReporterVisitor ()
 
virtual std::unique_ptr< PathDiagnosticPiecegetEndPath (BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR)
 Provide custom definition for the final diagnostic piece on the path - the piece, which is displayed before the path is expanded. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from clang::ento::BugReporterVisitor
static std::unique_ptr< PathDiagnosticPiecegetDefaultEndPath (BugReporterContext &BRC, const ExplodedNode *N, BugReport &BR)
 Generates the default final diagnostic piece. More...
 

Detailed Description

When a region containing undefined value or '0' value is passed as an argument in a call, marks the call as interesting.

As a result, BugReporter will not prune the path through the function even if the region's contents are not modified/accessed by the call.

Definition at line 278 of file BugReporterVisitor.h.

Constructor & Destructor Documentation

◆ UndefOrNullArgVisitor()

clang::ento::UndefOrNullArgVisitor::UndefOrNullArgVisitor ( const MemRegion InR)
inline

Definition at line 285 of file BugReporterVisitor.h.

Member Function Documentation

◆ Profile()

void clang::ento::UndefOrNullArgVisitor::Profile ( llvm::FoldingSetNodeID &  ID) const
inlineoverridevirtual

◆ VisitNode()

std::shared_ptr< PathDiagnosticPiece > UndefOrNullArgVisitor::VisitNode ( const ExplodedNode Succ,
const ExplodedNode Pred,
BugReporterContext BRC,
BugReport BR 
)
overridevirtual

Return a diagnostic piece which should be associated with the given node.

The last parameter can be used to register a new visitor with the given BugReport while processing a node.

Implements clang::ento::BugReporterVisitor.

Definition at line 1777 of file BugReporterVisitors.cpp.

References clang::ProgramPoint::getAs(), clang::CallEventManager::getCaller(), clang::ento::ProgramStateManager::getCallEventManager(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getState(), clang::ento::BugReporterContext::getStateManager(), and State.


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