[cfe-commits] r138434 - /cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp

Axel Naumann Axel.Naumann at cern.ch
Wed Aug 24 06:36:19 PDT 2011


Author: axel
Date: Wed Aug 24 08:36:19 2011
New Revision: 138434

URL: http://llvm.org/viewvc/llvm-project?rev=138434&view=rev
Log:
Reset FirstID (first diagnostic's file ID) to allow for invocations of the VerifyDiagnosticsClient on several input files.

Modified:
    cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp

Modified: cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp?rev=138434&r1=138433&r2=138434&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp (original)
+++ cfe/trunk/lib/Frontend/VerifyDiagnosticsClient.cpp Wed Aug 24 08:36:19 2011
@@ -493,8 +493,10 @@
     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);





More information about the cfe-commits mailing list