summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-15 02:46:13 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-15 02:46:13 +0000
commit73777059f02c9a7b2489cbb7bc54fe7a737e8e95 (patch)
treedf29856fe9cfbddec13225ae65c7510e6e157d03 /clang/lib/Analysis/BugReporter.cpp
parent18665fe3c9f937c802552fab085573f9be463b04 (diff)
downloadbcm5719-llvm-73777059f02c9a7b2489cbb7bc54fe7a737e8e95.tar.gz
bcm5719-llvm-73777059f02c9a7b2489cbb7bc54fe7a737e8e95.zip
BugReporter (extensive diagnostics): Do not include the range of target '}'
llvm-svn: 71832
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 4a4784afe98..eedc18f56df 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/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);
}
}
OpenPOWER on IntegriCloud