[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / member-expr-anonymous-union.cpp
blob246afee23990417b80cd3565cf60b5412923c6de
1 // RUN: %clang_cc1 %s -fsyntax-only -verify
2 // expected-no-diagnostics
3 // PR5543
5 struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;};
6 int* a(B* x) { return x->y; }
8 struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; }
9 int g() { return f<2>(); }