[all-commits] [llvm/llvm-project] 4a8530: [clang] implicitly delete space ship operator with...
Matheus Izvekov via All-commits
all-commits at lists.llvm.org
Fri Feb 26 16:03:25 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4a8530fc3039f128eddc38737f0172bb3d489bcf
https://github.com/llvm/llvm-project/commit/4a8530fc3039f128eddc38737f0172bb3d489bcf
Author: Matheus Izvekov <mizvekov at gmail.com>
Date: 2021-02-26 (Fri, 26 Feb 2021)
Changed paths:
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/test/CXX/class/class.compare/class.compare.default/p2.cpp
M clang/test/CXX/class/class.compare/class.eq/p2.cpp
M clang/test/CXX/class/class.compare/class.spaceship/p2.cpp
Log Message:
-----------
[clang] implicitly delete space ship operator with function pointers
See bug #48856
Definitions of classes with member function pointers and default
spaceship operator were getting accepted with no diagnostic on
release build, and triggering assert on builds with runtime checks
enabled. Diagnostics were only produced when actually comparing
instances of such classes.
This patch makes it so Spaceship and Less operators are not considered
as builtin operator candidates for function pointers, producing
equivalent diagnostics for the cases where pointers to member function
and pointers to data members are used instead.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D95409
More information about the All-commits
mailing list