From: Anna Zaks Date: Thu, 15 Sep 2011 20:06:34 +0000 (+0000) Subject: [analyzer] Refactor: make PathDiagnosticLocation responsible for validation of Source... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2b4e6652f15ed3b9492216badc9688ba7ccfe38;p=clang [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 --- 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: col1 // CHECK: file0 // CHECK: -// CHECK: ranges -// CHECK: -// CHECK: -// CHECK: -// CHECK: line57 -// CHECK: col1 -// CHECK: file0 -// CHECK: -// CHECK: -// CHECK: line57 -// CHECK: col1 -// CHECK: file0 -// CHECK: -// CHECK: -// CHECK: // CHECK: extended_message // CHECK: Object leaked: object allocated and stored into 'value' is not referenced later in this execution path and has a retain count of +1 // CHECK: message