Page MenuHomePhabricator

[ASTImporter] Load external Decls when getting field index.

Authored by balazske on Jul 25 2018, 6:44 AM.



At equality check of fields without name the index of fields is compared.
At determining the index of a field all fields of the parent context
should be loaded from external source to find the field at all.

Diff Detail


Event Timeline

balazske created this revision.Jul 25 2018, 6:44 AM

Hi Balázs,
The approach is OK but I have some minor comments inline.

2840 ↗(On Diff #157257)


2642 ↗(On Diff #157257)

I think we can make getFieldIndex() a static method of ASTImporter and remove this loop.

balazske updated this revision to Diff 159467.Aug 7 2018, 1:57 AM
  • Added common getFieldIndex.
balazske marked 2 inline comments as done.Aug 7 2018, 1:58 AM
a.sidorin accepted this revision.Aug 7 2018, 8:08 AM
This revision is now accepted and ready to land.Aug 7 2018, 8:08 AM
balazske updated this revision to Diff 159659.Aug 8 2018, 2:35 AM
  • Added common getFieldIndex.
  • Corrected test ImportUnnamedFieldsInCorrectOrder.
This revision was automatically updated to reflect the committed changes.