Home | History | Annotate | Download | only in basic.lookup.udir
      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 
      7 struct ns1 {};
      8 void ns2();
      9 int ns3 = 0;
     10 
     11 namespace ns0 {
     12   namespace ns1 {
     13     struct test0 {};
     14   }
     15   namespace ns2 {
     16     struct test1 {};
     17   }
     18   namespace ns3 {
     19     struct test2 {};
     20   }
     21 }
     22 
     23 using namespace ns0;
     24 
     25 namespace test3 = ns1;
     26 namespace test4 = ns2;
     27 namespace test5 = ns3;
     28 
     29 using namespace ns1;
     30 using namespace ns2;
     31 using namespace ns3;
     32 
     33 test0 a;
     34 test1 b;
     35 test2 c;
     36 
     37