[all-commits] [llvm/llvm-project] 0bbe1b: [clang] Forbid reinterpret_cast of function pointe...
Eli Friedman via All-commits
all-commits at lists.llvm.org
Wed Jul 30 18:15:39 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0bbe1b30faf57b5007d7be6af64ae423b4992de4
https://github.com/llvm/llvm-project/commit/0bbe1b30faf57b5007d7be6af64ae423b4992de4
Author: Eli Friedman <efriedma at quicinc.com>
Date: 2025-07-30 (Wed, 30 Jul 2025)
Changed paths:
M clang/lib/AST/ByteCode/Compiler.cpp
M clang/lib/AST/ByteCode/Interp.h
M clang/lib/AST/ByteCode/Opcodes.td
M clang/lib/AST/ExprConstant.cpp
M clang/test/AST/ByteCode/functions.cpp
M clang/test/CXX/expr/expr.const/p2-0x.cpp
M clang/test/Sema/constexpr-void-cast.c
Log Message:
-----------
[clang] Forbid reinterpret_cast of function pointers in constexpr. (#150557)
This has been explicitly forbidden since C++11, but somehow the edge
case of converting a function pointer to void* using a cast like
`(void*)f` wasn't handled.
Fixes #150340 .
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list