https://github.com/Jinjie-Huang created https://github.com/llvm/llvm-project/pull/242223
`getMetadataSize()` calls `llvm_unreachable()`, which is not constexpr in certain build modes, potentially triggering a GCC compilation error. >From 65e3f5e952eb37f3d4b8d007c116cb975611ca87 Mon Sep 17 00:00:00 2001 From: huangjinjie <[email protected]> Date: Fri, 13 Nov 2026 17:14:16 +0800 Subject: [PATCH] fix non constexpr in getMetadataSize --- clang/lib/AST/ByteCode/Block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/AST/ByteCode/Block.h b/clang/lib/AST/ByteCode/Block.h index f166d5a608f4d..731790ab4aebf 100644 --- a/clang/lib/AST/ByteCode/Block.h +++ b/clang/lib/AST/ByteCode/Block.h @@ -84,7 +84,7 @@ class Block final { return sizeof(Block) + getMetadataSize(K) + D->getAllocSize(); } - static constexpr unsigned getMetadataSize(BlockKind K) { + static unsigned getMetadataSize(BlockKind K) { switch (K) { case None: return 0; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
