[PATCH] D131479: Handle explicitly defaulted consteval special members.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 07:17:39 PDT 2022


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM from my side. Thanks for explaining, I was confused because I looked at the code right after defaulted check and thought we were working around that particular error.
Turns out this is not the case and the change was actually marking the function as consteval, just as was expected.

@aaron.ballman, could you also take a quick look here?



================
Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:857
+consteval int aConstevalFunction() { // expected-error {{consteval function never produces a constant expression}}
+  // Defaulted default constructors are consteval.
+  S<Bar, 1> s1;
----------------
NIT


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131479/new/

https://reviews.llvm.org/D131479



More information about the cfe-commits mailing list