[all-commits] [llvm/llvm-project] 5df593: [Sema] cast to CXXRecordDecl correctly when diag a...

Congcong Cai via All-commits all-commits at lists.llvm.org
Thu May 25 13:08:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5df593a354714e081ac441a74f89ad2a56334e28
      https://github.com/llvm/llvm-project/commit/5df593a354714e081ac441a74f89ad2a56334e28
  Author: Congcong Cai <congcongcai0907 at 163.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaTemplateInstantiate.cpp
    M clang/test/CXX/class/class.compare/class.spaceship/p1.cpp
    A clang/test/SemaCXX/cxx20-default-compare.cpp

  Log Message:
  -----------
  [Sema] cast to CXXRecordDecl correctly when diag a default comparison method

Fixed: https://github.com/llvm/llvm-project/issues/62791
Fixed: https://github.com/llvm/llvm-project/issues/62102
in c++20, default comparison is supported. `getLexicalDeclContext` maybe cannot
get the `CXXRecord` if default comparison defined out of `CXXRecord`.
This patch want to get these information from the first function argument.

Reviewed By: #clang-language-wg, erichkeane

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




More information about the All-commits mailing list