From 7df15cd21f2db1b0665bc01e24f5ab889609e99f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 8 Feb 2012 22:48:17 +0000 Subject: [PATCH] Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted. llvm-svn: 150110 --- clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index 9399acfecdc2..642b6e394f1f 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -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(*I)) - if (!MP->containsEvent()) { - delete MP; + if (PathDiagnosticMacroPiece *MP = dyn_cast(*I)) + if (!MP->containsEvent()) continue; - } - PD.path.push_back(*I); } }