instantiate-decl-dtor.cpp 256 B

1234567891011
  1. // RUN: %clang_cc1 %s -fsyntax-only -verify
  2. template <typename T> struct A {
  3. T x;
  4. A(int y) { x = y; }
  5. ~A() { *x = 10; } // expected-error {{indirection requires pointer operand}}
  6. };
  7. void a() {
  8. A<int> b = 10; // expected-note {{requested here}}
  9. }