[PATCH] D156461: [clang][ASTImporter] Merge implicit ctors with definition

Ding Fei via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 00:01:49 PDT 2023


danix800 added a comment.

In D156461#4583806 <https://reviews.llvm.org/D156461#4583806>, @balazske wrote:

> Normally what should happen is that a new move constructor is imported (with a definition) and linked after the existing one (and the existing is not modified).

Does this violate the constraint that ctor shouldn't be re-declared?

> We get an AST that does not occur after a normal compile, I do not know if this causes problems or if this is the real reason for this patch.

Agreed. The original AST should not be touched.

> What should be done is find the existing constructor and update it with the definition and return it from the import. This can be done with any type of constructor.

So does this mean that importer might be improved on this part?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156461/new/

https://reviews.llvm.org/D156461



More information about the cfe-commits mailing list