]> granicus.if.org Git - clang/commitdiff
[analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source...
authorAnna Zaks <ganna@apple.com>
Thu, 15 Sep 2011 20:06:34 +0000 (20:06 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 15 Sep 2011 20:06:34 +0000 (20:06 +0000)
 - 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

lib/StaticAnalyzer/Core/PathDiagnostic.cpp
test/Analysis/plist-output-alternate.m

index 8dcb03bc159d9ec6ed6d9e29496d80331caf89ef..495451d261e49c63564f65b1757722f1e003b12c 100644 (file)
@@ -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);
 }
index b00a1612025b43e335415f0bb1b32e5be60a6c46..9972011500127b146939eb74a2dd16b50acc02c8 100644 (file)
@@ -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 &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
 // CHECK:      <key>message</key>