[ASTImporter] Fix redecl failures of Class and ClassTemplate
authorGabor Marton <martongabesz@gmail.com>
Tue, 5 Mar 2019 11:23:24 +0000 (11:23 +0000)
committerGabor Marton <martongabesz@gmail.com>
Tue, 5 Mar 2019 11:23:24 +0000 (11:23 +0000)
commit41e38925ab6b65705ce232edd9396c68bdb8fce5
treeb5b58cbe96e048b016480639ee97f656fd699e1d
parent3bcb0aa7f9bc75f95e6ac1933ae3d0c0b8ce6a9a
[ASTImporter] Fix redecl failures of Class and ClassTemplate

Summary:
Redecl chains of classes and class templates 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/D58502

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