diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/SemaTemplate/instantiate-complete.cpp | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/SemaTemplate/instantiate-complete.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-complete.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/test/SemaTemplate/instantiate-complete.cpp b/test/SemaTemplate/instantiate-complete.cpp index c13930d..4b27da7 100644 --- a/test/SemaTemplate/instantiate-complete.cpp +++ b/test/SemaTemplate/instantiate-complete.cpp @@ -11,8 +11,7 @@ struct X { // expected-error{{data member instantiated with function type 'int (int)'}} \ // expected-error{{data member instantiated with function type 'char (char)'}} \ // expected-error{{data member instantiated with function type 'short (short)'}} \ - // expected-error{{data member instantiated with function type 'float (float)'}} \ - // expected-error{{data member instantiated with function type 'long (long)'}} + // expected-error{{data member instantiated with function type 'float (float)'}} }; X<int> f() { return 0; } @@ -44,7 +43,6 @@ void test_memptr(X<long> *p1, long X<long>::*pm1, X<long(long)> *p2, long (X<long(long)>::*pm2)(long)) { (void)(p1->*pm1); - (void)((p2->*pm2)(0)); // expected-note{{in instantiation of template class 'X<long (long)>' requested here}} } // Reference binding to a base @@ -128,3 +126,23 @@ namespace pr7199 { template class B<int>; // expected-note {{in instantiation}} } + +namespace PR8425 { + template <typename T> + class BaseT {}; + + template <typename T> + class DerivedT : public BaseT<T> {}; + + template <typename T> + class FromT { + public: + operator DerivedT<T>() const { return DerivedT<T>(); } + }; + + void test() { + FromT<int> ft; + BaseT<int> bt(ft); + } +} + |