clang API Documentation
#include <PathDiagnostic.h>
Public Member Functions | |
| PathDiagnosticLocation () | |
| Create an invalid location. | |
| PathDiagnosticLocation (const Stmt *s, const SourceManager &sm, LocationOrAnalysisDeclContext lac) | |
| Create a location corresponding to the given statement. | |
| PathDiagnosticLocation (const Decl *d, const SourceManager &sm) | |
| Create a location corresponding to the given declaration. | |
| bool | operator== (const PathDiagnosticLocation &X) const |
| bool | operator!= (const PathDiagnosticLocation &X) const |
| bool | isValid () const |
| FullSourceLoc | asLocation () const |
| PathDiagnosticRange | asRange () const |
| const Stmt * | asStmt () const |
| const Decl * | asDecl () const |
| bool | hasRange () const |
| void | invalidate () |
| void | flatten () |
| const SourceManager & | getManager () const |
| void | Profile (llvm::FoldingSetNodeID &ID) const |
Static Public Member Functions | |
| static PathDiagnosticLocation | create (const Decl *D, const SourceManager &SM) |
| Create a location corresponding to the given declaration. | |
| static PathDiagnosticLocation | createBegin (const Decl *D, const SourceManager &SM) |
| Create a location for the beginning of the declaration. | |
| static PathDiagnosticLocation | createBegin (const Stmt *S, const SourceManager &SM, const LocationOrAnalysisDeclContext LAC) |
| Create a location for the beginning of the statement. | |
| static PathDiagnosticLocation | createOperatorLoc (const BinaryOperator *BO, const SourceManager &SM) |
| static PathDiagnosticLocation | createMemberLoc (const MemberExpr *ME, const SourceManager &SM) |
| static PathDiagnosticLocation | createBeginBrace (const CompoundStmt *CS, const SourceManager &SM) |
| static PathDiagnosticLocation | createEndBrace (const CompoundStmt *CS, const SourceManager &SM) |
| static PathDiagnosticLocation | createDeclBegin (const LocationContext *LC, const SourceManager &SM) |
| static PathDiagnosticLocation | createDeclEnd (const LocationContext *LC, const SourceManager &SM) |
| static PathDiagnosticLocation | create (const ProgramPoint &P, const SourceManager &SMng) |
| Create a location corresponding to the given valid ExplodedNode. | |
| static PathDiagnosticLocation | createEndOfPath (const ExplodedNode *N, const SourceManager &SM) |
| static PathDiagnosticLocation | createSingleLocation (const PathDiagnosticLocation &PDL) |
| Convert the given location into a single kind location. | |
Definition at line 101 of file PathDiagnostic.h.
| clang::ento::PathDiagnosticLocation::PathDiagnosticLocation | ( | ) | [inline] |
Create an invalid location.
Definition at line 127 of file PathDiagnostic.h.
Referenced by create(), createBegin(), createBeginBrace(), createDeclBegin(), createDeclEnd(), createEndBrace(), createEndOfPath(), createMemberLoc(), createOperatorLoc(), createSingleLocation(), and invalidate().
| clang::ento::PathDiagnosticLocation::PathDiagnosticLocation | ( | const Stmt * | s, |
| const SourceManager & | sm, | ||
| LocationOrAnalysisDeclContext | lac | ||
| ) | [inline] |
Create a location corresponding to the given statement.
Definition at line 131 of file PathDiagnostic.h.
References clang::SourceRange::isValid().
| clang::ento::PathDiagnosticLocation::PathDiagnosticLocation | ( | const Decl * | d, |
| const SourceManager & | sm | ||
| ) | [inline] |
Create a location corresponding to the given declaration.
Definition at line 143 of file PathDiagnostic.h.
References clang::SourceRange::isValid().
| const Decl* clang::ento::PathDiagnosticLocation::asDecl | ( | ) | const [inline] |
Definition at line 230 of file PathDiagnostic.h.
References isValid().
| FullSourceLoc clang::ento::PathDiagnosticLocation::asLocation | ( | ) | const [inline] |
Definition at line 221 of file PathDiagnostic.h.
Referenced by createSingleLocation(), clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic(), and clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece().
| PathDiagnosticRange clang::ento::PathDiagnosticLocation::asRange | ( | ) | const [inline] |
Definition at line 225 of file PathDiagnostic.h.
Referenced by clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece().
| const Stmt* clang::ento::PathDiagnosticLocation::asStmt | ( | ) | const [inline] |
Definition at line 229 of file PathDiagnostic.h.
References isValid().
| static PathDiagnosticLocation clang::ento::PathDiagnosticLocation::create | ( | const Decl * | D, |
| const SourceManager & | SM | ||
| ) | [inline, static] |
Create a location corresponding to the given declaration.
Definition at line 152 of file PathDiagnostic.h.
References PathDiagnosticLocation().
Referenced by checkObjCUnusedIvar().
| PathDiagnosticLocation PathDiagnosticLocation::create | ( | const ProgramPoint & | P, |
| const SourceManager & | SMng | ||
| ) | [static] |
Create a location corresponding to the given valid ExplodedNode.
Definition at line 331 of file PathDiagnostic.cpp.
References clang::ProgramPoint::getLocationContext(), clang::CFGBlock::getTerminatorCondition(), and PathDiagnosticLocation().
| PathDiagnosticLocation PathDiagnosticLocation::createBegin | ( | const Decl * | D, |
| const SourceManager & | SM | ||
| ) | [static] |
Create a location for the beginning of the declaration.
Definition at line 270 of file PathDiagnostic.cpp.
References clang::Decl::getLocStart(), and PathDiagnosticLocation().
Referenced by checkObjCDealloc(), CompareReturnTypes(), GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), and clang::ento::PathDiagnosticCallPiece::setCallee().
| static PathDiagnosticLocation clang::ento::PathDiagnosticLocation::createBegin | ( | const Stmt * | S, |
| const SourceManager & | SM, | ||
| const LocationOrAnalysisDeclContext | LAC | ||
| ) | [static] |
Create a location for the beginning of the statement.
| PathDiagnosticLocation PathDiagnosticLocation::createBeginBrace | ( | const CompoundStmt * | CS, |
| const SourceManager & | SM | ||
| ) | [static] |
Create a location for the beginning of the compound statement. Assumes the statement has a valid location.
Definition at line 296 of file PathDiagnostic.cpp.
References clang::CompoundStmt::getLBracLoc(), and PathDiagnosticLocation().
| PathDiagnosticLocation PathDiagnosticLocation::createDeclBegin | ( | const LocationContext * | LC, |
| const SourceManager & | SM | ||
| ) | [static] |
Create a location for the beginning of the enclosing declaration body. Defaults to the beginning of the first statement in the declaration body.
Definition at line 310 of file PathDiagnostic.cpp.
References clang::Decl::getBody(), clang::LocationContext::getDecl(), and PathDiagnosticLocation().
| PathDiagnosticLocation PathDiagnosticLocation::createDeclEnd | ( | const LocationContext * | LC, |
| const SourceManager & | SM | ||
| ) | [static] |
Constructs a location for the end of the enclosing declaration body. Defaults to the end of brace.
Definition at line 324 of file PathDiagnostic.cpp.
References clang::Decl::getBodyRBrace(), clang::LocationContext::getDecl(), and PathDiagnosticLocation().
Referenced by createEndOfPath().
| PathDiagnosticLocation PathDiagnosticLocation::createEndBrace | ( | const CompoundStmt * | CS, |
| const SourceManager & | SM | ||
| ) | [static] |
Create a location for the end of the compound statement. Assumes the statement has a valid location.
Definition at line 303 of file PathDiagnostic.cpp.
References clang::CompoundStmt::getRBracLoc(), and PathDiagnosticLocation().
Referenced by GenerateExtensivePathDiagnostic().
| PathDiagnosticLocation PathDiagnosticLocation::createEndOfPath | ( | const ExplodedNode * | N, |
| const SourceManager & | SM | ||
| ) | [static] |
Create a location corresponding to the next valid ExplodedNode as end of path location.
Definition at line 347 of file PathDiagnostic.cpp.
References createDeclEnd(), clang::ento::ExplodedNode::getLocation(), clang::ProgramPoint::getLocationContext(), clang::ento::ExplodedNode::getLocationContext(), P, PathDiagnosticLocation(), clang::ento::ExplodedNode::succ_begin(), and clang::ento::ExplodedNode::succ_empty().
Referenced by clang::ento::BugReporterVisitor::getDefaultEndPath().
| PathDiagnosticLocation PathDiagnosticLocation::createMemberLoc | ( | const MemberExpr * | ME, |
| const SourceManager & | SM | ||
| ) | [static] |
For member expressions, return the location of the '.' or '->'. Assumes the statement has a valid location.
Definition at line 290 of file PathDiagnostic.cpp.
References clang::MemberExpr::getMemberLoc(), and PathDiagnosticLocation().
| PathDiagnosticLocation PathDiagnosticLocation::createOperatorLoc | ( | const BinaryOperator * | BO, |
| const SourceManager & | SM | ||
| ) | [static] |
Create the location for the operator of the binary expression. Assumes the statement has a valid location.
Definition at line 284 of file PathDiagnostic.cpp.
References clang::BinaryOperator::getOperatorLoc(), and PathDiagnosticLocation().
Referenced by GenerateMinimalPathDiagnostic().
| PathDiagnosticLocation PathDiagnosticLocation::createSingleLocation | ( | const PathDiagnosticLocation & | PDL | ) | [static] |
Convert the given location into a single kind location.
Definition at line 370 of file PathDiagnostic.cpp.
References asLocation(), clang::FullSourceLoc::getManager(), and PathDiagnosticLocation().
Referenced by CompactPathDiagnostic().
| void clang::ento::PathDiagnosticLocation::flatten | ( | ) |
| const SourceManager& clang::ento::PathDiagnosticLocation::getManager | ( | ) | const [inline] |
Definition at line 240 of file PathDiagnostic.h.
References isValid().
| bool clang::ento::PathDiagnosticLocation::hasRange | ( | ) | const [inline] |
Definition at line 232 of file PathDiagnostic.h.
Referenced by clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece().
| void clang::ento::PathDiagnosticLocation::invalidate | ( | ) | [inline] |
Definition at line 234 of file PathDiagnostic.h.
References PathDiagnosticLocation().
| bool clang::ento::PathDiagnosticLocation::isValid | ( | ) | const [inline] |
Definition at line 217 of file PathDiagnostic.h.
Referenced by asDecl(), asStmt(), getManager(), clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece(), and clang::ento::ConditionBRVisitor::VisitNode().
| bool clang::ento::PathDiagnosticLocation::operator!= | ( | const PathDiagnosticLocation & | X | ) | const [inline] |
Definition at line 213 of file PathDiagnostic.h.
| bool clang::ento::PathDiagnosticLocation::operator== | ( | const PathDiagnosticLocation & | X | ) | const [inline] |
Definition at line 209 of file PathDiagnostic.h.
| void clang::ento::PathDiagnosticLocation::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const |
Referenced by clang::ento::PathDiagnosticLocationPair::Profile().