Teach the diagnostic engine to provide more detailed information about
how to handle a diagnostic during template argument deduction, which
may be "substitution failure", "suppress", or "report". This keeps us
from, e.g., emitting warnings while performing template argument
deduction.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99560 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 7e2e614..5986b47 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -610,19 +610,7 @@
};
/// \brief Emit a diagnostic.
- SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) {
- if (isSFINAEContext() && Diagnostic::isBuiltinSFINAEDiag(DiagID)) {
- // If we encountered an error during template argument
- // deduction, and that error is one of the SFINAE errors,
- // suppress the diagnostic.
- ++NumSFINAEErrors;
- Diags.setLastDiagnosticIgnored();
- return SemaDiagnosticBuilder(*this);
- }
-
- DiagnosticBuilder DB = Diags.Report(FullSourceLoc(Loc, SourceMgr), DiagID);
- return SemaDiagnosticBuilder(DB, *this, DiagID);
- }
+ SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID);
/// \brief Emit a partial diagnostic.
SemaDiagnosticBuilder Diag(SourceLocation Loc, const PartialDiagnostic& PD);