[ASTImporter] Improved import of friend templates.
authorBalazs Keri <1.int32@gmail.com>
Mon, 13 Aug 2018 13:08:37 +0000 (13:08 +0000)
committerBalazs Keri <1.int32@gmail.com>
Mon, 13 Aug 2018 13:08:37 +0000 (13:08 +0000)
commit0c23dc59fcf55491063e94b2f474e55112876c8e
tree4397d8486b03f030126a84e0ecad4f05cfa49b89
parent706005486f37405a847a546634a52d42076e18e1
[ASTImporter] Improved import of friend templates.

Summary:
When importing a friend class template declaration,
this declaration should not be merged with any other existing declaration
for the same type. Otherwise the getFriendDecl of the FriendDecl can point
to an other already referenced declaration, this case causes problems.
Additionally the previous decl of class templates is set at import.

Reviewers: a.sidorin, a_sidorin

Reviewed By: a_sidorin

Subscribers: a_sidorin, martong, cfe-commits

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

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