mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Emit error diagnostic for a primary if all errors suppressed
This commit is contained in:
@@ -1651,6 +1651,9 @@ int swift::performFrontend(ArrayRef<const char *> Args,
|
||||
|
||||
auto finishDiagProcessing = [&](int retValue) -> int {
|
||||
FinishDiagProcessingCheckRAII.CalledFinishDiagProcessing = true;
|
||||
if (Instance->getDiags().hadOnlySuppressedFatalErrors())
|
||||
Instance->getDiags().diagnose(SourceLoc(),
|
||||
diag::error_compilation_failed);
|
||||
bool err = Instance->getDiags().finishProcessing();
|
||||
return retValue ? retValue : err;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user