diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-08-09 23:37:05 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-08-09 23:37:05 +0000 |
commit | ee138f6478e62f77e90418fd133ba8d637a9248a (patch) | |
tree | 0a6916d79fa64bc800a0aa827902c8fcc34fe5f1 /test/SemaTemplate | |
parent | f68af647dda5cca00b49be27d24f62b0a7fff986 (diff) | |
download | clang-ee138f6478e62f77e90418fd133ba8d637a9248a.tar.gz |
Correctly profile CXXPseudoDestructorExprs.
CXXPseudoDestructorExprs may not contain a type. PR16852.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/destructor-template.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SemaTemplate/destructor-template.cpp b/test/SemaTemplate/destructor-template.cpp index 6806c24a84..4e1af9ad1f 100644 --- a/test/SemaTemplate/destructor-template.cpp +++ b/test/SemaTemplate/destructor-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template<typename A> class s0 { @@ -76,3 +76,9 @@ namespace rdar13140795 { Marshal<int>::gc(); } } + +namespace PR16852 { + template<typename T> struct S { int a; T x; }; + template<typename T> decltype(S<T>().~S()) f(); // expected-note {{candidate template ignored: couldn't infer template argument 'T'}} + void g() { f(); } // expected-error {{no matching function for call to 'f'}} +} |