]> granicus.if.org Git - clang/commitdiff
Look through using declarations when determining whether one decl hides another
authorDouglas Gregor <dgregor@apple.com>
Thu, 14 Jan 2010 00:06:47 +0000 (00:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 14 Jan 2010 00:06:47 +0000 (00:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93378 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaLookup.cpp

index 0ab01fe7f5d4b2365c5f9bf8359e3ab54c31268a..88da7e8d5cc46bd7d1c3c2d8e4f22b78ab375bd6 100644 (file)
@@ -1916,6 +1916,9 @@ VisibleDeclsRecord::ShadowMapEntry::end() {
 }
 
 NamedDecl *VisibleDeclsRecord::checkHidden(NamedDecl *ND) {
+  // Look through using declarations.
+  ND = ND->getUnderlyingDecl();
+  
   unsigned IDNS = ND->getIdentifierNamespace();
   std::list<ShadowMap>::reverse_iterator SM = ShadowMaps.rbegin();
   for (std::list<ShadowMap>::reverse_iterator SMEnd = ShadowMaps.rend();