From: Ted Kremenek Date: Wed, 22 May 2013 19:25:03 +0000 (+0000) Subject: Simplifiy code using return value of erase(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a705980a7c3315b7c72d99ce675342ad91b50642;p=clang Simplifiy code using return value of erase(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182506 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index f08e048bb8..28326eee7d 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/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; } }