[all-commits] [llvm/llvm-project] 7d2d5a: [clang] Apply P1825 as Defect Report from C++11 up...
Matheus Izvekov via All-commits
all-commits at lists.llvm.org
Thu Jul 1 03:10:22 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7d2d5a3a6d7aaa40468c30250bf6b0938ef02c08
https://github.com/llvm/llvm-project/commit/7d2d5a3a6d7aaa40468c30250bf6b0938ef02c08
Author: Matheus Izvekov <mizvekov at gmail.com>
Date: 2021-07-01 (Thu, 01 Jul 2021)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/SemaStmt.cpp
M clang/test/CXX/class/class.init/class.copy.elision/p3.cpp
M clang/test/SemaCXX/P1155.cpp
M clang/test/SemaCXX/conversion-function.cpp
R clang/test/SemaCXX/warn-return-std-move.cpp
M clang/test/SemaObjCXX/block-capture.mm
Log Message:
-----------
[clang] Apply P1825 as Defect Report from C++11 up to C++20.
This extends the effects of [[ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1825r0.html | P1825 ]] to all C++ standards from C++11 up to C++20.
According to Motion 23 from Cologne 2019, P1825R0 was accepted as a Defect Report, so we retroactively apply this all the way back to C++11.
Note that we also remove implicit moves from C++98 as an extension
altogether, since the expanded first overload resolution from P1825
can cause some meaning changes in C++98.
For example it can change which copy constructor is picked when both const
and non-const ones are available.
This also rips out warn_return_std_move since there are no cases where it would be worthwhile to suggest it.
This also fixes a bug with bailing into the second overload resolution
when encountering a non-rvref qualified conversion operator.
This was unnoticed until now, so two new test cases cover these.
Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D104500
More information about the All-commits
mailing list