forked from OSchip/llvm-project
33834516f3
Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. llvm-svn: 73332 |
||
---|---|---|
.. | ||
Analysis | ||
CXX | ||
CodeGen | ||
CodeGenCXX | ||
CodeGenObjC | ||
Coverage | ||
Driver | ||
FixIt | ||
Frontend | ||
Lexer | ||
Misc | ||
PCH | ||
Parser | ||
Preprocessor | ||
Rewriter | ||
Sema | ||
SemaCXX | ||
SemaObjC | ||
SemaObjCXX | ||
SemaTemplate | ||
CMakeLists.txt | ||
Makefile | ||
TestRunner.sh | ||
cxx-sections.data | ||
make_test_dirs.pl |