Skip to content
Commit 4a8530fc authored by Matheus Izvekov's avatar Matheus Izvekov Committed by Richard Smith
Browse files

[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
parent f685c9ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment