mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 18:06:32 +00:00

They might have different visibility, and thus discarding all but one of them can result in rejecting valid code. Also fix name lookup to cope with multiple using-directives being found that denote the same namespace, where some are not visible -- don't cache an "already visited" state for a using-directive that we didn't visit because it was hidden. llvm-svn: 316965
38 lines
856 B
C++
38 lines
856 B
C++
// RUN: %clang_cc1 -fmodules -fmodules-local-submodule-visibility -verify %s
|
|
// expected-no-diagnostics
|
|
#pragma clang module build M
|
|
module M { module TDFNodes {} module TDFInterface {} }
|
|
#pragma clang module contents
|
|
// TDFNodes
|
|
#pragma clang module begin M.TDFNodes
|
|
namespace Detail {
|
|
namespace TDF {
|
|
class TLoopManager {};
|
|
}
|
|
}
|
|
namespace Internal {
|
|
namespace TDF {
|
|
using namespace Detail::TDF;
|
|
}
|
|
}
|
|
#pragma clang module end
|
|
|
|
// TDFInterface
|
|
#pragma clang module begin M.TDFInterface
|
|
#pragma clang module import M.TDFNodes
|
|
namespace Internal {
|
|
namespace TDF {
|
|
using namespace Detail::TDF;
|
|
}
|
|
}
|
|
#pragma clang module end
|
|
|
|
#pragma clang module endbuild
|
|
|
|
#pragma clang module import M.TDFNodes
|
|
namespace Internal {
|
|
namespace TDF {
|
|
TLoopManager * use;
|
|
}
|
|
}
|