]> granicus.if.org Git - clang/commitdiff
Reset FirstID (first diagnostic's file ID) to allow for invocations of the VerifyDiag...
authorAxel Naumann <Axel.Naumann@cern.ch>
Wed, 24 Aug 2011 13:36:19 +0000 (13:36 +0000)
committerAxel Naumann <Axel.Naumann@cern.ch>
Wed, 24 Aug 2011 13:36:19 +0000 (13:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138434 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/VerifyDiagnosticsClient.cpp

index fce7973d56a196c5dd931a633dcb6085a232ff7c..16c945b417a4cbb12f102c7c45e16365b9cdf01d 100644 (file)
@@ -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);