summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-06-06 22:32:11 +0000
committerAnna Zaks <ganna@apple.com>2013-06-06 22:32:11 +0000
commitde2ae19cf6048efc38d47af09831e1786db4ee0a (patch)
treee9935bedd6a5b3dc6fb3a8d36a3221e369eea5eb /clang/lib/StaticAnalyzer/Core/BugReporter.cpp
parentb272a753280b107c612a29b3b21a10c18a5fd520 (diff)
downloadbcm5719-llvm-de2ae19cf6048efc38d47af09831e1786db4ee0a.tar.gz
bcm5719-llvm-de2ae19cf6048efc38d47af09831e1786db4ee0a.zip
[analyzer] Address Jordan’s code review for r183451
llvm-svn: 183455
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BugReporter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
index e3f43854d63..e93bb3fce5e 100644
--- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
@@ -248,7 +248,7 @@ static void adjustCallLocations(PathPieces &Pieces,
/// We might have pieces with invalid locations as a result of inlining Body
/// Farm generated functions.
static void removePiecesWithInvalidLocations(PathPieces &Pieces) {
- for (PathPieces::iterator I = Pieces.begin(), E = Pieces.end(); I != E; ++I) {
+ for (PathPieces::iterator I = Pieces.begin(), E = Pieces.end(); I != E;) {
if (PathDiagnosticCallPiece *C = dyn_cast<PathDiagnosticCallPiece>(*I))
removePiecesWithInvalidLocations(C->path);
@@ -257,10 +257,10 @@ static void removePiecesWithInvalidLocations(PathPieces &Pieces) {
if (!(*I)->getLocation().isValid() ||
!(*I)->getLocation().asLocation().isValid()) {
- Pieces.erase(I);
+ I = Pieces.erase(I);
continue;
}
-
+ I++;
}
}
OpenPOWER on IntegriCloud