Page MenuHomePhabricator

Clang: fix AST representation of expanded template arguments.
ClosedPublic

Authored by mizvekov on Jun 17 2022, 7:27 PM.

Details

Summary

Extend clang's SubstTemplateTypeParm to represent the pack substitution index.

Fixes PR56099.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Diff Detail

Event Timeline

mizvekov created this revision.Jun 17 2022, 7:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 7:27 PM
mizvekov published this revision for review.Jun 17 2022, 7:58 PM
mizvekov added reviewers: rsmith, v.g.vassilev.
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 7:58 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
mizvekov updated this revision to Diff 438117.Jun 18 2022, 5:56 AM
mizvekov edited the summary of this revision. (Show Details)

.

martong removed a subscriber: martong.Jul 4 2022, 3:29 AM
mizvekov updated this revision to Diff 445368.Sun, Jul 17, 6:30 PM
mizvekov edited the summary of this revision. (Show Details)
shafik added inline comments.Mon, Jul 18, 6:55 PM
clang/lib/AST/ASTImporter.cpp
1534

I think we should have a test in ASTImporterTest.cpp to make sure we are importing the pack index correctly.

mizvekov updated this revision to Diff 445993.Tue, Jul 19, 5:40 PM
mizvekov marked an inline comment as done.Tue, Jul 19, 5:42 PM
mizvekov added inline comments.
clang/lib/AST/ASTImporter.cpp
1534

Thanks for the suggestion, implemented.
It turns out we didn't even have any tests for importing SubsTemplateTypeParmType in the first place.

mizvekov updated this revision to Diff 447988.Wed, Jul 27, 3:33 AM
mizvekov marked an inline comment as done.
davrec accepted this revision.Mon, Aug 8, 3:01 PM
davrec added a subscriber: davrec.

This corrects a genuine deficiency in the AST, and the patch LGTM. Can we knock this off Matheus' stack?

This revision is now accepted and ready to land.Mon, Aug 8, 3:01 PM

This corrects a genuine deficiency in the AST, and the patch LGTM. Can we knock this off Matheus' stack?

Thanks!!!! :-)

shafik accepted this revision.Mon, Aug 8, 8:30 PM

LGTM as well

This revision was landed with ongoing or failed builds.Tue, Aug 9, 5:26 AM
This revision was automatically updated to reflect the committed changes.