Skip to content

Commit b2ddd68

Browse files
committed
[DiagnosticVerifier] Enable -verify-ignore-unrelated
This enables the previously added -verify-ignore-unrelated flag. When -verify is used without -verify-ignore-unrelated, diagnostics emitted in buffers other than the main file and those passed with -verify-additional-file (except diagnostics emitted at <unknown>:0) will now result in an error. They were previously ignored. The old behaviour is still available as opt-in using -verify-ignore-unrelated.
1 parent cbc0ec3 commit b2ddd68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Frontend/DiagnosticVerifier.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,11 @@ bool DiagnosticVerifier::finishProcessing() {
15611561
// For <unknown>, all errors are unexpected.
15621562
Result.HadUnexpectedDiag |= HadError;
15631563
}
1564+
if (!IgnoreUnrelated) {
1565+
bool HadError = verifyUnrelated(CapturedDiagnostics);
1566+
Result.HadError |= HadError;
1567+
Result.HadUnexpectedDiag |= HadError;
1568+
}
15641569

15651570
if (Result.HadUnexpectedDiag)
15661571
printRemainingDiagnostics();

0 commit comments

Comments
 (0)