|
clang 23.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, const Decl *AnalysisEntryPoint, std::unique_ptr< FilesToLineNumsMap > ExecutedLines) | |
| ~PathDiagnostic () | |
| PathPieces & | getActivePath () |
| Return the path currently used by builders for constructing the PathDiagnostic. | |
| PathPieces & | getMutablePieces () |
| Return a mutable version of 'path'. | |
| unsigned | full_size () |
| Return the unrolled size of the path. | |
| 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 * | getAnalysisEntryPoint () const |
| Get the top-level entry point from which this issue was discovered. | |
| const Decl * | getDeclWithIssue () const |
| Return the semantic context where an issue occurred. | |
| 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. | |
| const Decl * | getUniqueingDecl () const |
| Get the declaration containing the uniqueing location. | |
| SmallString< 32 > | getIssueHash (const SourceManager &SrcMgr, const LangOptions &LangOpts) const |
| Get a hash that identifies the issue. | |
| void | flattenLocations () |
| void | Profile (llvm::FoldingSetNodeID &ID) const |
| Profiles the diagnostic, independent of the path it references. | |
| void | FullProfile (llvm::FoldingSetNodeID &ID) const |
| Profiles the diagnostic, including its path. | |
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 762 of file PathDiagnostic.h.
| using clang::ento::PathDiagnostic::meta_iterator = std::deque<std::string>::const_iterator |
Definition at line 843 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, | ||
| const Decl * | AnalysisEntryPoint, | ||
| std::unique_ptr< FilesToLineNumsMap > | ExecutedLines ) |
Definition at line 110 of file PathDiagnostic.cpp.
References path, and StripTrailingDots().
|
default |
|
inline |
Definition at line 847 of file PathDiagnostic.h.
|
inline |
Definition at line 827 of file PathDiagnostic.h.
Referenced by resetDiagnosticLocationToMainFile().
|
inline |
Definition at line 891 of file PathDiagnostic.h.
| unsigned PathDiagnostic::full_size | ( | ) |
Return the unrolled size of the path.
Definition at line 1067 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 1147 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 801 of file PathDiagnostic.h.
Referenced by setEndOfPath().
|
inline |
Get the top-level entry point from which this issue was discovered.
Definition at line 858 of file PathDiagnostic.h.
|
inline |
Definition at line 840 of file PathDiagnostic.h.
Referenced by compare(), and getIssueHash().
|
inline |
Definition at line 841 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 839 of file PathDiagnostic.h.
Referenced by getIssueHash().
|
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 863 of file PathDiagnostic.h.
Referenced by compare(), and getIssueHash().
|
inline |
Definition at line 853 of file PathDiagnostic.h.
|
inline |
Definition at line 849 of file PathDiagnostic.h.
Referenced by printCoverage(), and updateExecutedLinesWithDiagnosticPieces().
| SmallString< 32 > PathDiagnostic::getIssueHash | ( | const SourceManager & | SrcMgr, |
| const LangOptions & | LangOpts ) const |
Get a hash that identifies the issue.
Definition at line 1074 of file PathDiagnostic.cpp.
References clang::ento::PathDiagnosticLocation::asLocation(), getBugType(), getCheckerName(), getDeclWithIssue(), clang::getIssueHash(), getLocation(), getUniqueingLoc(), and clang::ento::PathDiagnosticLocation::isValid().
|
inline |
Definition at line 869 of file PathDiagnostic.h.
Referenced by compare(), getIssueHash(), and Profile().
|
inline |
Return a mutable version of 'path'.
Definition at line 808 of file PathDiagnostic.h.
|
inline |
Definition at line 835 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Get the declaration containing the uniqueing location.
Definition at line 883 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Get the location on which the report should be uniqued.
Definition at line 878 of file PathDiagnostic.h.
Referenced by compare(), getIssueHash(), and Profile().
|
inline |
Definition at line 833 of file PathDiagnostic.h.
Referenced by compare().
|
inline |
Definition at line 818 of file PathDiagnostic.h.
|
inline |
Definition at line 845 of file PathDiagnostic.h.
Referenced by compare(), and FullProfile().
|
inline |
Definition at line 846 of file PathDiagnostic.h.
Referenced by compare(), and FullProfile().
|
inline |
Definition at line 816 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 1139 of file PathDiagnostic.cpp.
References getLocation(), and getUniqueingLoc().
Referenced by FullProfile().
|
inline |
Definition at line 815 of file PathDiagnostic.h.
|
inline |
Definition at line 865 of file PathDiagnostic.h.
Referenced by resetDiagnosticLocationToMainFile().
|
inline |
Definition at line 820 of file PathDiagnostic.h.
References getActivePath().
|
inline |
Definition at line 873 of file PathDiagnostic.h.
Referenced by resetDiagnosticLocationToMainFile().
| const PathPieces& clang::ento::PathDiagnostic::path |
Definition at line 797 of file PathDiagnostic.h.
Referenced by compare(), full_size(), FullProfile(), PathDiagnostic(), resetDiagnosticLocationToMainFile(), and updateExecutedLinesWithDiagnosticPieces().