[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / test / CXX / basic / basic.lookup / basic.lookup.argdep / p2-inline-namespace.cpp
blob19054f64154adcfa31c400c2c3721fb266767c7a
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 // C++11 [basic.lookup.argdep]p2
4 //
5 // [...] If an associated namespace is an inline namespace (10.3.1), its
6 // enclosing namespace is also included in the set. If an associated
7 // namespace directly contains inline namespaces, those inline namespaces
8 // are also included in the set.
10 namespace test1 {
11 namespace L {
12 namespace M {
13 inline namespace N {
14 inline namespace O {
15 struct S {};
16 void f1(S);
18 void f2(S);
20 void f3(S);
22 void f4(M::S); // expected-note {{declared here}}
25 void test() {
26 L::M::S s;
27 f1(s); // ok
28 f2(s); // ok
29 f3(s); // ok
30 f4(s); // expected-error {{use of undeclared}}
34 namespace test2 {
35 namespace L {
36 struct S {};
37 inline namespace M {
38 inline namespace N {
39 inline namespace O {
40 void f1(S);
42 void f2(S);
44 void f3(S);
46 void f4(S);
49 void test() {
50 L::S s;
51 f1(s); // ok
52 f2(s); // ok
53 f3(s); // ok
54 f4(s); // ok