diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-02-08 22:48:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-02-08 22:48:17 +0000 |
commit | af84f8fea486dde096466e85f4bca7c8d3ff4571 (patch) | |
tree | 2fdcfa4ca70d2d8b34e969817100d0de4d0c0a39 /lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | e0adbd8386d9ff7312b74e4d2d1f27337f94732c (diff) |
Remove explicit delete of PathDiagnosticMacroPiece, as it is now reference counted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150110 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 9399acfecd..642b6e394f 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/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<PathDiagnosticMacroPiece>(*I)) - if (!MP->containsEvent()) { - delete MP; + if (PathDiagnosticMacroPiece *MP = dyn_cast<PathDiagnosticMacroPiece>(*I)) + if (!MP->containsEvent()) continue; - } - PD.path.push_back(*I); } } |