clang API Documentation

Public Member Functions | Static Public Member Functions
clang::ento::ConditionBRVisitor Class Reference

Visitor that tries to report interesting diagnostics from conditions. More...

#include <BugReporterVisitor.h>

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

List of all members.

Public Member Functions

void Profile (llvm::FoldingSetNodeID &ID) const override
PathDiagnosticPieceVisitNode (const ExplodedNode *N, const ExplodedNode *Prev, BugReporterContext &BRC, BugReport &BR) override
 Return a diagnostic piece which should be associated with the given node.
PathDiagnosticPieceVisitNodeImpl (const ExplodedNode *N, const ExplodedNode *Prev, BugReporterContext &BRC, BugReport &BR)
PathDiagnosticPieceVisitTerminator (const Stmt *Term, const ExplodedNode *N, const CFGBlock *srcBlk, const CFGBlock *dstBlk, BugReport &R, BugReporterContext &BRC)
PathDiagnosticPieceVisitTrueTest (const Expr *Cond, bool tookTrue, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N)
PathDiagnosticPieceVisitTrueTest (const Expr *Cond, const DeclRefExpr *DR, const bool tookTrue, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N)
PathDiagnosticPieceVisitTrueTest (const Expr *Cond, const BinaryOperator *BExpr, const bool tookTrue, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N)
PathDiagnosticPieceVisitConditionVariable (StringRef LhsString, const Expr *CondVarExpr, const bool tookTrue, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N)
bool patternMatch (const Expr *Ex, raw_ostream &Out, BugReporterContext &BRC, BugReport &R, const ExplodedNode *N, Optional< bool > &prunable)

Static Public Member Functions

static const char * getTag ()

Detailed Description

Visitor that tries to report interesting diagnostics from conditions.

Definition at line 184 of file BugReporterVisitor.h.


Member Function Documentation

const char * ConditionBRVisitor::getTag ( ) [static]

Return the tag associated with this visitor. This tag will be used to make all PathDiagnosticPieces created by this visitor.

Definition at line 1146 of file BugReporterVisitors.cpp.

Referenced by eventsDescribeSameCondition(), and VisitNode().

bool ConditionBRVisitor::patternMatch ( const Expr Ex,
raw_ostream &  Out,
BugReporterContext BRC,
BugReport R,
const ExplodedNode N,
Optional< bool > &  prunable 
)
void clang::ento::ConditionBRVisitor::Profile ( llvm::FoldingSetNodeID &  ID) const [inline, override, virtual]

Implements clang::ento::BugReporterVisitor.

Definition at line 186 of file BugReporterVisitor.h.

PathDiagnosticPiece * ConditionBRVisitor::VisitConditionVariable ( StringRef  LhsString,
const Expr CondVarExpr,
const bool  tookTrue,
BugReporterContext BRC,
BugReport R,
const ExplodedNode N 
)
PathDiagnosticPiece * ConditionBRVisitor::VisitNode ( const ExplodedNode Succ,
const ExplodedNode Pred,
BugReporterContext BRC,
BugReport BR 
) [override, virtual]

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 1150 of file BugReporterVisitors.cpp.

References getTag(), clang::ento::PathDiagnosticPiece::setTag(), and VisitNodeImpl().

PathDiagnosticPiece * ConditionBRVisitor::VisitTerminator ( const Stmt Term,
const ExplodedNode N,
const CFGBlock srcBlk,
const CFGBlock dstBlk,
BugReport R,
BugReporterContext BRC 
)
PathDiagnosticPiece * ConditionBRVisitor::VisitTrueTest ( const Expr Cond,
bool  tookTrue,
BugReporterContext BRC,
BugReport R,
const ExplodedNode N 
)
PathDiagnosticPiece * ConditionBRVisitor::VisitTrueTest ( const Expr Cond,
const DeclRefExpr DR,
const bool  tookTrue,
BugReporterContext BRC,
BugReport R,
const ExplodedNode N 
)
PathDiagnosticPiece * ConditionBRVisitor::VisitTrueTest ( const Expr Cond,
const BinaryOperator BExpr,
const bool  tookTrue,
BugReporterContext BRC,
BugReport R,
const ExplodedNode N 
)

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