[ASTImporter] Extend lookup logic in class templates
authorAleksei Sidorin <a.sidorin@samsung.com>
Tue, 15 May 2018 11:09:07 +0000 (11:09 +0000)
committerAleksei Sidorin <a.sidorin@samsung.com>
Tue, 15 May 2018 11:09:07 +0000 (11:09 +0000)
commit761c2247b44a4128e715fe71a1faeadd28d4028a
tree0b98371935c335cec69a943375268335d626639d
parent904684cf5c02f9c781ee0310d1daaef0d1193c74
[ASTImporter] Extend lookup logic in class templates

During import of a class template, lookup may find a forward
declaration and structural match falsely reports equivalency
between a forward decl and a definition. The result is that
some definitions are not imported if we had imported a forward
decl previously. This patch gives a fix.

Patch by Gabor Marton!

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

llvm-svn: 332338
clang/lib/AST/ASTImporter.cpp
clang/unittests/AST/ASTImporterTest.cpp