clang API Documentation
#include <PathDiagnostic.h>
Public Types | |
enum | Kind { ControlFlow, Event, Macro, Call } |
enum | DisplayHint { Above, Below } |
Public Member Functions | |
virtual | ~PathDiagnosticPiece () |
StringRef | getString () const |
void | setTag (const char *tag) |
Tag this PathDiagnosticPiece with the given C-string. | |
const void * | getTag () const |
Return the opaque tag (if any) on the PathDiagnosticPiece. | |
StringRef | getTagStr () const |
DisplayHint | getDisplayHint () const |
virtual PathDiagnosticLocation | getLocation () const =0 |
virtual void | flattenLocations ()=0 |
Kind | getKind () const |
void | addRange (SourceRange R) |
void | addRange (SourceLocation B, SourceLocation E) |
ArrayRef< SourceRange > | getRanges () const |
Return the SourceRanges associated with this PathDiagnosticPiece. | |
virtual void | Profile (llvm::FoldingSetNodeID &ID) const |
void | setAsLastInMainSourceFile () |
bool | isLastInMainSourceFile () const |
virtual void | dump () const =0 |
Protected Member Functions | |
PathDiagnosticPiece (StringRef s, Kind k, DisplayHint hint=Below) | |
PathDiagnosticPiece (Kind k, DisplayHint hint=Below) |
Definition at line 333 of file PathDiagnostic.h.
Definition at line 336 of file PathDiagnostic.h.
Definition at line 335 of file PathDiagnostic.h.
PathDiagnosticPiece::PathDiagnosticPiece | ( | StringRef | s, |
Kind | k, | ||
DisplayHint | hint = Below |
||
) | [protected] |
Definition at line 50 of file PathDiagnostic.cpp.
PathDiagnosticPiece::PathDiagnosticPiece | ( | Kind | k, |
DisplayHint | hint = Below |
||
) | [protected] |
Definition at line 55 of file PathDiagnostic.cpp.
PathDiagnosticPiece::~PathDiagnosticPiece | ( | ) | [virtual] |
Definition at line 58 of file PathDiagnostic.cpp.
void clang::ento::PathDiagnosticPiece::addRange | ( | SourceRange | R | ) | [inline] |
Definition at line 388 of file PathDiagnostic.h.
References clang::SourceRange::isValid().
Referenced by clang::ento::PathDiagnosticSpotPiece::PathDiagnosticSpotPiece().
void clang::ento::PathDiagnosticPiece::addRange | ( | SourceLocation | B, |
SourceLocation | E | ||
) | [inline] |
Definition at line 394 of file PathDiagnostic.h.
References clang::SourceLocation::isValid().
virtual void clang::ento::PathDiagnosticPiece::dump | ( | ) | const [pure virtual] |
virtual void clang::ento::PathDiagnosticPiece::flattenLocations | ( | ) | [pure virtual] |
DisplayHint clang::ento::PathDiagnosticPiece::getDisplayHint | ( | ) | const [inline] |
getDisplayHint - Return a hint indicating where the diagnostic should be displayed by the PathDiagnosticConsumer.
Definition at line 381 of file PathDiagnostic.h.
Kind clang::ento::PathDiagnosticPiece::getKind | ( | ) | const [inline] |
Definition at line 386 of file PathDiagnostic.h.
Referenced by clang::ento::PathDiagnosticSpotPiece::classof(), clang::ento::PathDiagnosticEventPiece::classof(), clang::ento::PathDiagnosticCallPiece::classof(), clang::ento::PathDiagnosticControlFlowPiece::classof(), clang::ento::PathDiagnosticMacroPiece::classof(), comparePiece(), and ReportPiece().
virtual PathDiagnosticLocation clang::ento::PathDiagnosticPiece::getLocation | ( | ) | const [pure virtual] |
Implemented in clang::ento::PathDiagnosticControlFlowPiece, clang::ento::PathDiagnosticCallPiece, and clang::ento::PathDiagnosticSpotPiece.
Referenced by CompactPathDiagnostic(), comparePiece(), clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic(), ReportEvent(), and clang::ento::PathDiagnostic::resetDiagnosticLocationToMainFile().
ArrayRef<SourceRange> clang::ento::PathDiagnosticPiece::getRanges | ( | ) | const [inline] |
Return the SourceRanges associated with this PathDiagnosticPiece.
Definition at line 401 of file PathDiagnostic.h.
Referenced by comparePiece(), clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic(), and ReportEvent().
StringRef clang::ento::PathDiagnosticPiece::getString | ( | ) | const [inline] |
Definition at line 367 of file PathDiagnostic.h.
Referenced by comparePiece(), removeIdenticalEvents(), ReportControlFlow(), ReportEvent(), and simplifySimpleBranches().
const void* clang::ento::PathDiagnosticPiece::getTag | ( | ) | const [inline] |
Return the opaque tag (if any) on the PathDiagnosticPiece.
Definition at line 373 of file PathDiagnostic.h.
Referenced by eventsDescribeSameCondition().
StringRef clang::ento::PathDiagnosticPiece::getTagStr | ( | ) | const [inline] |
Return the string representation of the tag. This is useful for debugging.
Definition at line 377 of file PathDiagnostic.h.
bool clang::ento::PathDiagnosticPiece::isLastInMainSourceFile | ( | ) | const [inline] |
Definition at line 409 of file PathDiagnostic.h.
Referenced by ReportCall().
void PathDiagnosticPiece::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const [virtual] |
Reimplemented in clang::ento::PathDiagnosticMacroPiece, clang::ento::PathDiagnosticControlFlowPiece, clang::ento::PathDiagnosticCallPiece, and clang::ento::PathDiagnosticSpotPiece.
Definition at line 1066 of file PathDiagnostic.cpp.
References getKind(), and Ranges.
Referenced by clang::ento::PathDiagnosticSpotPiece::Profile(), clang::ento::PathDiagnosticCallPiece::Profile(), and clang::ento::PathDiagnosticControlFlowPiece::Profile().
void clang::ento::PathDiagnosticPiece::setAsLastInMainSourceFile | ( | ) | [inline] |
Definition at line 405 of file PathDiagnostic.h.
void clang::ento::PathDiagnosticPiece::setTag | ( | const char * | tag | ) | [inline] |
Tag this PathDiagnosticPiece with the given C-string.
Definition at line 370 of file PathDiagnostic.h.
Referenced by clang::ento::TrackConstraintBRVisitor::VisitNode(), and clang::ento::ConditionBRVisitor::VisitNode().