[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-06-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { Quuxplu

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-05-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { rsmi

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-05-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { Quuxpluso

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-05-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { rsmi

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-05-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3226-3227 +CopyElisionSemanticsKind CESK = CES_Strict; +if (getLangOpts().CPlusPlus20) { + CESK = CES_ImplicitlyMovableCXX20; +} else if (getLangOpts().CPlusPlus11) { P1825 was

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. To whom it may concern, see D98971 . I'm (unwisely?) trying a surgical fix rather than trying to revert the month-old thing. (Let's please discuss anything D98971 -specific over there.) Repository:

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-19 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. Confirmed: yikes. @nullptr.cpp, I'm going to open a new pull request to revert this, to poke the buildbot, just in case reverting it causes new failures. But I certainly don't object if someone wants to be more bold than me in reverting quickly. Here's a reduced tes

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-19 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. This change causes #include std::shared_ptr x1; std::shared_ptr f() { std::shared_ptr & r = x1; r.reset(new int); return r; } int main() { std::shared_ptr x2 = f(); long n = x2.use_count(); return n; } when built with `-std=

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-03-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/www/cxx_status.html:1206-1210 + + More implicit moves + https://wg21.link/p1825r0";>P1825R0 (DR) + Clang 13 + We have, so far, listed DR papers only in the section of `cxx_status` for the ear

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-24 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added a comment. The option is used in the wild, but not as widely as I first believed. We've already fixed a couple projects that were using it. I think the Release Note is the right solution. Thanks for doing that. I withdraw my suggestion to allow and ignore. Repository: rG

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-24 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. In D88220#2583486 , @aaronpuchert wrote: > In D88220#2581538 , @aaron.ballman > wrote: > >> We usually rely on the release notes to say something, but we didn't do that >> here. > > P

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D88220#2581538 , @aaron.ballman wrote: > We usually rely on the release notes to say something, but we didn't do that > here. Perhaps @nullptr.cpp could add something there? The file is `clang/docs/ReleaseNotes.rst`. >

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88220#2573018 , @aaronpuchert wrote: > In D88220#2571911 , @amccarth wrote: > >> Would anyone object to allowing the option but silently ignoring it, at >> least for a transition

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-18 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a subscriber: aaron.ballman. aaronpuchert added a comment. In D88220#2571911 , @amccarth wrote: > Would anyone object to allowing the option but silently ignoring it, at least > for a transition period? No objection from me. > Was the

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-18 Thread Adrian McCarthy via Phabricator via cfe-commits
amccarth added a comment. The removal of `-Wreturn-std-move-in-c++11` breaks a few projects. These projects are specifying the option, which then triggers an unknown-option warning and thus `-Wx` halts the build. Would anyone object to allowing the option but silently ignoring it, at least fo

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D88220#2566628 , @Quuxplusone wrote: > My concern was more that I'm much less of an expert on Clang than "most of > us." Understood, but Clang tries to closely follow the C++ standard in its implementation, and I'd say t

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfbee4a0c79cc: [C++20] [P1825] More implicit moves (authored by nullptr.cpp, committed by arthur.j.odwyer). Changed prior to commit: https://reviews.llvm.org/D88220?vs=318420&id=324115#toc Repository:

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D88220#2566525 , @aaronpuchert wrote: > I think you're much more of an expert on implicit moves than most of us Short answer, yes. ;) My concern was more that I'm much less of an expert on Clang than "most of us." I'd rat

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D88220#2565768 , @Quuxplusone wrote: >> either way I'm a dead end — I don't consider myself authorized to "accept" >> Clang changes. >> You're still going to have to attract the attention of someone with the >> authority

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone accepted this revision. Quuxplusone added a comment. This revision is now accepted and ready to land. > either way I'm a dead end — I don't consider myself authorized to "accept" > Clang changes. > You're still going to have to attract the attention of someone with the > authority an

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-16 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-10 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-02-01 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-01-21 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 318420. nullptr.cpp added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-01-21 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 318406. nullptr.cpp added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-01-21 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. In D88220#2495071 , @Quuxplusone wrote: > I notice a lack of any explicitly `co_return`-related tests and/or code in > this patch. I'm just going to assume that is fine. `co_return` related implicit move is implemented by @aa

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-01-12 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @nullptr.cpp: I may or may not come up with more review comments, but either way I'm a dead end — I don't consider myself authorized to "accept" Clang changes. You're still going to have to attract the attention of someone with the authority and/or force-of-will to

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2021-01-12 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 316302. nullptr.cpp added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-29 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-28 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 313831. nullptr.cpp added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-22 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 313493. nullptr.cpp added a comment. Add more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/i

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-07 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4626 CES_AllowExceptionVariables = 4, -CES_FormerDefault = (CES_AllowParameters), -CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes), -CES_AsIfByStdMove = (CES_AllowParamet

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-07 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4626 CES_AllowExceptionVariables = 4, -CES_FormerDefault = (CES_AllowParameters), -CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes), -CES_AsIfByStdMove = (CES_AllowParamet

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-07 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 309873. nullptr.cpp added a comment. Herald added a subscriber: lxfind. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/Di

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-06 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. I've found another case that Clang has never handled correctly (and which your patch does not fix)— https://godbolt.org/z/xd8qGW struct Widget {}; struct Frodo { Frodo(Widget&); Frodo(Widget&&) = delete; }; Frodo twelve() { Widget w;

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-02 Thread David Stone via Phabricator via cfe-commits
davidstone added inline comments. Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:22 + return c; +} +#else Quuxplusone wrote: > Quuxplusone wrote: > > @rsmith @david_stone (or anyone), what is the status in C++20 of the > > following test

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a subscriber: davidstone. Quuxplusone added inline comments. Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:22 + return c; +} +#else Quuxplusone wrote: > @rsmith @david_stone (or anyone), what is the status in C++20 of th

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-12-01 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a subscriber: david_stone. Quuxplusone added inline comments. Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:22 + return c; +} +#else @rsmith @david_stone (or anyone), what is the status in C++20 of the following test ca

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-11-23 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/Sema/Sema.h:4626 CES_AllowExceptionVariables = 4, -CES_FormerDefault = (CES_AllowParameters), -CES_Default = (CES_AllowParameters | CES_AllowDifferentTypes), -CES_AsIfByStdMove = (CES_AllowParamet

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-11-22 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D88220: [C++20] P1825R0: More implicit moves

2020-11-11 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 304447. nullptr.cpp added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88220/new/ https://reviews.llvm.org/D88220 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/c