aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-11 16:50:36 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-11 16:50:36 +0000
commitc6d64a26c28bbeee50e06c94c4f4c08e610327b7 (patch)
treebdaf1e7360cdd97c0e27d3a33062c902c42f3728 /lib/Frontend
parent85663e7b40097b2f162f58ba9f4dae2d0f24f648 (diff)
Emit -verify diagnostics even when we have a fatal error.
Previously we'd halt at the fatal error as expected, but not actually emit any -verify-related diagnostics. This lets us catch cases that emit a /different/ fatal error from the one we expected. This is implemented by adding a "force emit" mode to DiagnosticBuilder, which will cause diagnostics to immediately be emitted regardless of current suppression. Needless to say this should probably be used /very/ sparingly. Patch by Andy Gibbs! Tests for all of Andy's -verify patches coming soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r--lib/Frontend/VerifyDiagnosticConsumer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/VerifyDiagnosticConsumer.cpp b/lib/Frontend/VerifyDiagnosticConsumer.cpp
index 1d9c196443..236b700662 100644
--- a/lib/Frontend/VerifyDiagnosticConsumer.cpp
+++ b/lib/Frontend/VerifyDiagnosticConsumer.cpp
@@ -387,7 +387,7 @@ static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceM
OS << ": " << I->second;
}
- Diags.Report(diag::err_verify_inconsistent_diags)
+ Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit()
<< Kind << /*Unexpected=*/true << OS.str();
return std::distance(diag_begin, diag_end);
}
@@ -411,7 +411,7 @@ static unsigned PrintExpected(DiagnosticsEngine &Diags, SourceManager &SourceMgr
OS << ": " << D.Text;
}
- Diags.Report(diag::err_verify_inconsistent_diags)
+ Diags.Report(diag::err_verify_inconsistent_diags).setForceEmit()
<< Kind << /*Unexpected=*/false << OS.str();
return DL.size();
}