Clang Project

clang_source_code/test/SemaCXX/PR35832.cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// expected-no-diagnostics
4
5class B {
6public:
7 int i;
8 struct {  struct { union { int j; }; };  };
9 union { int k; };
10};
11
12class X : public B { };
13class Y : public B { };
14
15class Z : public X, public Y {
16public:
17 int a() { return X::i; }
18 int b() { return X::j; }
19 int c() { return X::k; }
20 int d() { return this->X::j; }
21};
22