llvm-project/clang/test/FixIt
Matheus Izvekov ad14b5b008 [clang] Stop providing builtin overload candidate for relational function pointer comparisons
Word on the grapevine was that the committee had some discussion that
ended with unanimous agreement on eliminating relational function pointer comparisons.

We wanted to be bold and just ban all of them cold turkey.
But then we chickened out at the last second and are going for
eliminating just the spaceship overload candidate instead, for now.

See D104680 for reference.

This should be fine and "safe", because the only possible semantic change this
would cause is that overload resolution could possibly be ambiguous if
there was another viable candidate equally as good.

But to save face a little we are going to:
* Issue an "error" for three-way comparisons on function pointers.
  But all this is doing really is changing one vague error message,
  from an "invalid operands to binary expression" into an
  "ordered comparison of function pointers", which sounds more like we mean business.
* Otherwise "warn" that comparing function pointers like that is totally
  not cool (unless we are told to keep quiet about this).

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

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D104892
2021-06-26 00:08:02 +02:00
..
Inputs
atomic-property.m
auto-fixit.m
auto-isa-fixit.m
bridge-cast-in-arc.mm
bridge-in-non-arc.m
dereference-addressof.c
fixit-add-synthesize-to-property.m
fixit-autoreleasepool.m
fixit-availability.c
fixit-availability.mm
fixit-c++2a.cpp [c++20] P1143R2: Add support for the C++20 'constinit' keyword. 2019-09-04 20:30:37 +00:00
fixit-c++11.cpp [clang] [C++2b] [P1102] Accept lambdas without parameter list (). 2021-03-24 14:42:27 +01:00
fixit-c90.c
fixit-class-method-messaging.m
fixit-cxx-init-order.cpp [clang] Add fixit for Wreorder-ctor 2021-03-24 19:22:53 +00:00
fixit-cxx1y-compat.cpp
fixit-cxx11-attributes.cpp Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
fixit-cxx11-compat.cpp
fixit-eof-space.c
fixit-errors-1.c
fixit-errors.c
fixit-format-darwin.m
fixit-format-ios-nopedantic.m
fixit-format-ios.m
fixit-function-call.cpp
fixit-include.c
fixit-include.h
fixit-interface-as-param.m
fixit-large-file.cpp
fixit-missing-method-return-type.m
fixit-missing-self-in-block.m
fixit-multiple-selector-warnings.m
fixit-newline-style.c
fixit-nsstring-compare.m
fixit-nullability-declspec.cpp
fixit-objc-arc.m
fixit-objc-bridge-related-attr.m
fixit-objc-bridge-related-property.m
fixit-objc-bridge-related.m
fixit-objc-direct.m [objc_direct] Small updates to help with adoption. 2020-02-16 16:32:41 -08:00
fixit-objc-message-comma-separator.m
fixit-objc-message.m
fixit-objc.m
fixit-pmem.cpp
fixit-pragma-attribute.c
fixit-pragma-attribute.cpp Add support for attributes on @implementations in Objective-C 2019-04-11 17:55:30 +00:00
fixit-pragma-pack.c
fixit-recompile.c
fixit-recursive-block.c Improve -Wuninitialized warning under ARC for block variables that are 2019-04-23 23:52:02 +00:00
fixit-static-assert.cpp [clang] Tweaked fixit for static assert with no message 2021-02-22 17:43:53 +00:00
fixit-static-object-decl.m
fixit-suffix.c
fixit-typedef-instead-of-typename-typo.cpp
fixit-unicode-with-utf8-output.c
fixit-unicode.c
fixit-uninit.c
fixit-unrecoverable.c
fixit-unrecoverable.cpp When typo-correcting a function name, consider correcting to a type name 2019-05-09 00:57:24 +00:00
fixit-unused-lambda-capture.cpp [Sema] Add fixit for unused lambda captures 2018-07-16 07:23:47 +00:00
fixit-vexing-parse-cxx0x.cpp
fixit-vexing-parse.cpp
fixit.c
fixit.cpp [clang] Stop providing builtin overload candidate for relational function pointer comparisons 2021-06-26 00:08:02 +02:00
format-darwin.m
format-no-fixit.m
format.m [Sema] Fix diagnostics for one-byte length modifier 2021-03-09 16:56:20 +01:00
format.mm
messages.cpp
multiarg-selector-fixit.m
no-diagnostics-fixit-info.c
no-fixit.cpp
no-macro-fixit.c
no-typo.c
nullability.mm
objc-literals.m
property-access-fixit.m
selector-fixit.m
typo-crash.cpp [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose 2019-05-09 03:31:27 +00:00
typo-crash.m
typo-location-bugs.cpp
typo-using.cpp
typo.c
typo.cpp
typo.m