clang/test/SemaCXX/lookup-through-export.cpp
raw| 1 | // RUN: %clang_cc1 -std=c++20 %s -verify |
| 2 | |
| 3 | // expected-no-diagnostics |
| 4 | export module X; |
| 5 | export { |
| 6 | namespace A { |
| 7 | namespace B { |
| 8 | int bar; |
| 9 | } |
| 10 | } // namespace A |
| 11 | namespace C { |
| 12 | void foo() { |
| 13 | using namespace A; |
| 14 | (void)B::bar; |
| 15 | } |
| 16 | } // namespace C |
| 17 | } |
| 18 | |
| 19 | export { |
| 20 | namespace D { |
| 21 | namespace E { |
| 22 | int bar; |
| 23 | } |
| 24 | } // namespace D |
| 25 | namespace F { |
| 26 | void foo() { |
| 27 | using namespace D; |
| 28 | (void)E::bar; |
| 29 | } |
| 30 | } // namespace F |
| 31 | } |