2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -fsyntax-only -verify
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-12-04 15:18:51 +08:00
|
|
|
// PR5543
|
|
|
|
|
2010-11-08 03:13:55 +08:00
|
|
|
struct A { int x; union { int* y; float* z; }; }; struct B : A {int a;};
|
2009-12-04 15:18:51 +08:00
|
|
|
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>(); }
|
|
|
|
|