[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-10 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2867404 , @ldionne wrote: > I don't know what the state of those extensions is from Clang's perspective, > however one thing is clear - we use those extensions in libc++ very heavily. > If any such extension is

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-09 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D104500#2865917 , @mizvekov wrote: > Well I thought that meant exactly that libc++ does not support C++98, it only > works on clang because it provides so much of C++11 as an extension. > > I did not remove this just on my

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2866079 , @rsmith wrote: > I wonder if we can restore the extension behavior for the types that want it, > while still using the C++98 rules for the rest of the cases? Perhaps we could > use the new C++11-to-C++20

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D104500#2865917 , @mizvekov wrote: > In D104500#2865849 , @Quuxplusone > wrote: > >> @mizvekov, I don't understand what you mean by "yet another" mechanism. This >> is just asking to

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2865849 , @Quuxplusone wrote: > @mizvekov, I don't understand what you mean by "yet another" mechanism. This > is just asking to restore Clang's C++98/03 extension (that supports move > constructors even in C++03).

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-08 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D104500#2864909 , @mizvekov wrote: > In D104500#2863368 , @jyknight > wrote: > >> This commit seems to have broken libc++ in C++98 mode, as it appears to have >> depended upon

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D104500#2863368 , @jyknight wrote: > This commit seems to have broken libc++ in C++98 mode, as it appears to have > depended upon the implicit-move extension. > > The root cause appears to be that libc++ emulates unique_ptr

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-07 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. This commit seems to have broken libc++ in C++98 mode, as it appears to have depended upon the implicit-move extension. Reproduction is simple. Build this with `-stdlib=libc++ -std=c++98`: #include void foo (std::set *s) { s->insert(5); }

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-07-01 Thread Matheus Izvekov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7d2d5a3a6d7a: [clang] Apply P1825 as Defect Report from C++11 up to C++20. (authored by mizvekov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-30 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 355714. mizvekov added a comment. - fix test diagnostic expectation using regular expressions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files:

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/CXX/class/class.init/class.copy.elision/p3.cpp:435 +}; +A test1(B x) { return x; } // cxx98-error {{conversion}} {{is ambiguous}} + The "{{is ambiguous}}" here is not part of the expected-error and will be

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354776. mizvekov added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked 2 inline comments as done. mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3544 -// taking an rvalue reference. -if (cast(FD)->getRefQualifier() != RQ_RValue) - break; If there was a

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-27 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354773. mizvekov added a comment. This introduces two new test cases that cover the bug fixed by the previous diff: - The one suggested by rsmith in the comments above. - Another one that shows that when both const and non-const lvref conversion operators

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3478-3481 +// Check that overload resolution selected a conversion operator +// taking an rvalue reference. +if (cast(FD)->getRefQualifier() != RQ_RValue) + break;

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:3469 +if (Res == OR_Success || Res == OR_Deleted) { + // Promote "AsRvalue" to the heap, since we now need + // expression node to persist. Looks like you lost a word in this

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-26 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 354715. mizvekov added a comment. Simplify checking first overload reslution result. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files:

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353320. mizvekov added a comment. remove unnecessary qualification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files:

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-20 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353240. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td