diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 554bcb69c2d785a011a30e7db87a36a87fe7db10 (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaTemplate/instantiation-backtrace.cpp | |
parent | bb67ca86b31f67faee50bd10c3b036d65751745a (diff) | |
download | FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.zip FreeBSD-src-554bcb69c2d785a011a30e7db87a36a87fe7db10.tar.gz |
Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
Diffstat (limited to 'test/SemaTemplate/instantiation-backtrace.cpp')
-rw-r--r-- | test/SemaTemplate/instantiation-backtrace.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiation-backtrace.cpp b/test/SemaTemplate/instantiation-backtrace.cpp index 21456e9..f640836 100644 --- a/test/SemaTemplate/instantiation-backtrace.cpp +++ b/test/SemaTemplate/instantiation-backtrace.cpp @@ -30,3 +30,22 @@ struct G : A<T>, // expected-error{{implicit instantiation of undefined template void h() { (void)sizeof(G<int>); // expected-note{{in instantiation of template class 'G<int>' requested here}} } + +namespace PR13365 { + template <class T> class ResultTy { // expected-warning {{does not declare any constructor}} + T t; // expected-note {{reference member 't' will never be initialized}} + }; + + template <class T1, class T2> + typename ResultTy<T2>::error Deduce( void (T1::*member)(T2) ) {} // \ + // expected-note {{instantiation of template class 'PR13365::ResultTy<int &>'}} \ + // expected-note {{substituting deduced template arguments into function template 'Deduce' [with T1 = PR13365::Cls, T2 = int &]}} \ + // expected-note {{substitution failure [with T1 = PR13365::Cls, T2 = int &]}} + + struct Cls { + void method(int&); + }; + void test() { + Deduce(&Cls::method); // expected-error {{no matching function}} + } +} |