[ASTImporter] Fix redecl failures of ClassTemplateSpec
authorGabor Marton <martongabesz@gmail.com>
Tue, 19 Mar 2019 13:34:10 +0000 (13:34 +0000)
committerGabor Marton <martongabesz@gmail.com>
Tue, 19 Mar 2019 13:34:10 +0000 (13:34 +0000)
commit7f8c400deb7cb1729aaddd2cf7d54f248b4b6620
treecda7ad93b57c1e1066bceb75d7ebba472cc50b3a
parentb86ce219f4dabe1ac5ceee79651b05308672064e
[ASTImporter] Fix redecl failures of ClassTemplateSpec

Summary:
Redecl chains of class template specializations are not handled well
currently. We want to handle them similarly to functions, i.e. try to
keep the structure of the original AST as much as possible. The aim is
to not squash a prototype with a definition, rather we create both and
put them in a redecl chain.

Reviewers: a_sidorin, shafik, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, jdoerfert, cfe-commits

Tags: #clang

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

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