[all-commits] [llvm/llvm-project] 02bb2b: [clang] Fix diagnostics for defaulted, implicitly ...

Amirreza Ashouri via All-commits all-commits at lists.llvm.org
Sun Jul 23 01:58:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02bb2beeef3d93360694de29573430f584caafe9
      https://github.com/llvm/llvm-project/commit/02bb2beeef3d93360694de29573430f584caafe9
  Author: Amirreza Ashouri <ar.ashouri999 at gmail.com>
  Date:   2023-07-23 (Sun, 23 Jul 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    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/p4.cpp
    M clang/test/CXX/class/class.compare/class.compare.secondary/p2.cpp
    M clang/test/CXX/class/class.compare/class.eq/p2.cpp
    M clang/test/CXX/class/class.compare/class.spaceship/p1.cpp

  Log Message:
  -----------
  [clang] Fix diagnostics for defaulted, implicitly deleted 'operator=='.

https://godbolt.org/z/cMKE3o1aG

According to the issue https://github.com/llvm/llvm-project/issues/63960 , compiler falsely complains that no viable `operator<=>` was found while we are actually looking for a `operator==`.
This bug has been fixed through adding a check of the `OverloadedOperatorKind` type's object, `OO`, to see if it is `OO_EqualEqual` in addition to `OO_ExclaimEqual`.

Reviewed By: #clang-language-wg, cor3ntin

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




More information about the All-commits mailing list