[clang] [clang] Forbid reinterpret_cast of function pointers in constexpr. (PR #150557)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 25 12:38:12 PDT 2025


================
@@ -3,8 +3,8 @@
 // RUN: %clang_cc1 -x c -fsyntax-only %s -verify=c -std=c11 -fexperimental-new-constant-interpreter
 // RUN: %clang_cc1 -x c -fsyntax-only %s -pedantic -verify=c-pedantic -std=c11 -fexperimental-new-constant-interpreter
 //
-// RUN: %clang_cc1 -x c++ -fsyntax-only %s -verify=cxx
-// RUN: %clang_cc1 -x c++ -fsyntax-only %s -pedantic -verify=cxx-pedantic
+// RUN: %clang_cc1 -x c++ -fsyntax-only %s -verify=cxx-nointerpreter
+// RUN: %clang_cc1 -x c++ -fsyntax-only %s -pedantic -verify=cxx-pedantic,cxx-nointerpreter
----------------
efriedma-quic wrote:

Attempted to add bytecode interpreter support.  Not sure I did it right, since the code is structured very differently from what I'm used to.

https://github.com/llvm/llvm-project/pull/150557


More information about the cfe-commits mailing list