xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/member-expr-anonymous-union.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 %s -fsyntax-only -verify
2 // expected-no-diagnostics
3 // PR5543
4 
5 struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;};
a(B * x)6 int* a(B* x) { return x->y; }
7 
f()8 struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; }
g()9 int g() { return f<2>(); }
10 
11