summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/member-expr-anonymous-union.cpp
blob: 9566df4a20ff9223a5a316104af5e9c96f4bb20e (plain)
1
2
3
4
5
6
7
8
9
// RUN: clang-cc %s -fsyntax-only -verify
// PR5543

struct A { int x; union { int* y; float& z; }; }; struct B : A {int a;};
int* a(B* x) { return x->y; }

struct x { union { int y; }; }; x y; template <int X> int f() { return X+y.y; }
int g() { return f<2>(); }

OpenPOWER on IntegriCloud