diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-18 22:01:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-18 22:01:46 +0000 |
commit | 4eeaec46f7de16898a2feb440d064cd1eac1dc2f (patch) | |
tree | 518568cd030a335b88c9251b9a588a9caadc4972 /clang/lib/Sema/SemaLookup.cpp | |
parent | d8a9e375582fea89906d89f7fca4cbf0b240346f (diff) | |
download | bcm5719-llvm-4eeaec46f7de16898a2feb440d064cd1eac1dc2f.tar.gz bcm5719-llvm-4eeaec46f7de16898a2feb440d064cd1eac1dc2f.zip |
Fix name hiding and redeclaration checking for dependent local
using-declarations.
llvm-svn: 290072
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 1fc6d4fd515..38a7b8c127c 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -450,15 +450,18 @@ static bool canHideTag(NamedDecl *D) { // Given a set of declarations in a single declarative region [...] // exactly one declaration shall declare a class name or enumeration name // that is not a typedef name and the other declarations shall all refer to - // the same variable or enumerator, or all refer to functions and function - // templates; in this case the class name or enumeration name is hidden. + // the same variable, non-static data member, or enumerator, or all refer + // to functions and function templates; in this case the class name or + // enumeration name is hidden. // C++ [basic.scope.hiding]p2: // A class name or enumeration name can be hidden by the name of a // variable, data member, function, or enumerator declared in the same // scope. + // An UnresolvedUsingValueDecl always instantiates to one of these. D = D->getUnderlyingDecl(); return isa<VarDecl>(D) || isa<EnumConstantDecl>(D) || isa<FunctionDecl>(D) || - isa<FunctionTemplateDecl>(D) || isa<FieldDecl>(D); + isa<FunctionTemplateDecl>(D) || isa<FieldDecl>(D) || + isa<UnresolvedUsingValueDecl>(D); } /// Resolves the result kind of this lookup. |