clang
10.0.0git
|
PathDiagnostic - PathDiagnostic objects represent a single path-sensitive diagnostic. More...
#include "clang/Analysis/PathDiagnostic.h"
Public Types | |
using | meta_iterator = std::deque< std::string >::const_iterator |
Public Member Functions | |
PathDiagnostic ()=delete | |
PathDiagnostic (StringRef CheckerName, const Decl *DeclWithIssue, StringRef bugtype, StringRef verboseDesc, StringRef shortDesc, StringRef category, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique, std::unique_ptr< FilesToLineNumsMap > ExecutedLines) | |
~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 (PathDiagnosticPieceRef EndPiece) |
void | appendToDesc (StringRef S) |
StringRef | getVerboseDescription () const |
StringRef | getShortDescription () const |
StringRef | getCheckerName () const |
StringRef | getBugType () const |
StringRef | getCategory () const |
meta_iterator | meta_begin () const |
meta_iterator | meta_end () const |
void | addMeta (StringRef s) |
const FilesToLineNumsMap & | getExecutedLines () const |
FilesToLineNumsMap & | getExecutedLines () |
const Decl * | getDeclWithIssue () const |
Return the semantic context where an issue occurred. More... | |
void | setDeclWithIssue (const Decl *D) |
PathDiagnosticLocation | getLocation () const |
void | setLocation (PathDiagnosticLocation NewLoc) |
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 727 of file PathDiagnostic.h.
using clang::ento::PathDiagnostic::meta_iterator = std::deque<std::string>::const_iterator |
Definition at line 805 of file PathDiagnostic.h.
|
delete |
PathDiagnostic::PathDiagnostic | ( | StringRef | CheckerName, |
const Decl * | DeclWithIssue, | ||
StringRef | bugtype, | ||
StringRef | verboseDesc, | ||
StringRef | shortDesc, | ||
StringRef | category, | ||
PathDiagnosticLocation | LocationToUnique, | ||
const Decl * | DeclToUnique, | ||
std::unique_ptr< FilesToLineNumsMap > | ExecutedLines | ||
) |
Definition at line 119 of file PathDiagnostic.cpp.
|
default |
|
inline |
Definition at line 809 of file PathDiagnostic.h.
|
inline |
Definition at line 789 of file PathDiagnostic.h.
|
inline |
Definition at line 846 of file PathDiagnostic.h.
References clang::ento::PathDiagnosticLocation::flatten(), and clang::ento::PathDiagnosticConsumer::PDFileEntry::Profile().
unsigned PathDiagnostic::full_size | ( | ) |
Return the unrolled size of the path.
Definition at line 1059 of file PathDiagnostic.cpp.
References compute_path_size(), and path.
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 1125 of file PathDiagnostic.cpp.
References meta_begin(), meta_end(), path, and Profile().
|
inline |
Return the path currently used by builders for constructing the PathDiagnostic.
Definition at line 763 of file PathDiagnostic.h.
|
inline |
Definition at line 802 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
|
inline |
Definition at line 801 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 822 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 811 of file PathDiagnostic.h.
|
inline |
Definition at line 815 of file PathDiagnostic.h.
|
inline |
Definition at line 828 of file PathDiagnostic.h.
Referenced by compare(), clang::ento::PathDiagnosticEventPiece::dump(), clang::ento::PathDiagnosticCallPiece::dump(), clang::ento::PathDiagnosticNotePiece::dump(), clang::ento::PathDiagnosticPopUpPiece::dump(), and Profile().
|
inline |
Return a mutable version of 'path'.
Definition at line 770 of file PathDiagnostic.h.
|
inline |
Definition at line 797 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Get the declaration containing the uniqueing location.
Definition at line 842 of file PathDiagnostic.h.
|
inline |
Get the location on which the report should be uniqued.
Definition at line 837 of file PathDiagnostic.h.
|
inline |
Definition at line 795 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 780 of file PathDiagnostic.h.
|
inline |
Definition at line 807 of file PathDiagnostic.h.
Referenced by compare(), and FullProfile().
|
inline |
Definition at line 808 of file PathDiagnostic.h.
Referenced by compare(), and FullProfile().
|
inline |
Definition at line 778 of file PathDiagnostic.h.
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 1118 of file PathDiagnostic.cpp.
References getLocation().
Referenced by FullProfile().
|
inline |
Definition at line 777 of file PathDiagnostic.h.
|
inline |
Definition at line 824 of file PathDiagnostic.h.
|
inline |
Definition at line 782 of file PathDiagnostic.h.
References clang::ento::PathDiagnosticLocation::isValid().
|
inline |
Definition at line 832 of file PathDiagnostic.h.
const PathPieces& clang::ento::PathDiagnostic::path |
Definition at line 759 of file PathDiagnostic.h.
Referenced by compare(), full_size(), FullProfile(), clang::ento::PathDiagnosticConsumer::HandlePathDiagnostic(), and clang::ento::PathDiagnosticCallPiece::Profile().