diff options
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index f08e048bb80..28326eee7d0 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -2017,10 +2017,8 @@ static void removePunyEdges(PathPieces &path, continue; if (abs(startCol - endCol) <= 2) { - PathPieces::iterator PieceToErase = I; - ++I; + I = path.erase(I); erased = true; - path.erase(PieceToErase); continue; } } |