diff options
author | Anna Zaks <ganna@apple.com> | 2011-09-15 20:06:34 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-09-15 20:06:34 +0000 |
commit | f2b4e6652f15ed3b9492216badc9688ba7ccfe38 (patch) | |
tree | 9ddeada853dfb29aea809efc9fbce175cd513354 | |
parent | 7489889dd4e0fb5cd4b4176c59283da3b217f14e (diff) |
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of SourceLocations (commit 4 of ?):
- The closing brace is always a single location, not a range.
- The test case previously had a location key 57:1 followed by a range [57:1 - 57:1].
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139832 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/StaticAnalyzer/Core/PathDiagnostic.cpp | 2 | ||||
-rw-r--r-- | test/Analysis/plist-output-alternate.m | 15 |
2 files changed, 1 insertions, 16 deletions
diff --git a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp index 8dcb03bc15..495451d261 100644 --- a/lib/StaticAnalyzer/Core/PathDiagnostic.cpp +++ b/lib/StaticAnalyzer/Core/PathDiagnostic.cpp @@ -132,7 +132,7 @@ void PathDiagnosticClient::HandlePathDiagnostic(const PathDiagnostic *D) { PathDiagnosticLocation::PathDiagnosticLocation(const LocationContext *lc, const SourceManager &sm) - : K(RangeK), S(0), D(0), SM(&sm), LC(lc) { + : K(SingleLocK), S(0), D(0), SM(&sm), LC(lc) { SourceLocation L = LC->getDecl()->getBodyRBrace(); R = SourceRange(L, L); } diff --git a/test/Analysis/plist-output-alternate.m b/test/Analysis/plist-output-alternate.m index b00a161202..9972011500 100644 --- a/test/Analysis/plist-output-alternate.m +++ b/test/Analysis/plist-output-alternate.m @@ -984,21 +984,6 @@ void rdar8331641(int x) { // CHECK: <key>col</key><integer>1</integer> // CHECK: <key>file</key><integer>0</integer> // CHECK: </dict> -// CHECK: <key>ranges</key> -// CHECK: <array> -// CHECK: <array> -// CHECK: <dict> -// CHECK: <key>line</key><integer>57</integer> -// CHECK: <key>col</key><integer>1</integer> -// CHECK: <key>file</key><integer>0</integer> -// CHECK: </dict> -// CHECK: <dict> -// CHECK: <key>line</key><integer>57</integer> -// CHECK: <key>col</key><integer>1</integer> -// CHECK: <key>file</key><integer>0</integer> -// CHECK: </dict> -// CHECK: </array> -// CHECK: </array> // CHECK: <key>extended_message</key> // CHECK: <string>Object leaked: object allocated and stored into 'value' is not referenced later in this execution path and has a retain count of +1</string> // CHECK: <key>message</key> |