[clang][Interp] Emit diagnostic when comparing function pointers
authorTimm Bäder <tbaeder@redhat.com>
Tue, 25 Apr 2023 13:46:20 +0000 (15:46 +0200)
committerTimm Bäder <tbaeder@redhat.com>
Thu, 27 Apr 2023 10:33:28 +0000 (12:33 +0200)
commitf8a9c55bef380a592c4588025f8b6ca4dfc94c47
treec5823e1b203026ad6680e724580f2f2c61c67480
parent4b1cec065227db64f870a179a2d45cffa314641a
[clang][Interp] Emit diagnostic when comparing function pointers

Function pointers can be compared for (in)equality but, but LE, GE, LT,
and GT opcodes should emit an error and abort.

Differential Revision: https://reviews.llvm.org/D149154
clang/lib/AST/Interp/FunctionPointer.h
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opcodes.td
clang/test/AST/Interp/functions.cpp