diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-22 16:15:03 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-22 16:15:03 +0000 |
commit | 5585114307b6ba4874546212cb6e5399cfff7ffb (patch) | |
tree | 78ae330d04a81719d4b7b155fdb9d753f9f0f37f /lib/Analysis/PathDiagnostic.cpp | |
parent | 5fc073fe3be1830c4479253b59ccd45eb5614c55 (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.cpp | 4 |
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); } |