Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted.

llvm-svn: 150110
This commit is contained in:
Ted Kremenek 2012-02-08 22:48:17 +00:00
parent 2ffa754a6f
commit 7df15cd21f
1 changed files with 2 additions and 5 deletions

View 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);
}
}