Home | History | Annotate | Download | only in namespace.qual
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 // This is basically paraphrased from the standard.
      4 
      5 namespace Root {
      6   int i = 0;
      7   void f();
      8 }
      9 
     10 namespace A {
     11   using namespace Root;
     12 }
     13 
     14 namespace B {
     15   using namespace Root;
     16 }
     17 
     18 namespace AB {
     19   using namespace A;
     20   using namespace B;
     21 }
     22 
     23 void test() {
     24   if (AB::i)
     25     AB::f();
     26 }
     27 
     28 namespace C {
     29   using Root::i;
     30   using Root::f;
     31 }
     32 
     33 namespace AC {
     34   using namespace A;
     35   using namespace C;
     36 }
     37 
     38 void test2() {
     39   if (AC::i)
     40     AC::f();
     41 }
     42