This is an archive of the discontinued LLVM Phabricator instance.

[C++20] Claim full support for consteval again
ClosedPublic

Authored by Fznamznon on Apr 6 2023, 8:53 AM.

Details

Summary

After resolving several outstanding issues now is the time to mark it as
fully supported.

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

Diff Detail

Event Timeline

Fznamznon created this revision.Apr 6 2023, 8:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 8:53 AM
Fznamznon requested review of this revision.Apr 6 2023, 8:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 8:53 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

LGTM.
Thanks for completing this :)

cor3ntin accepted this revision.Apr 6 2023, 9:01 AM
This revision is now accepted and ready to land.Apr 6 2023, 9:01 AM
erichkeane added a subscriber: cjdb.Apr 6 2023, 9:06 AM

@cjdb has been running some GDB test suites against our compiler: I am wondering if we could ask him to try the consteval ones too before we set this?

shafik added a subscriber: shafik.Apr 6 2023, 9:33 AM

@cjdb has been running some GDB test suites against our compiler: I am wondering if we could ask him to try the consteval ones too before we set this?

This is probably a good idea.

cjdb added a comment.Apr 6 2023, 3:06 PM

@cjdb has been running some GDB test suites against our compiler: I am wondering if we could ask him to try the consteval ones too before we set this?

A lot of that work is manual because I need to interpret LIT messages to know wether something is a config error (e.g. missing // expected-no-diagnostics), a difference in opinion between compilers (e.g. GCC says it's an error and Clang says it's a note, reporting diagnostics on different lines, etc.), or actually an error in Clang.

I won't have time to check this week, but perhaps next week if the test set isn't too large (failing that, I'll at least try to get you // expected-no-diagnostics for improved confidence). Does this timeframe seem acceptable?

@cjdb has been running some GDB test suites against our compiler: I am wondering if we could ask him to try the consteval ones too before we set this?

A lot of that work is manual because I need to interpret LIT messages to know wether something is a config error (e.g. missing // expected-no-diagnostics), a difference in opinion between compilers (e.g. GCC says it's an error and Clang says it's a note, reporting diagnostics on different lines, etc.), or actually an error in Clang.

I won't have time to check this week, but perhaps next week if the test set isn't too large (failing that, I'll at least try to get you // expected-no-diagnostics for improved confidence). Does this timeframe seem acceptable?

That sounds perfect to me -- there's not a rush on defining the macro/updating the status page given that we're not near a release, so we can wait until we have more details. Thank you for the help, @cjdb!

cjdb added a comment.Apr 17 2023, 1:26 PM

I'm gonna get started on this today!

I'm gonna get started on this today!

@cjdb , how is this going? I've seen https://github.com/llvm/llvm-project/issues/62224, but no more issues with consteval label.

cjdb added a comment.May 3 2023, 2:27 PM

I'm gonna get started on this today!

@cjdb , how is this going? I've seen https://github.com/llvm/llvm-project/issues/62224, but no more issues with consteval label.

I haven't had time to invest in this recently, as I've been gearing up for an intern.

Friendly ping. It is been a while.
@cjdb , any chance for an update?

I think we should make sure to land this for clang 17. The rate of consteval bugs is no greater than that of any other feature at this point.

I think we should make sure to land this for clang 17. The rate of consteval bugs is no greater than that of any other feature at this point.

There is https://github.com/llvm/llvm-project/issues/62886 which seems quite ugly, but has a patch on review.
Otherwise I agree, I'm not seeing more consteval bugs than any others.
@aaron.ballman , @erichkeane wdyt about landing it?

cjdb added a comment.Jun 5 2023, 10:26 AM

I think we should make sure to land this for clang 17. The rate of consteval bugs is no greater than that of any other feature at this point.

There is https://github.com/llvm/llvm-project/issues/62886 which seems quite ugly, but has a patch on review.
Otherwise I agree, I'm not seeing more consteval bugs than any others.
@aaron.ballman , @erichkeane wdyt about landing it?

The worst-case scenario is that we have to disable the status again. I can't give an estimate on when I'll finish, so this is fine to me based on available data.

I think we should make sure to land this for clang 17. The rate of consteval bugs is no greater than that of any other feature at this point.

There is https://github.com/llvm/llvm-project/issues/62886 which seems quite ugly, but has a patch on review.
Otherwise I agree, I'm not seeing more consteval bugs than any others.
@aaron.ballman , @erichkeane wdyt about landing it?

The worst-case scenario is that we have to disable the status again. I can't give an estimate on when I'll finish, so this is fine to me based on available data.

I'd rather not claim support and then pull that back later (that increases confusion for users). That said, looking at the issues we have open for consteval in the issue tracker doesn't show any major issues that don't already have folks working on a fix for them. #62886 is the one that bothers me the most, but @Fznamznon already has a patch going for it that's progressing well. So I'm okay with landing this and claiming full support, but let's do that once the consteval operator bug is closed. WDYT?

Works for me

Fznamznon updated this revision to Diff 530434.Jun 12 2023, 2:14 AM

Rebase, update value of macro since P2564 is implemented now

Fznamznon retitled this revision from [C++20][NFC] Claim full support for consteval again to [C++20] Claim full support for consteval again.Jun 12 2023, 2:15 AM

https://github.com/llvm/llvm-project/issues/62886 has been fixed, I'm trying to figure out or at least reduce https://github.com/llvm/llvm-project/issues/60709 so it doesn't have headers included, but no progress so far.

aaron.ballman accepted this revision.Jun 12 2023, 4:57 AM

LGTM (though I wonder if we should add a release note as well)

LGTM (though I wonder if we should add a release note as well)

I can add a note saying that the macro is now defined. Is somewhere under C++ Language Changes title the right place to do that?

LGTM (though I wonder if we should add a release note as well)

I can add a note saying that the macro is now defined. Is somewhere under C++ Language Changes title the right place to do that?

Yeah, probably in the C++20 section specifically.

Fznamznon updated this revision to Diff 530477.Jun 12 2023, 5:41 AM

Rebase, add a release note

The CI failure is unrelated and I suppose should be already fixed by aa28875.

This revision was landed with ongoing or failed builds.Jun 13 2023, 1:00 AM
This revision was automatically updated to reflect the committed changes.