summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/destructor-template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaTemplate/destructor-template.cpp')
-rw-r--r--test/SemaTemplate/destructor-template.cpp8
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'}}
+}