xref: /llvm-project/clang/test/CXX/expr/expr.prim/expr.prim.id/expr.prim.id.general/p4.cpp (revision 10b43f429a9f5cc7315c5b0490433647c9a93493)
1 // RUN: %clang_cc1 -verify %s
2 
3 struct A {
4   int x;
5 };
6 
7 void operator&(A, A);
8 
9 template<typename T>
10 struct B {
fB11   int f() {
12     return T::x & 1; // expected-error {{invalid use of non-static data member 'x'}}
13   }
14 };
15 
16 template struct B<A>; // expected-note {{in instantiation of}}
17