This is an archive of the discontinued LLVM Phabricator instance.

[clang] Persist Attr::IsPackExpansion into the PCH
ClosedPublic

Authored by nridge on Mar 31 2020, 10:30 PM.

Diff Detail

Event Timeline

nridge created this revision.Mar 31 2020, 10:30 PM

oh wow! thanks for looking into this.

Looking at the history, it seems like an oversight. The patch that introduced packexpansion bit: https://github.com/llvm/llvm-project/commit/44c247f0f009eec70a193335c8a353d6f8602bfd.

it didn't add that field to pchattr serialization code unfortunately. (another example on isimplicit, which adds attr to record https://github.com/llvm/llvm-project/commit/36a5350e51a6dcfae424332aaa266a1e5bfb8c4f)

Could you add tests though ? Something similar to clang/test/PCH/attrs-PR8406.c should be enough.

also please update the commit message to mention "PCH" rather than "serialized ast".

nridge updated this revision to Diff 254712.Apr 2 2020, 10:42 PM

Add test

kadircet accepted this revision.Apr 3 2020, 1:57 AM

thanks LGTM!

This revision is now accepted and ready to land.Apr 3 2020, 1:57 AM
aaron.ballman accepted this revision.Apr 3 2020, 4:06 AM
aaron.ballman added a subscriber: aaron.ballman.

LGTM!

nridge retitled this revision from [clang] Persist Attr::IsPackExpansion into the serialized AST to [clang] Persist Attr::IsPackExpansion into the PCH.Apr 3 2020, 8:10 AM
This revision was automatically updated to reflect the committed changes.

@rsmith are you OK with merging this into the release branch for 10.0.1?
cc @tstellar

@rsmith are you OK with merging this into the release branch for 10.0.1?
cc @tstellar

Yes, please do.

(I would like for us to eventually maintain AST file format compatibility between patch releases, which this change would break, but as far as I'm aware the status quo is still that we include the version number and revision as part of the signature of the AST file and will reject the file if it differs even by clang patch release, so the compatibility there is only a future-facing concern, not one that affects this change.)