This is an archive of the discontinued LLVM Phabricator instance.

[Modules] Do not rewrite existing decls when deserializing class fields
ClosedPublic

Authored by ilya-biryukov on Apr 17 2023, 5:25 AM.

Details

Summary

Classes can have implicit members that were added before fields were
deserialized. These members were previously silently removed from
decls() when fields were deserialized after them.

This was the root cause of a compilation error exposed in
bc95f27337c7ed77c28e713c855272848f01802a, added a test for it.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Apr 17 2023, 5:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 5:25 AM
ilya-biryukov requested review of this revision.Apr 17 2023, 5:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 17 2023, 5:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I plan to land this together with a reland of bc95f27337c7ed77c28e713c855272848f01802a and finally close GH61065.
I have checked this works on previously broken targets. @ChuanqiXu sorry for taking so long to track it down, reproducing module-related errors is quite hard in our setup.

ChuanqiXu accepted this revision.Apr 17 2023, 6:52 PM

Thank you very much!

This revision is now accepted and ready to land.Apr 17 2023, 6:52 PM
  • clang-format the code
This revision was landed with ongoing or failed builds.Apr 18 2023, 3:46 AM
This revision was automatically updated to reflect the committed changes.