diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-20 01:38:47 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-20 01:38:47 +0000 |
commit | 1531bb0c69d9afff6a6434e4cadf345eb628b287 (patch) | |
tree | cb12b3eb00dd8f48093bd59ab9e6011b6f2917a3 /include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h | |
parent | eecb6a1e8b95fcdb7d1a0d92b0a0311c041440cd (diff) | |
download | clang-1531bb0c69d9afff6a6434e4cadf345eb628b287.tar.gz |
[analyzer] Use more create methods in the PathDiagnostic, cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h index 0c21788723..1b16ec50a0 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h @@ -143,13 +143,18 @@ public: const SourceManager &SM); /// Create a location corresponding to the given valid ExplodedNode. - PathDiagnosticLocation(const ProgramPoint& P, const SourceManager &SMng); + static PathDiagnosticLocation create(const ProgramPoint& P, + const SourceManager &SMng); /// Create a location corresponding to the next valid ExplodedNode as end /// of path location. static PathDiagnosticLocation createEndOfPath(const ExplodedNode* N, const SourceManager &SM); + /// Convert the given location into a single kind location. + static PathDiagnosticLocation createSingleLocation( + const PathDiagnosticLocation &PDL); + bool operator==(const PathDiagnosticLocation &X) const { return K == X.K && R == X.R && S == X.S && D == X.D && LC == X.LC; } @@ -173,16 +178,6 @@ public: *this = PathDiagnosticLocation(); } - /// Specify that the object represents a single location. - void setSingleLocKind() { - if (K == SingleLocK) - return; - - SourceLocation L = asLocation(); - K = SingleLocK; - R = SourceRange(L, L); - } - void flatten(); const SourceManager& getManager() const { assert(isValid()); return *SM; } |