Adjust type-trait evaluation to properly handle Using(Shadow)Decls
authorHal Finkel <hfinkel@anl.gov>
Sun, 27 Nov 2016 16:26:14 +0000 (16:26 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 27 Nov 2016 16:26:14 +0000 (16:26 +0000)
commitfec8345108c199b3ddbaf03ad0d3fe472239f859
treebbde20c941addb654eae115a15be32e586191930
parentdc2917b969c5a6bcc5184ff1f7005cab31964815
Adjust type-trait evaluation to properly handle Using(Shadow)Decls

Since r274049, for an inheriting constructor declaration, the name of the using
declaration (and using shadow declaration comes from the using declaration) is
the name of a derived class, not the base class (line 8225-8232 of
lib/Sema/SemaDeclCXX.cpp in https://reviews.llvm.org/rL274049). Because of
this, name-based lookup performed inside Sema::LookupConstructors returns not
only CXXConstructorDecls but also Using(Shadow)Decls, which results assertion
failure reported in PR29087.

Patch by Taewook Oh, thanks!

Differential Revision: https://reviews.llvm.org/D23765

llvm-svn: 287999
clang/lib/Sema/SemaExprCXX.cpp
clang/test/SemaCXX/cxx11-crashes.cpp