From: Axel Naumann Date: Wed, 24 Aug 2011 13:36:19 +0000 (+0000) Subject: Reset FirstID (first diagnostic's file ID) to allow for invocations of the VerifyDiag... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84c05e3b873a95c8c8d64fa8083407bcf395383f;p=clang Reset FirstID (first diagnostic's file ID) to allow for invocations of the VerifyDiagnosticsClient on several input files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138434 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/VerifyDiagnosticsClient.cpp b/lib/Frontend/VerifyDiagnosticsClient.cpp index fce7973d56..16c945b417 100644 --- a/lib/Frontend/VerifyDiagnosticsClient.cpp +++ b/lib/Frontend/VerifyDiagnosticsClient.cpp @@ -493,8 +493,10 @@ void VerifyDiagnosticsClient::CheckDiagnostics() { if (!FirstErrorFID.isInvalid() && FirstErrorFID != SM.getMainFileID() && (!SM.getFileEntryForID(FirstErrorFID) || (SM.getFileEntryForID(FirstErrorFID) != - SM.getFileEntryForID(SM.getMainFileID())))) + SM.getFileEntryForID(SM.getMainFileID())))) { FindExpectedDiags(*CurrentPreprocessor, ED, FirstErrorFID); + FirstErrorFID = FileID(); + } // Check that the expected diagnostics occurred. NumErrors += CheckResults(Diags, SM, *Buffer, ED);