Reset FirstID (first diagnostic's file ID) to allow for invocations of the VerifyDiagnosticsClient on several input files.

llvm-svn: 138434
This commit is contained in:
Axel Naumann 2011-08-24 13:36:19 +00:00
parent 6e3c83eb1c
commit 744f121e5b
1 changed files with 3 additions and 1 deletions

View 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);