[modules] When performing redeclaration lookup for a using declaration, prefer
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Jul 2015 23:38:25 +0000 (23:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Jul 2015 23:38:25 +0000 (23:38 +0000)
commit826711d456bfde995ca5b08aecec88775f55b01d
tree003b8eee66e6e7885f71ec2e880df732fbd53a26
parent5f6d160b5b577ee15a393df12662999ac56c2c1f
[modules] When performing redeclaration lookup for a using declaration, prefer
UsingShadowDecls over other declarations of the same entity in the lookup
results. This ensures that we build correct redeclaration chains for the
UsingShadowDecls (otherwise we could see assertions and other misbehavior in
modules builds, when merging combines multiple redeclaration chains for the
same entity from the same module into one chain).

llvm-svn: 243592
clang/lib/Sema/SemaLookup.cpp
clang/test/Modules/Inputs/submodules-merge-defs/defs.h
clang/test/Modules/Inputs/using-decl-redecl/a.h [new file with mode: 0644]
clang/test/Modules/Inputs/using-decl-redecl/b.h [new file with mode: 0644]
clang/test/Modules/Inputs/using-decl-redecl/c.h [new file with mode: 0644]
clang/test/Modules/Inputs/using-decl-redecl/module.modulemap [new file with mode: 0644]
clang/test/Modules/using-decl-redecl.cpp [new file with mode: 0644]