From: Argyrios Kyrtzidis Date: Thu, 3 Nov 2011 20:57:33 +0000 (+0000) Subject: After resetting the diagnostic state, set the number of warning occurring in the... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27368f9f1942a42b668cd1d9426859566c4f8540;p=clang After resetting the diagnostic state, set the number of warning occurring in the preamble. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143647 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 0dd3a38da4..8d2884f750 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -1940,6 +1940,8 @@ bool ASTUnit::Reparse(RemappedFile *RemappedFiles, unsigned NumRemappedFiles) { // Clear out the diagnostics state. getDiagnostics().Reset(); ProcessWarningOptions(getDiagnostics(), Invocation->getDiagnosticOpts()); + if (OverrideMainBuffer) + getDiagnostics().setNumWarnings(NumWarningsInPreamble); // Parse the sources bool Result = Parse(OverrideMainBuffer);