[all-commits] [llvm/llvm-project] 6a7633: [Clang] Reject in-class defaulting of previously d...

Roy Jacobson via All-commits all-commits at lists.llvm.org
Tue Jan 17 12:30:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a763343e29f339cf3a9d282a309589174c74f09
      https://github.com/llvm/llvm-project/commit/6a763343e29f339cf3a9d282a309589174c74f09
  Author: Roy Jacobson <roi.jacobson1 at gmail.com>
  Date:   2023-01-17 (Tue, 17 Jan 2023)

  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/class/class.compare/class.compare.default/p2.cpp
    M clang/test/CXX/class/class.compare/class.compare.default/p3.cpp

  Log Message:
  -----------
  [Clang] Reject in-class defaulting of previously declared comparison operators

Comparison operators are not allowed to be defaulted if they were previously declared outside the class.
Pretty low-impact, but it's nice to reject this without a linking error.
Fixes https://github.com/llvm/llvm-project/issues/51227.

Reviewed By: #clang-language-wg, ChuanqiXu

Differential Revision: https://reviews.llvm.org/D141803




More information about the All-commits mailing list