summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-04-24 05:39:55 +0000
committerNico Weber <nicolasweber@gmx.de>2014-04-24 05:39:55 +0000
commitdc493cf13baad5543aec8555c25302e2440f2320 (patch)
tree511fa092131a7581c262f8d040b1a1c56a8854ac /clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
parenta3211b5dca8f27fd7f54cc53780dfdf0ae6d8301 (diff)
downloadbcm5719-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.cpp4
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,
OpenPOWER on IntegriCloud