1// RUN: %clang_cc1 -fsyntax-only -verify %s
2// expected-no-diagnostics
3
4// When looking up a namespace-name in a using-directive or
5// namespace-alias-definition, only namespace names are considered.
6
7struct ns1 {};
8void ns2();
9int ns3 = 0;
10
11namespace ns0 {
12  namespace ns1 {
13    struct test0 {};
14  }
15  namespace ns2 {
16    struct test1 {};
17  }
18  namespace ns3 {
19    struct test2 {};
20  }
21}
22
23using namespace ns0;
24
25namespace test3 = ns1;
26namespace test4 = ns2;
27namespace test5 = ns3;
28
29using namespace ns1;
30using namespace ns2;
31using namespace ns3;
32
33test0 a;
34test1 b;
35test2 c;
36
37