arphaman added inline comments.

================
Comment at: lib/Sema/SemaLookup.cpp:3433
+      // is not hidden by the using declaration.
+      if (isa<UsingShadowDecl>(ND) && isa<UsingDecl>(D))
+        continue;
----------------
ahatanak wrote:
> Do we have to check that ND's UsingDecl is equal to D? Or we don't have to 
> worry about it?
I don't think a check like that would be necessary from what I've observed so 
far. I believe a `UsingShadowDecl` could have been hidden previously by a 
different `UsingDecl`, but that can happen only in invalid code, like in the 
example below:

```
namespace Foo {
    class C { };
}
namespace Bar { class C { }; }
using Foo::C;
using Bar::C;
```

I don't think it would make sense for Bar::C using decl to hide Foo::C using 
shadow decl.


Repository:
  rL LLVM

https://reviews.llvm.org/D28514



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to