Page MenuHomePhabricator

[ASTImporter] Update isUsed flag at Decl import.
AbandonedPublic

Authored by martong on Jun 28 2018, 7:31 AM.

Details

Summary

When a Decl is imported over an already existing similar one,
the isUsed flag is updated if it is set in the imported Decl.
This can happen if the Decl is used somewhere in the imported code
but was not used in the existing code.

Diff Detail

Event Timeline

balazske created this revision.Jun 28 2018, 7:31 AM

Hello Gabor,

I have a strong feeling of duplication with attribute and flags merging move in D47632. Maybe it is better to be resolved in that review by using the same code for attr/flag merging for both newly-created and mapped decls?

Whoops, sorry Balázs. Didn't look at the review author :(

Originally this change was made after the patch in D47632 was done. It is here back-ported to the state before it. I like the idea of integrating this change into D47632. (This is a new functionality: Attributes are updated when something is found to be already imported, in contrast to copy of the attributes when a new object is created.)

I have a strong feeling of duplication with attribute and flags merging move in D47632. Maybe it is better to be resolved in that review by using the same code for attr/flag merging for both newly-created and mapped decls?

Ok, then I'll integrate this into https://reviews.llvm.org/D47632.
Thanks for the review!

martong commandeered this revision.Jul 12 2018, 2:57 AM
martong added a reviewer: balazske.