clang API Documentation

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

#include <PathDiagnostic.h>

List of all members.

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 StmtasStmt () const
const DeclasDecl () const
bool hasRange () const
void invalidate ()
void flatten ()
const SourceManagergetManager () 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.

Detailed Description

Definition at line 101 of file PathDiagnostic.h.


Constructor & Destructor Documentation

clang::ento::PathDiagnosticLocation::PathDiagnosticLocation ( ) [inline]
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().


Member Function Documentation

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]
PathDiagnosticRange clang::ento::PathDiagnosticLocation::asRange ( ) const [inline]
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]
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]
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]
void clang::ento::PathDiagnosticLocation::invalidate ( ) [inline]

Definition at line 234 of file PathDiagnostic.h.

References PathDiagnosticLocation().

bool clang::ento::PathDiagnosticLocation::isValid ( ) const [inline]
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

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