summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/instantiate-decl-dtor.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-01 10:34:51 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-01 10:34:51 +0000
commitabe15e553e58165e7692c0d0842865c488ed7b45 (patch)
tree1e68501209c9133fbda8d45171e59f8d6f12dd55 /test/SemaTemplate/instantiate-decl-dtor.cpp
parent34d02d0b37f16015f317a935c48ce8b7b64ae77b (diff)
Notes
Diffstat (limited to 'test/SemaTemplate/instantiate-decl-dtor.cpp')
-rw-r--r--test/SemaTemplate/instantiate-decl-dtor.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-decl-dtor.cpp b/test/SemaTemplate/instantiate-decl-dtor.cpp
new file mode 100644
index 000000000000..193d9764c28c
--- /dev/null
+++ b/test/SemaTemplate/instantiate-decl-dtor.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+
+template <typename T> struct A {
+ T x;
+ A(int y) { x = y; }
+ ~A() { *x = 10; } // expected-error {{indirection requires pointer operand}}
+};
+
+void a() {
+ A<int> b = 10; // expected-note {{requested here}}
+}