aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PathDiagnostic.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-04-22 16:15:03 +0000
committerTed Kremenek <kremenek@apple.com>2008-04-22 16:15:03 +0000
commit5585114307b6ba4874546212cb6e5399cfff7ffb (patch)
tree78ae330d04a81719d4b7b155fdb9d753f9f0f37f /lib/Analysis/PathDiagnostic.cpp
parent5fc073fe3be1830c4479253b59ccd45eb5614c55 (diff)
PathDiagnosticClients now retain ownership of passed PathDiagnostics, requiring
them to not be stack-allocated. HTMLDiagnostics now batches PathDiagnostics before emitting HTML in its dtor. This is a workaround for a problem when we trampled the Preprocessor state when highlighting macros (sometimes resulting in an assertion failure). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PathDiagnostic.cpp')
-rw-r--r--lib/Analysis/PathDiagnostic.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp
index e4228c7744..28b76b38f1 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Analysis/PathDiagnostic.cpp
@@ -31,7 +31,7 @@ void PathDiagnosticClient::HandleDiagnostic(Diagnostic &Diags,
// Create a PathDiagnostic with a single piece.
- PathDiagnostic D;
+ PathDiagnostic* D = new PathDiagnostic();
// Ripped from TextDiagnostics::FormatDiagnostic. Perhaps we should
// centralize it somewhere?
@@ -68,7 +68,7 @@ void PathDiagnosticClient::HandleDiagnostic(Diagnostic &Diags,
++Ranges;
}
- D.push_front(P);
+ D->push_front(P);
HandlePathDiagnostic(D);
}