[all-commits] [llvm/llvm-project] 273ceb: [Clang] Diagnose defaulted assignment operator wit...

cor3ntin via All-commits all-commits at lists.llvm.org
Mon Oct 30 08:06:06 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 273ceb1337cdccb730a6930b50544c0ee7d7cd7e
      https://github.com/llvm/llvm-project/commit/273ceb1337cdccb730a6930b50544c0ee7d7cd7e
  Author: cor3ntin <corentinjabot at gmail.com>
  Date:   2023-10-30 (Mon, 30 Oct 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/SemaCXX/cxx2b-deducing-this.cpp

  Log Message:
  -----------
  [Clang] Diagnose defaulted assignment operator with incompatible object parameter (#70176)

Per https://eel.is/c++draft/dcl.fct.def.default#2.2, the explicit object
parameter of a defaulted special member function must be of the same
type as the one of an equivalent implicitly defaulted function, ignoring
references.

Fixes #69233




More information about the All-commits mailing list