[cfe-commits] r150110 - /cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp

Ted Kremenek kremenek at apple.com
Wed Feb 8 14:48:17 PST 2012


Author: kremenek
Date: Wed Feb  8 16:48:17 2012
New Revision: 150110

URL: http://llvm.org/viewvc/llvm-project?rev=150110&view=rev
Log:
Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted.

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=150110&r1=150109&r2=150110&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Wed Feb  8 16:48:17 2012
@@ -1631,12 +1631,9 @@
   PD.path.clear();
 
   for (PiecesTy::iterator I=Pieces.begin(), E=Pieces.end(); I!=E; ++I) {
-    if (PathDiagnosticMacroPiece *MP=dyn_cast<PathDiagnosticMacroPiece>(*I))
-      if (!MP->containsEvent()) {
-        delete MP;
+    if (PathDiagnosticMacroPiece *MP = dyn_cast<PathDiagnosticMacroPiece>(*I))
+      if (!MP->containsEvent())
         continue;
-      }
-
     PD.path.push_back(*I);
   }
 }





More information about the cfe-commits mailing list