]> granicus.if.org Git - clang/commitdiff
Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted.
authorTed Kremenek <kremenek@apple.com>
Wed, 8 Feb 2012 22:48:17 +0000 (22:48 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 8 Feb 2012 22:48:17 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150110 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/BugReporter.cpp

index 9399acfecdc2b1a9c5bcb963ca553a7215f6de09..642b6e394f1ffdf87c3ba15d1de07098a43be2a0 100644 (file)
@@ -1631,12 +1631,9 @@ static void CompactPathDiagnostic(PathDiagnostic &PD, const SourceManager& SM) {
   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);
   }
 }