r182506 - Simplifiy code using return value of erase().

Ted Kremenek kremenek at apple.com
Wed May 22 12:25:03 PDT 2013


Author: kremenek
Date: Wed May 22 14:25:03 2013
New Revision: 182506

URL: http://llvm.org/viewvc/llvm-project?rev=182506&view=rev
Log:
Simplifiy code using return value of erase().

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=182506&r1=182505&r2=182506&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Wed May 22 14:25:03 2013
@@ -2017,10 +2017,8 @@ static void removePunyEdges(PathPieces &
       continue;
 
     if (abs(startCol - endCol) <= 2) {
-      PathPieces::iterator PieceToErase = I;
-      ++I;
+      I = path.erase(I);
       erased = true;
-      path.erase(PieceToErase);
       continue;
     }
   }





More information about the cfe-commits mailing list