]> granicus.if.org Git - clang/commit
[ASTImporter] Set redecl chain of functions before any other import
authorGabor Marton <martongabesz@gmail.com>
Tue, 20 Nov 2018 14:19:39 +0000 (14:19 +0000)
committerGabor Marton <martongabesz@gmail.com>
Tue, 20 Nov 2018 14:19:39 +0000 (14:19 +0000)
commit12733dd67935054c5b0b72f58453bf727b457031
tree60b4ce1589e212eb90fbe50419f69913fa86b247
parentd8ea6e585d1553fb64ae55c27264c0459957bbee
[ASTImporter] Set redecl chain of functions before any other import

Summary:
FunctionDecl import starts with a lookup and then we create a new Decl.
Then in case of CXXConstructorDecl we further import other Decls
(base classes, members through CXXConstructorDecl::inits()) before connecting
the redecl chain.  During those in-between imports structural eq fails
because the canonical decl is different.  This commit fixes this.
Synthesizing a test seemed extremely hard, however, Xerces analysis
reproduces the problem.

Reviewers: a_sidorin, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347306 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTImporter.cpp