clang
3.9.0
|
PathDiagnostic - PathDiagnostic objects represent a single path-sensitive diagnostic. More...
#include <PathDiagnostic.h>
Public Types | |
typedef std::deque < std::string > ::const_iterator | meta_iterator |
Public Member Functions | |
PathDiagnostic (StringRef CheckName, const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, StringRef category, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) | |
~PathDiagnostic () | |
PathPieces & | getActivePath () |
Return the path currently used by builders for constructing the PathDiagnostic. More... | |
PathPieces & | getMutablePieces () |
Return a mutable version of 'path'. More... | |
unsigned | full_size () |
Return the unrolled size of the path. More... | |
void | pushActivePath (PathPieces *p) |
void | popActivePath () |
bool | isWithinCall () const |
void | setEndOfPath (std::unique_ptr< PathDiagnosticPiece > EndPiece) |
void | appendToDesc (StringRef S) |
void | resetPath () |
void | resetDiagnosticLocationToMainFile () |
If the last piece of the report point to the header file, resets the location of the report to be the last location in the main source file. More... | |
StringRef | getVerboseDescription () const |
StringRef | getShortDescription () const |
StringRef | getCheckName () const |
StringRef | getBugType () const |
StringRef | getCategory () const |
const Decl * | getDeclWithIssue () const |
Return the semantic context where an issue occurred. More... | |
meta_iterator | meta_begin () const |
meta_iterator | meta_end () const |
void | addMeta (StringRef s) |
PathDiagnosticLocation | getLocation () const |
PathDiagnosticLocation | getUniqueingLoc () const |
Get the location on which the report should be uniqued. More... | |
const Decl * | getUniqueingDecl () const |
Get the declaration containing the uniqueing location. More... | |
void | flattenLocations () |
void | Profile (llvm::FoldingSetNodeID &ID) const |
Profiles the diagnostic, independent of the path it references. More... | |
void | FullProfile (llvm::FoldingSetNodeID &ID) const |
Profiles the diagnostic, including its path. More... | |
Public Attributes | |
const PathPieces & | path |
PathDiagnostic - PathDiagnostic objects represent a single path-sensitive diagnostic.
It represents an ordered-collection of PathDiagnosticPieces, each which represent the pieces of the path.
Definition at line 716 of file PathDiagnostic.h.
typedef std::deque<std::string>::const_iterator clang::ento::PathDiagnostic::meta_iterator |
Definition at line 805 of file PathDiagnostic.h.
PathDiagnostic::PathDiagnostic | ( | StringRef | CheckName, |
const Decl * | DeclWithIssue, | ||
StringRef | bugtype, | ||
StringRef | verboseDesc, | ||
StringRef | shortDesc, | ||
StringRef | category, | ||
PathDiagnosticLocation | LocationToUnique, | ||
const Decl * | DeclToUnique | ||
) |
Definition at line 106 of file PathDiagnostic.cpp.
PathDiagnostic::~PathDiagnostic | ( | ) |
Definition at line 104 of file PathDiagnostic.cpp.
|
inline |
Definition at line 808 of file PathDiagnostic.h.
|
inline |
Definition at line 775 of file PathDiagnostic.h.
References S.
Referenced by resetDiagnosticLocationToMainFile().
|
inline |
Definition at line 825 of file PathDiagnostic.h.
unsigned PathDiagnostic::full_size | ( | ) |
Return the unrolled size of the path.
Definition at line 1046 of file PathDiagnostic.cpp.
References compute_path_size().
void PathDiagnostic::FullProfile | ( | llvm::FoldingSetNodeID & | ID | ) | const |
Profiles the diagnostic, including its path.
Two diagnostics with the same issue along different paths will generate different profiles.
Definition at line 1108 of file PathDiagnostic.cpp.
References E, I, and clang::Profile().
|
inline |
Return the path currently used by builders for constructing the PathDiagnostic.
Definition at line 749 of file PathDiagnostic.h.
Referenced by GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), GenerateMinimalPathDiagnostic(), and setEndOfPath().
|
inline |
Definition at line 797 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 798 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 796 of file PathDiagnostic.h.
|
inline |
Return the semantic context where an issue occurred.
If the issue occurs along a path, this represents the "central" area where the bug manifests.
Definition at line 803 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 810 of file PathDiagnostic.h.
Referenced by compare(), and GenerateAlternateExtensivePathDiagnostic().
|
inline |
Return a mutable version of 'path'.
Definition at line 756 of file PathDiagnostic.h.
Referenced by GenerateMinimalPathDiagnostic(), and clang::ento::GRBugReporter::generatePathDiagnostic().
|
inline |
Definition at line 793 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Get the declaration containing the uniqueing location.
Definition at line 821 of file PathDiagnostic.h.
|
inline |
Get the location on which the report should be uniqued.
Definition at line 816 of file PathDiagnostic.h.
|
inline |
Definition at line 792 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 766 of file PathDiagnostic.h.
Referenced by GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), and GenerateMinimalPathDiagnostic().
|
inline |
Definition at line 806 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 807 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 764 of file PathDiagnostic.h.
Referenced by GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), and GenerateMinimalPathDiagnostic().
void PathDiagnostic::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const |
Profiles the diagnostic, independent of the path it references.
This can be used to merge diagnostics that refer to the same issue along different paths.
Definition at line 1101 of file PathDiagnostic.cpp.
References Category.
|
inline |
Definition at line 763 of file PathDiagnostic.h.
Referenced by GenerateAlternateExtensivePathDiagnostic(), GenerateExtensivePathDiagnostic(), and GenerateMinimalPathDiagnostic().
void PathDiagnostic::resetDiagnosticLocationToMainFile | ( | ) |
If the last piece of the report point to the header file, resets the location of the report to be the last location in the main source file.
Definition at line 152 of file PathDiagnostic.cpp.
References appendToDesc(), clang::NamedDecl::getDeclName(), getFirstStackedCallToHeaderFile(), clang::ento::PathDiagnosticPiece::getLocation(), clang::ento::PathDiagnosticLocation::getManager(), and path.
|
inline |
Definition at line 781 of file PathDiagnostic.h.
Referenced by clang::ento::GRBugReporter::generatePathDiagnostic().
|
inline |
Definition at line 768 of file PathDiagnostic.h.
References getActivePath().
Referenced by clang::ento::GRBugReporter::generatePathDiagnostic().
const PathPieces& clang::ento::PathDiagnostic::path |
Definition at line 745 of file PathDiagnostic.h.
Referenced by compare(), clang::ento::GRBugReporter::generatePathDiagnostic(), and resetDiagnosticLocationToMainFile().