mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Fix issues with -verify mode
This commit fixes two weird bugs in -verify mode: 1. SourceLocs from the wrong SourceManager could be passed through a ForwardingDiagnosticConsumer into the DiagnosticVerifier. 2. -verify-additional-file did not error out correctly when the file couldn’t be opened. No tests, as we only have basic tests for the diagnostic verifier.
This commit is contained in:
@@ -307,6 +307,7 @@ bool CompilerInstance::setupDiagnosticVerifierIfNeeded() {
|
||||
Diagnostics.diagnose(SourceLoc(), diag::error_open_input_file,
|
||||
filename, result.getError().message());
|
||||
hadError |= true;
|
||||
continue;
|
||||
}
|
||||
|
||||
auto bufferID = SourceMgr.addNewSourceBuffer(std::move(result.get()));
|
||||
|
||||
Reference in New Issue
Block a user