diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-04-24 05:39:55 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-04-24 05:39:55 +0000 |
commit | dc493cf13baad5543aec8555c25302e2440f2320 (patch) | |
tree | 511fa092131a7581c262f8d040b1a1c56a8854ac /clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | |
parent | a3211b5dca8f27fd7f54cc53780dfdf0ae6d8301 (diff) | |
download | bcm5719-llvm-dc493cf13baad5543aec8555c25302e2440f2320.tar.gz bcm5719-llvm-dc493cf13baad5543aec8555c25302e2440f2320.zip |
Don't leak _all_ directives in -verify mode. Found by LSan, PR19520.
llvm-svn: 207079
Diffstat (limited to 'clang/lib/Frontend/VerifyDiagnosticConsumer.cpp')
-rw-r--r-- | clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp index 407c1d32972..d6d01156557 100644 --- a/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp +++ b/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp @@ -847,9 +847,7 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Reset the buffer, we have processed all the diagnostics in it. Buffer.reset(new TextDiagnosticBuffer()); - ED.Errors.clear(); - ED.Warnings.clear(); - ED.Notes.clear(); + ED.Reset(); } Directive *Directive::create(bool RegexKind, SourceLocation DirectiveLoc, |