This is an archive of the discontinued LLVM Phabricator instance.

[clang] Update test according to P1937
ClosedPublic

Authored by Fznamznon on Mar 6 2023, 1:54 AM.

Details

Summary

https://wg21.link/p1937 proposes that in unevaluated contexts, consteval
functions should not be immediately evaluated.
Clang implemented p1937 a while ago, its behavior is correct and the
test needs an update.

Diff Detail

Event Timeline

Fznamznon created this revision.Mar 6 2023, 1:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 1:54 AM
Fznamznon requested review of this revision.Mar 6 2023, 1:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 6 2023, 1:54 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Mar 6 2023, 5:05 AM

LGTM, thank you for cleaning that test up!

This revision is now accepted and ready to land.Mar 6 2023, 5:05 AM
shafik accepted this revision.EditedMar 6 2023, 8:34 AM

Thank you for the fix.

Besides the nitpick, LGTM

clang/test/CXX/expr/expr.const/p8-2a.cpp
13–14

How about "Prior to P1937R2 consteval functions were evaluated even in otherwise unevaluated context, now this is well-formed"

and move it right above the "using check"

Fznamznon updated this revision to Diff 502742.Mar 6 2023, 11:32 AM

Rebase and apply the nitpick

clang/test/CXX/expr/expr.const/p8-2a.cpp
13–14

Ok, sure.

This revision was automatically updated to reflect the committed changes.