[flang][cuda] Handle launch of cooperative kernel (#124362)
[llvm-project.git] / clang / test / CXX / basic / basic.lookup / basic.lookup.qual / namespace.qual / p5.cpp
blob5045baccb4d0ab6d662ffb46f64a8e7790b9af5c
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 namespace A {
4 struct x {}; // expected-note {{candidate found by name lookup is 'A::x'}}
5 int x; // expected-note {{candidate found by name lookup is 'A::x'}}
7 struct y {}; // expected-note {{type declaration hidden}}
9 struct z;
10 void z(float);
13 namespace B {
14 struct x {}; // expected-note {{candidate found by name lookup is 'B::x'}}
15 float x; // expected-note {{candidate found by name lookup is 'B::x'}}
17 float y; // expected-note {{declaration hides type}}
19 void z(int);
22 namespace AB {
23 using namespace A;
24 using namespace B;
27 void test() {
28 struct AB::x foo; // expected-error {{reference to 'x' is ambiguous}}
29 int i = AB::x; // expected-error {{reference to 'x' is ambiguous}}
31 struct AB::y bar;
32 float f = AB::y; // expected-error {{a type named 'y' is hidden by a declaration in a different namespace}}
33 AB::z(i);
34 AB::z(f);