[modules] Retain multiple using-directives in the same scope even if they name the...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 30 Oct 2017 22:38:20 +0000 (22:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 30 Oct 2017 22:38:20 +0000 (22:38 +0000)
commita544c51e94445ad655e512af690cb214aac73321
tree739fe9801166944b5cd640726f2bfb66acad10d1
parent9cd7abbcff7699f5b74e2e5242d7ff5a18c77f49
[modules] Retain multiple using-directives in the same scope even if they name the same namespace.

They might have different visibility, and thus discarding all but one of them
can result in rejecting valid code. Also fix name lookup to cope with multiple
using-directives being found that denote the same namespace, where some are not
visible -- don't cache an "already visited" state for a using-directive that we
didn't visit because it was hidden.

llvm-svn: 316965
clang/lib/AST/Decl.cpp
clang/lib/Sema/SemaLookup.cpp
clang/test/Modules/using-directive-redecl.cpp [new file with mode: 0644]