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

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 25 00:03:08 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
----------------
tbaederr wrote:

The point of adding the RUN lines for the bytecode interpreter was to encourage people to fix changes in both interpreters, not add different verify prefixes.

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


More information about the cfe-commits mailing list