[all-commits] [llvm/llvm-project] c7df77: [Clang] Check explicit object parameter for defaul...
Mital Ashok via All-commits
all-commits at lists.llvm.org
Thu Aug 15 08:12:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7df775440717ec5a3f47b6d485617d802cbd036
https://github.com/llvm/llvm-project/commit/c7df775440717ec5a3f47b6d485617d802cbd036
Author: Mital Ashok <mital at mitalashok.co.uk>
Date: 2024-08-15 (Thu, 15 Aug 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/test/CXX/class/class.compare/class.compare.default/p1.cpp
M clang/test/CXX/drs/cwg25xx.cpp
M clang/test/SemaCXX/cxx2b-deducing-this.cpp
M clang/www/cxx_dr_status.html
Log Message:
-----------
[Clang] Check explicit object parameter for defaulted operators properly (#100419)
Previously, the type of explicit object parameters was not considered
for relational operators. This was defined by CWG2586,
<https://cplusplus.github.io/CWG/issues/2586.html>. This fix also means
CWG2547 <https://cplusplus.github.io/CWG/issues/2547.html> is now fully
implemented. Fixes #100329, fixes #104413.
Now start rejecting invalid rvalue reference parameters, which weren't
checked for, and start accepting non-reference explicit object
parameters (like `bool operator==(this C, C) = default;`) which were
previously rejected for the object param not being a reference.
Also start rejecting non-reference explicit object parameters for
defaulted copy/move assign operators (`A& operator=(this A, const A&) =
default;` is invalid but was previously accepted). Fixes #104414.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list