This is an archive of the discontinued LLVM Phabricator instance.

[ASTImporter] Set redecl chain of functions before any other import
ClosedPublic

Authored by martong on Oct 25 2018, 7:29 AM.

Details

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.

Diff Detail

Repository
rC Clang

Event Timeline

martong created this revision.Oct 25 2018, 7:29 AM
a_sidorin accepted this revision.Nov 14 2018, 10:35 PM

Hi Gabor,
The change looks fine. Thanks!

This revision is now accepted and ready to land.Nov 14 2018, 10:35 PM

Did you ever resolve the issue of libcxx tests not running https://reviews.llvm.org/D53697

Did you ever resolve the issue of libcxx tests not running https://reviews.llvm.org/D53697

Hi @shafik ,
Sorry for the late reaction, I was on a two weeks long vacation recently.
My priority is to make those libcxx tests pass, I did not forget. :)

Did you ever resolve the issue of libcxx tests not running https://reviews.llvm.org/D53697

Oh, by the way this change is completely independent from that other patch.

This revision was automatically updated to reflect the committed changes.