mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:36:42 +00:00

This mimics the style of 90010c2e1 (Don't consider 'LinkageSpec' when calculating DeclContext 'Encloses'). Since ExportDecl and LinkageSpec are transparent DeclContext, they share some similarity. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D116911
32 lines
431 B
C++
32 lines
431 B
C++
// RUN: %clang_cc1 -std=c++20 %s -verify
|
|
|
|
// expected-no-diagnostics
|
|
export module X;
|
|
export {
|
|
namespace A {
|
|
namespace B {
|
|
int bar;
|
|
}
|
|
} // namespace A
|
|
namespace C {
|
|
void foo() {
|
|
using namespace A;
|
|
(void)B::bar;
|
|
}
|
|
} // namespace C
|
|
}
|
|
|
|
export {
|
|
namespace D {
|
|
namespace E {
|
|
int bar;
|
|
}
|
|
} // namespace D
|
|
namespace F {
|
|
void foo() {
|
|
using namespace D;
|
|
(void)E::bar;
|
|
}
|
|
} // namespace F
|
|
}
|