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

2022-09-20 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D131479#3755266 , @aaron.ballman wrote: > In D131479#3753586 , @Mordante > wrote: > >> So I think there's indeed a bug in libc++ which was hidden since Clang >> hadn't implemented s

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

2022-08-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131479#3753586 , @Mordante wrote: > In D131479#3753533 , @aaron.ballman > wrote: > >> In D131479#3753462 , @Mordante >> wrote: >> >>>

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

2022-08-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D131479#3753533 , @aaron.ballman wrote: > In D131479#3753462 , @Mordante > wrote: > >> This change breaks the libc++ test >> `libcxx/test/std/utilities/optional/optional.object/opti

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

2022-08-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D131479#3753462 , @Mordante wrote: > This change breaks the libc++ test > `libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp`. > > (https://buildkite.com/llvm-project/libcxx-ci/build

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

2022-08-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. This change breaks the libc++ test `libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.fail.cpp`. (https://buildkite.com/llvm-project/libcxx-ci/builds/13149#0182d0d4-341a-4b41-b67f-12937f41e6d5) Looking at the description of this patch it sho

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

2022-08-12 Thread Utkarsh Saxena via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG72ac7cac3f14: Handle explicitly defaulted consteval special members. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE L

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

2022-08-12 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 452123. usaxena95 added a comment. Added a release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaD

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

2022-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. Thanks, this LGTM! Please be sure to add a release note for the fix before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 __

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

2022-08-11 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451839. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Removed regex matching for diagnostics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D13147

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

2022-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:805 +void func() { + default_ctor fail0; // expected-error-re {{call to consteval function '{{.*::default_ctor<.*::foo>}}::default_ctor' is not a constant expression}} \ +

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

2022-08-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:805 +void func() { + default_ctor fail0; // expected-error-re {{call to consteval function '{{.*::default_ctor<.*::foo>}}::default_ctor' is not a constant expression}} \ +

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

2022-08-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451731. usaxena95 marked 3 inline comments as done. usaxena95 added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 Files: clang/li

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

2022-08-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:812 + fail1 = good0; // expected-error-re {{call to consteval function '{{.*::copy<.*::foo>}}::operator=' is not a constant expression}} \ + expected-note {{in

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

2022-08-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/SemaCXX/cxx2a-consteval.cpp:812 + fail1 = good0; // expected-error-re {{call to consteval function '{{.*::copy<.*::foo>}}::operator=' is not a constant expression}} \ + expected-not

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

2022-08-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: rsmith. aaron.ballman added a comment. This is generally looking good to me, thank you! Just a few minor points and I think this will be ready. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:7551 + // expression. + if (isa(RD) && MD->isConstex

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

2022-08-10 Thread Ilya Biryukov via Phabricator via cfe-commits
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

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

2022-08-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 added a comment. As discussed offline, we are already following the discussion 2602 . We are keeping the constructor `consteval` to allow complaining when we are actually processing the call to data member constructors

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

2022-08-10 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451432. usaxena95 marked an inline comment as done. usaxena95 added a comment. Addressed comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 Files: clang/lib

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

2022-08-10 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Should we follow suggestion from CWG Issue 2602 to fix this instead? I think the trick is to keep the constructor consteval, but complain when processing its call, e.g. somewhere around `HandleCon

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

2022-08-09 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451353. usaxena95 added a comment. Verify that non-consteval constructors (among others) cannot be used in a consteval context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.

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

2022-08-09 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 updated this revision to Diff 451333. usaxena95 added a comment. Added tests for multiple constructors in a templated class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131479/new/ https://reviews.llvm.org/D131479 Files: clang/lib/Se

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

2022-08-09 Thread Utkarsh Saxena via Phabricator via cfe-commits
usaxena95 created this revision. Herald added a project: All. usaxena95 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D131479 Files: clang/lib/Sema/SemaDeclCXX.cpp clang