[all-commits] [llvm/llvm-project] b88eb8: [clang] use correct builtin type for defaulted com...

Matheus Izvekov via All-commits all-commits at lists.llvm.org
Wed Jun 16 17:08:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b88eb855b53184161ad1ea0eea1962100941cf0b
      https://github.com/llvm/llvm-project/commit/b88eb855b53184161ad1ea0eea1962100941cf0b
  Author: Matheus Izvekov <mizvekov at gmail.com>
  Date:   2021-06-17 (Thu, 17 Jun 2021)

  Changed paths:
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/test/CXX/class/class.compare/class.spaceship/p2.cpp

  Log Message:
  -----------
  [clang] use correct builtin type for defaulted comparison analyzer

Fixes PR50591.

When analyzing classes with members which have user-defined conversion
operators to builtin types, the defaulted comparison analyzer was
picking the member type instead of the type for the builtin operator
which was selected as the best match.

This could either result in wrong comparison category being selected,
or a crash when runtime checks are enabled.

Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>

Reviewed By: rsmith

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




More information about the All-commits mailing list