Teach the evaluation of the __is_convertible_to trait to translate
commitd84df6d84ea12f308e4f96428d01d85772849868
authorDouglas Gregor <doug.gregor@gmail.com>
Thu, 27 Jan 2011 22:31:44 +0000 (27 22:31 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Thu, 27 Jan 2011 22:31:44 +0000 (27 22:31 +0000)
treee1bfa3ceb9e43935af8bb55969d8ee14d0c79508
parent847ebf117c2712ba9b93308c4a1dd3c46a412bd2
Teach the evaluation of the __is_convertible_to trait to translate
access control errors into SFINAE errors, so that the trait provides
enough support to implement the C++0x std::is_convertible type trait.

To get there, the SFINAETrap now knows how to set up a SFINAE context
independent of any template instantiations or template argument
deduction steps, and (separately) can set a Sema flag to translate
access control errors into SFINAE errors. The latter can also be
useful if we decide that access control errors during template argument
deduction should cause substitution failure (rather than a hard error)
as has been proposed for C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124446 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/Sema.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/SemaCXX/type-traits.cpp