diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-15 02:46:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-15 02:46:13 +0000 |
commit | 07c015cbcee31f72e2d320ba2c713c046bed42fa (patch) | |
tree | 0df857450672521117ddedc7387aae1c776d03e0 /lib/Analysis/BugReporter.cpp | |
parent | 1e63c29a2d9752f804d2b05015018d715a79525f (diff) |
BugReporter (extensive diagnostics): Do not include the range of target '}'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r-- | lib/Analysis/BugReporter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 4a4784afe9..eedc18f56d 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -865,7 +865,7 @@ class VISIBILITY_HIDDEN EdgeBuilder { void popLocation() { if (!CLocs.back().isDead() && CLocs.back().asLocation().isFileID()) { // For contexts, we only one the first character as the range. - rawAddEdge( cleanUpLocation(CLocs.back(), true)); + rawAddEdge(cleanUpLocation(CLocs.back(), true)); } CLocs.pop_back(); } @@ -1139,14 +1139,16 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, PathDiagnosticEventPiece *p = new PathDiagnosticEventPiece(L, - "Looping back to the head of the loop"); + "Looping back to the head of the loop"); EB.addEdge(p->getLocation(), true); PD.push_front(p); if (CS) { - EB.addEdge(PathDiagnosticLocation(CS->getRBracLoc(), - PDB.getSourceManager())); + PathDiagnosticLocation BL(CS->getRBracLoc(), + PDB.getSourceManager()); + BL = PathDiagnosticLocation(BL.asLocation()); + EB.addEdge(BL); } } |