xref: /minix3/external/bsd/llvm/dist/clang/test/SemaTemplate/instantiate-decl-dtor.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -fsyntax-only -verify
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc template <typename T> struct A {
4*f4a2713aSLionel Sambuc   T x;
AA5*f4a2713aSLionel Sambuc   A(int y) { x = y; }
~AA6*f4a2713aSLionel Sambuc   ~A() { *x = 10; } // expected-error {{indirection requires pointer operand}}
7*f4a2713aSLionel Sambuc };
8*f4a2713aSLionel Sambuc 
a()9*f4a2713aSLionel Sambuc void a() {
10*f4a2713aSLionel Sambuc   A<int> b = 10; // expected-note {{requested here}}
11*f4a2713aSLionel Sambuc }
12