]> granicus.if.org Git - clang/commit
[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)
commit8e62a65f20ac33af4e9608cd9ff2343c4380cc46
tree72e89e78a4e2370160c1425acc6b8190df99797a
parent56a61ff5cc594f52cc895851f8a12873f165e051
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316965 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
lib/Sema/SemaLookup.cpp
test/Modules/using-directive-redecl.cpp [new file with mode: 0644]