blob: dab1ca82c2a59e2ba74bf78807c76a72f7da93b8 [file] [log] [blame]
Richard Smith6f1daa42016-12-16 00:58:48 +00001// RUN: %clang_cc1 -std=c++1z -verify %s
2
3namespace A {
4 int m, n;
5};
6
7namespace B {
8 using A::m, A::n, A::n;
9 int q = m + n;
10}
11
12struct X {
13 int x1, x2, y, z; // expected-note {{conflicting}}
14};
15struct Y {
16 int x1, x2, y, z; // expected-note {{target}}
17};
18struct Z : X, Y {
19 using X::x1,
20 blah::blah, // expected-error {{undeclared}}
21 X::x2, // expected-note {{previous}}
22 Y::y,
23 X::x2, // expected-error {{redeclaration}}
24 X::z,
25 Y::z; // expected-error {{conflicts with}}
26};
27int X::*px1 = &Z::x1;
28int X::*px2 = &Z::x2;
29int Y::*py = &Z::y;
30int X::*pz = &Z::z;