class PathDiagnosticLocation
Declaration
class PathDiagnosticLocation { /* full declaration omitted */ };
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:195
Member Variables
- private enum Kind K = SingleLocK
- private const clang::Stmt* S = nullptr
- private const clang::Decl* D = nullptr
- private const clang::SourceManager* SM = nullptr
- private clang::FullSourceLoc Loc
- private clang::ento::PathDiagnosticRange Range
Method Overview
- private PathDiagnosticLocation(clang::SourceLocation L, const clang::SourceManager & sm, clang::ento::PathDiagnosticLocation::Kind kind)
- public PathDiagnosticLocation()
- public PathDiagnosticLocation(const clang::Stmt * s, const clang::SourceManager & sm, clang::ento::LocationOrAnalysisDeclContext lac)
- public PathDiagnosticLocation(const clang::Decl * d, const clang::SourceManager & sm)
- public PathDiagnosticLocation(clang::SourceLocation loc, const clang::SourceManager & sm)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public const clang::Decl * asDecl() const
- public clang::FullSourceLoc asLocation() const
- public clang::ento::PathDiagnosticRange asRange() const
- public const clang::Stmt * asStmt() const
- public static clang::ento::PathDiagnosticLocation create(const clang::ProgramPoint & P, const clang::SourceManager & SMng)
- public static clang::ento::PathDiagnosticLocation create(const clang::Decl * D, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createBegin(const clang::Decl * D, const clang::SourceManager & SM, const clang::ento::LocationOrAnalysisDeclContext LAC)
- public static clang::ento::PathDiagnosticLocation createBegin(const clang::Stmt * S, const clang::SourceManager & SM, const clang::ento::LocationOrAnalysisDeclContext LAC)
- public static clang::ento::PathDiagnosticLocation createBegin(const clang::Decl * D, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createBeginBrace(const clang::CompoundStmt * CS, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createConditionalColonLoc(const clang::ConditionalOperator * CO, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createDeclBegin(const clang::LocationContext * LC, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createDeclEnd(const clang::LocationContext * LC, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createEnd(const clang::Stmt * S, const clang::SourceManager & SM, const clang::ento::LocationOrAnalysisDeclContext LAC)
- public static clang::ento::PathDiagnosticLocation createEndBrace(const clang::CompoundStmt * CS, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createMemberLoc(const clang::MemberExpr * ME, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createOperatorLoc(const clang::BinaryOperator * BO, const clang::SourceManager & SM)
- public static clang::ento::PathDiagnosticLocation createSingleLocation(const clang::ento::PathDiagnosticLocation & PDL)
- public void dump() const
- public void flatten()
- private clang::FullSourceLoc genLocation(clang::SourceLocation L = clang::SourceLocation(), clang::ento::LocationOrAnalysisDeclContext LAC = (clang::AnalysisDeclContext *)nullptr) const
- private clang::ento::PathDiagnosticRange genRange(clang::ento::LocationOrAnalysisDeclContext LAC = (clang::AnalysisDeclContext *)nullptr) const
- public const clang::SourceManager & getManager() const
- public const clang::Stmt * getStmtOrNull() const
- public static clang::SourceLocation getValidSourceLocation(const clang::Stmt * S, clang::ento::LocationOrAnalysisDeclContext LAC, bool UseEndOfStatement = false)
- public bool hasRange() const
- public bool hasValidLocation() const
- public void invalidate()
- public bool isValid() const
Methods
¶PathDiagnosticLocation(
clang::SourceLocation L,
const clang::SourceManager& sm,
clang::ento::PathDiagnosticLocation::Kind
kind)
PathDiagnosticLocation(
clang::SourceLocation L,
const clang::SourceManager& sm,
clang::ento::PathDiagnosticLocation::Kind
kind)
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:205
Parameters
- clang::SourceLocation L
- const clang::SourceManager& sm
- clang::ento::PathDiagnosticLocation::Kind kind
¶PathDiagnosticLocation()
PathDiagnosticLocation()
Description
Create an invalid location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:217
¶PathDiagnosticLocation(
const clang::Stmt* s,
const clang::SourceManager& sm,
clang::ento::LocationOrAnalysisDeclContext
lac)
PathDiagnosticLocation(
const clang::Stmt* s,
const clang::SourceManager& sm,
clang::ento::LocationOrAnalysisDeclContext
lac)
Description
Create a location corresponding to the given statement.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:220
Parameters
- const clang::Stmt* s
- const clang::SourceManager& sm
- clang::ento::LocationOrAnalysisDeclContext lac
¶PathDiagnosticLocation(
const clang::Decl* d,
const clang::SourceManager& sm)
PathDiagnosticLocation(
const clang::Decl* d,
const clang::SourceManager& sm)
Description
Create a location corresponding to the given declaration.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:231
Parameters
- const clang::Decl* d
- const clang::SourceManager& sm
¶PathDiagnosticLocation(
clang::SourceLocation loc,
const clang::SourceManager& sm)
PathDiagnosticLocation(
clang::SourceLocation loc,
const clang::SourceManager& sm)
Description
Create a location at an explicit offset in the source. This should only be used if there are no more appropriate constructors.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:241
Parameters
- clang::SourceLocation loc
- const clang::SourceManager& sm
¶void Profile(llvm::FoldingSetNodeID& ID) const
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:368
Parameters
¶const clang::Decl* asDecl() const
const clang::Decl* asDecl() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:354
¶clang::FullSourceLoc asLocation() const
clang::FullSourceLoc asLocation() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:339
¶clang::ento::PathDiagnosticRange asRange() const
clang::ento::PathDiagnosticRange asRange() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:343
¶const clang::Stmt* asStmt() const
const clang::Stmt* asStmt() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:347
¶static clang::ento::PathDiagnosticLocation create(
const clang::ProgramPoint& P,
const clang::SourceManager& SMng)
static clang::ento::PathDiagnosticLocation create(
const clang::ProgramPoint& P,
const clang::SourceManager& SMng)
Description
Create a location corresponding to the given valid ProgramPoint.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:313
Parameters
- const clang::ProgramPoint& P
- const clang::SourceManager& SMng
¶static clang::ento::PathDiagnosticLocation create(
const clang::Decl* D,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation create(
const clang::Decl* D,
const clang::SourceManager& SM)
Description
Create a location corresponding to the given declaration.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:248
Parameters
- const clang::Decl* D
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createBegin(const clang::Decl* D,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
static clang::ento::PathDiagnosticLocation
createBegin(const clang::Decl* D,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
Description
Create a location for the beginning of the declaration. The third argument is ignored, useful for generic treatment of statements and declarations.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:261
Parameters
- const clang::Decl* D
- const clang::SourceManager& SM
- const clang::ento::LocationOrAnalysisDeclContext LAC
¶static clang::ento::PathDiagnosticLocation
createBegin(const clang::Stmt* S,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
static clang::ento::PathDiagnosticLocation
createBegin(const clang::Stmt* S,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
Description
Create a location for the beginning of the statement.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:267
Parameters
- const clang::Stmt* S
- const clang::SourceManager& SM
- const clang::ento::LocationOrAnalysisDeclContext LAC
¶static clang::ento::PathDiagnosticLocation
createBegin(const clang::Decl* D,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createBegin(const clang::Decl* D,
const clang::SourceManager& SM)
Description
Create a location for the beginning of the declaration.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:254
Parameters
- const clang::Decl* D
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createBeginBrace(const clang::CompoundStmt* CS,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createBeginBrace(const clang::CompoundStmt* CS,
const clang::SourceManager& SM)
Description
Create a location for the beginning of the compound statement. Assumes the statement has a valid location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:294
Parameters
- const clang::CompoundStmt* CS
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createConditionalColonLoc(
const clang::ConditionalOperator* CO,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createConditionalColonLoc(
const clang::ConditionalOperator* CO,
const clang::SourceManager& SM)
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:283
Parameters
- const clang::ConditionalOperator* CO
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createDeclBegin(const clang::LocationContext* LC,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createDeclBegin(const clang::LocationContext* LC,
const clang::SourceManager& SM)
Description
Create a location for the beginning of the enclosing declaration body. Defaults to the beginning of the first statement in the declaration body.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:304
Parameters
- const clang::LocationContext* LC
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createDeclEnd(const clang::LocationContext* LC,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createDeclEnd(const clang::LocationContext* LC,
const clang::SourceManager& SM)
Description
Constructs a location for the end of the enclosing declaration body. Defaults to the end of brace.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:309
Parameters
- const clang::LocationContext* LC
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createEnd(const clang::Stmt* S,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
static clang::ento::PathDiagnosticLocation
createEnd(const clang::Stmt* S,
const clang::SourceManager& SM,
const clang::ento::
LocationOrAnalysisDeclContext LAC)
Description
Create a location for the end of the statement. If the statement is a CompoundStatement, the location will point to the closing brace instead of following it.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:275
Parameters
- const clang::Stmt* S
- const clang::SourceManager& SM
- const clang::ento::LocationOrAnalysisDeclContext LAC
¶static clang::ento::PathDiagnosticLocation
createEndBrace(const clang::CompoundStmt* CS,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createEndBrace(const clang::CompoundStmt* CS,
const clang::SourceManager& SM)
Description
Create a location for the end of the compound statement. Assumes the statement has a valid location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:299
Parameters
- const clang::CompoundStmt* CS
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createMemberLoc(const clang::MemberExpr* ME,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createMemberLoc(const clang::MemberExpr* ME,
const clang::SourceManager& SM)
Description
For member expressions, return the location of the '.' or '->'. Assumes the statement has a valid location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:289
Parameters
- const clang::MemberExpr* ME
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createOperatorLoc(const clang::BinaryOperator* BO,
const clang::SourceManager& SM)
static clang::ento::PathDiagnosticLocation
createOperatorLoc(const clang::BinaryOperator* BO,
const clang::SourceManager& SM)
Description
Create the location for the operator of the binary expression. Assumes the statement has a valid location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:281
Parameters
- const clang::BinaryOperator* BO
- const clang::SourceManager& SM
¶static clang::ento::PathDiagnosticLocation
createSingleLocation(
const clang::ento::PathDiagnosticLocation&
PDL)
static clang::ento::PathDiagnosticLocation
createSingleLocation(
const clang::ento::PathDiagnosticLocation&
PDL)
Description
Convert the given location into a single kind location.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:317
Parameters
- const clang::ento::PathDiagnosticLocation& PDL
¶void dump() const
void dump() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:370
¶void flatten()
void flatten()
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:364
¶clang::FullSourceLoc genLocation(
clang::SourceLocation L =
clang::SourceLocation(),
clang::ento::LocationOrAnalysisDeclContext
LAC =
(clang::AnalysisDeclContext*)nullptr)
const
clang::FullSourceLoc genLocation(
clang::SourceLocation L =
clang::SourceLocation(),
clang::ento::LocationOrAnalysisDeclContext
LAC =
(clang::AnalysisDeclContext*)nullptr)
const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:208
Parameters
- clang::SourceLocation L = clang::SourceLocation()
- clang::ento::LocationOrAnalysisDeclContext LAC = (clang::AnalysisDeclContext *)nullptr
¶clang::ento::PathDiagnosticRange genRange(
clang::ento::LocationOrAnalysisDeclContext
LAC =
(clang::AnalysisDeclContext*)nullptr)
const
clang::ento::PathDiagnosticRange genRange(
clang::ento::LocationOrAnalysisDeclContext
LAC =
(clang::AnalysisDeclContext*)nullptr)
const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:212
Parameters
- clang::ento::LocationOrAnalysisDeclContext LAC = (clang::AnalysisDeclContext *)nullptr
¶const clang::SourceManager& getManager() const
const clang::SourceManager& getManager() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:366
¶const clang::Stmt* getStmtOrNull() const
const clang::Stmt* getStmtOrNull() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:348
¶static clang::SourceLocation
getValidSourceLocation(
const clang::Stmt* S,
clang::ento::LocationOrAnalysisDeclContext
LAC,
bool UseEndOfStatement = false)
static clang::SourceLocation
getValidSourceLocation(
const clang::Stmt* S,
clang::ento::LocationOrAnalysisDeclContext
LAC,
bool UseEndOfStatement = false)
Description
Construct a source location that corresponds to either the beginning or the end of the given statement, or a nearby valid source location if the statement does not have a valid source location of its own.
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:324
Parameters
- const clang::Stmt* S
- clang::ento::LocationOrAnalysisDeclContext LAC
- bool UseEndOfStatement = false
¶bool hasRange() const
bool hasRange() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:356
¶bool hasValidLocation() const
bool hasValidLocation() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:358
¶void invalidate()
void invalidate()
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:360
¶bool isValid() const
bool isValid() const
Declared at: clang/include/clang/Analysis/PathDiagnostic.h:335