This is an archive of the discontinued LLVM Phabricator instance.

[UTC] Include return type/attributes under --version 2
ClosedPublic

Authored by nikic on Feb 28 2023, 6:49 AM.

Details

Summary

If --function-signature is used with --version 2, then also include the return type/attributes in the check lines. This is the implementation of D133943 rebased on the --version mechanism from D142473.

This doesn't bump the default version yet, because I'd like to do that together with D140212 (which enables --function-signature by default), as these changes seem closely related. For now this functionality can be accessed by explicitly passing --version 2 to UTC.

Fixes https://github.com/llvm/llvm-project/issues/61058.

Diff Detail

Event Timeline

nikic created this revision.Feb 28 2023, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 6:49 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
nikic requested review of this revision.Feb 28 2023, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 6:49 AM
This revision is now accepted and ready to land.Feb 28 2023, 7:47 AM
asb added a comment.Feb 28 2023, 8:43 AM

Firstly - thanks for picking this up again - I just came back to some work that would benefit, so was about to look myself. I'm grateful you've already done that rebasing!

This LGTM in general. I have just one question about how you imagine changing the incorporation of D140212 - would you add in the --function-signature by default change to --version 2, or introduce a --version 3? I think I'd be happy enough with either, but wanted to check your plan.

nikic added a comment.Feb 28 2023, 9:03 AM

This LGTM in general. I have just one question about how you imagine changing the incorporation of D140212 - would you add in the --function-signature by default change to --version 2, or introduce a --version 3? I think I'd be happy enough with either, but wanted to check your plan.

My plan was to both enable --function-signature by default and check return types as part of --version 2. But I would be fine keeping them separate as well (in which case I'd bump the default version in this patch).

asb added a comment.Feb 28 2023, 10:35 AM

This LGTM in general. I have just one question about how you imagine changing the incorporation of D140212 - would you add in the --function-signature by default change to --version 2, or introduce a --version 3? I think I'd be happy enough with either, but wanted to check your plan.

My plan was to both enable --function-signature by default and check return types as part of --version 2. But I would be fine keeping them separate as well (in which case I'd bump the default version in this patch).

I thought I'd flag it in case others felt strongly otherwise, but doing it as part of --version 2 seems fine to me. It might seem a bit weird if you see --version as an attempt to give an immutable output format for UTC at a point in time. But if you see it as just a tool to help reduce in-tree test churn when adding new features, then logically we have the option of extending the current "version" as an alternative to defining a new one, if it's not too disruptive to do so.

asb accepted this revision.Mar 1 2023, 12:05 AM
asb added a comment.Mar 1 2023, 5:23 AM

I've rebased D134050 and D140400 on top of this.

This revision was landed with ongoing or failed builds.Mar 2 2023, 1:01 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 2 2023, 1:01 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript