[ASTImporter] Fix redecl failures of FunctionTemplateSpec
authorGabor Marton <martongabesz@gmail.com>
Tue, 19 Mar 2019 14:04:50 +0000 (14:04 +0000)
committerGabor Marton <martongabesz@gmail.com>
Tue, 19 Mar 2019 14:04:50 +0000 (14:04 +0000)
commitdd59d27a1f8aa993187f8476cccf98bcc9f24ec2
tree5a8dd72a1b02f1d6232826ee7a84a6dfc8810feb
parent38a61873963f94ce0da04c37ad58358b60242e55
[ASTImporter] Fix redecl failures of FunctionTemplateSpec

Summary:
Redecl chains of function 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, cfe-commits

Tags: #clang

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

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