aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorJorge Gorbe Moya <jgorbe@google.com>2022-03-31 14:54:41 -0700
committerJorge Gorbe Moya <jgorbe@google.com>2022-03-31 14:54:41 -0700
commitfc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7 (patch)
treef0edf12cddc46c91583f81ac6c0cbd412fd0256e /clang/lib/CodeGen/CodeGenAction.cpp
parentde4bcdc2baccc0ce478f2f34e201079102983a5b (diff)
downloadllvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.zip
llvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.tar.gz
llvm-fc7573f29c79a4bbcfc0d6d001b7c7ae9f1344c7.tar.bz2
Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 46774df307159444d65083c2fd82f8574f0ab1d9.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 6780820..807880f 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -340,15 +340,6 @@ namespace clang {
CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone)
Ctx.setDiagnosticsHotnessRequested(true);
- if (CodeGenOpts.MisExpect) {
- Ctx.setMisExpectWarningRequested(true);
- }
-
- if (CodeGenOpts.DiagnosticsMisExpectTolerance) {
- Ctx.setDiagnosticsMisExpectTolerance(
- CodeGenOpts.DiagnosticsMisExpectTolerance);
- }
-
// Link each LinkModule into our module.
if (LinkInModules())
return;
@@ -449,9 +440,6 @@ namespace clang {
void OptimizationFailureHandler(
const llvm::DiagnosticInfoOptimizationFailure &D);
void DontCallDiagHandler(const DiagnosticInfoDontCall &D);
- /// Specialized handler for misexpect warnings.
- /// Note that misexpect remarks are emitted through ORE
- void MisExpectDiagHandler(const llvm::DiagnosticInfoMisExpect &D);
};
void BackendConsumer::anchor() {}
@@ -833,25 +821,6 @@ void BackendConsumer::DontCallDiagHandler(const DiagnosticInfoDontCall &D) {
<< llvm::demangle(D.getFunctionName().str()) << D.getNote();
}
-void BackendConsumer::MisExpectDiagHandler(
- const llvm::DiagnosticInfoMisExpect &D) {
- StringRef Filename;
- unsigned Line, Column;
- bool BadDebugInfo = false;
- FullSourceLoc Loc =
- getBestLocationFromDebugLoc(D, BadDebugInfo, Filename, Line, Column);
-
- Diags.Report(Loc, diag::warn_profile_data_misexpect) << D.getMsg().str();
-
- if (BadDebugInfo)
- // If we were not able to translate the file:line:col information
- // back to a SourceLocation, at least emit a note stating that
- // we could not translate this location. This can happen in the
- // case of #line directives.
- Diags.Report(Loc, diag::note_fe_backend_invalid_loc)
- << Filename << Line << Column;
-}
-
/// This function is invoked when the backend needs
/// to report something to the user.
void BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &DI) {
@@ -926,9 +895,6 @@ void BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &DI) {
case llvm::DK_DontCall:
DontCallDiagHandler(cast<DiagnosticInfoDontCall>(DI));
return;
- case llvm::DK_MisExpect:
- MisExpectDiagHandler(cast<DiagnosticInfoMisExpect>(DI));
- return;
default:
// Plugin IDs are not bound to any value as they are set dynamically.
ComputeDiagRemarkID(Severity, backend_plugin, DiagID);