diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-15 01:28:55 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-09-15 01:28:55 +0000 |
commit | 00bec9358b22fe245f5ffcd88a652715c1ebd9ce (patch) | |
tree | 59b6ee25065a2c4aad0c1d16ae0f08dcd69117df /include/clang/Sema/Lookup.h | |
parent | 0e7d51e97642e26cc852cca312acd3e1593a9989 (diff) |
[modules] A using-declaration doesn't introduce a new entity, just a new name
for an existing entity, and as such a using-declaration doesn't need to
conflict with a hidden entity (nor vice versa).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Lookup.h')
-rw-r--r-- | include/clang/Sema/Lookup.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index bc8574c201..ed447ba149 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -237,6 +237,11 @@ public: /// \brief Determine whether this lookup is permitted to see hidden /// declarations, such as those in modules that have not yet been imported. bool isHiddenDeclarationVisible(NamedDecl *ND) const { + // If a using-shadow declaration is hidden, it's never visible, not + // even to redeclaration lookup. + // FIXME: Should this apply to typedefs and namespace aliases too? + if (isa<UsingShadowDecl>(ND)) + return false; return (AllowHidden && (AllowHiddenInternal || ND->isExternallyVisible())) || LookupKind == Sema::LookupTagName; |