brintos

brintos / llvm-project-archived public Read only

0
0
Text · 509 B · 1060f61 Raw
43 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2// expected-no-diagnostics3 4// This is basically paraphrased from the standard.5 6namespace Root {7  int i = 0;8  void f();9}10 11namespace A {12  using namespace Root;13}14 15namespace B {16  using namespace Root;17}18 19namespace AB {20  using namespace A;21  using namespace B;22}23 24void test() {25  if (AB::i)26    AB::f();27}28 29namespace C {30  using Root::i;31  using Root::f;32}33 34namespace AC {35  using namespace A;36  using namespace C;37}38 39void test2() {40  if (AC::i)41    AC::f();42}43