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