mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-03 06:10:23 +00:00
041740ff69
redecl chain for an imported declaration, make sure to check the IDNS of prior imported decls. Otherwise we can end up finding an invisible friend declaration and incorrectly believing that it should be visible. llvm-svn: 321916
38 lines
661 B
C++
38 lines
661 B
C++
// RUN: %clang_cc1 -fmodules %s -verify
|
|
// expected-no-diagnostics
|
|
|
|
#pragma clang module build A
|
|
module A {}
|
|
#pragma clang module contents
|
|
#pragma clang module begin A
|
|
namespace N {
|
|
class X;
|
|
}
|
|
#pragma clang module end
|
|
#pragma clang module endbuild
|
|
|
|
#pragma clang module build B
|
|
module B {
|
|
module X {}
|
|
module Y {}
|
|
}
|
|
#pragma clang module contents
|
|
#pragma clang module begin B.X
|
|
namespace N {
|
|
class Friendly {
|
|
friend class X;
|
|
};
|
|
}
|
|
#pragma clang module end
|
|
#pragma clang module begin B.Y
|
|
namespace N {
|
|
class X;
|
|
}
|
|
#pragma clang module end
|
|
#pragma clang module endbuild
|
|
|
|
#pragma clang module import A
|
|
#pragma clang module import B.X
|
|
using N::X;
|
|
X *p;
|