aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/type-traits.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-08-14 02:06:07 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-08-14 02:06:07 +0000
commit2217f853e1909b80f87ce0dcec5543e894d11bc9 (patch)
tree085955010a8731a57efd1c9d31ef5ac984122d7e /test/SemaCXX/type-traits.cpp
parentf8ee6bc1ef0eec8e22b413dfc2baa3cfa4f19f91 (diff)
Make __is_convertible_to handle abstract types correctly. PR13591.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161828 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/type-traits.cpp')
-rw-r--r--test/SemaCXX/type-traits.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/type-traits.cpp b/test/SemaCXX/type-traits.cpp
index bf590f9c72..54294bcbb8 100644
--- a/test/SemaCXX/type-traits.cpp
+++ b/test/SemaCXX/type-traits.cpp
@@ -1574,6 +1574,8 @@ struct X0 {
template<typename U> X0(const X0<U>&);
};
+struct Abstract { virtual void f() = 0; };
+
void is_convertible_to() {
{ int arr[T(__is_convertible_to(Int, Int))]; }
{ int arr[F(__is_convertible_to(Int, IntAr))]; }
@@ -1598,6 +1600,7 @@ void is_convertible_to() {
{ int arr[F(__is_convertible_to(Function, Function))]; }
{ int arr[F(__is_convertible_to(PrivateCopy, PrivateCopy))]; }
{ int arr[T(__is_convertible_to(X0<int>, X0<float>))]; }
+ { int arr[F(__is_convertible_to(Abstract, Abstract))]; }
}
namespace is_convertible_to_instantiate {