https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/196949
None >From d57346798c2a3fba0a55c5c1778eff1be7f8268e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Mon, 11 May 2026 15:31:54 +0200 Subject: [PATCH] [clang][bytecode] Allow IntAP(S) in CastIntegralFixedPoint op --- clang/lib/AST/ByteCode/Opcodes.td | 2 +- clang/test/AST/ByteCode/fixed-point.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/clang/lib/AST/ByteCode/Opcodes.td b/clang/lib/AST/ByteCode/Opcodes.td index 3fb25a5fa0884..a9bac64636cc7 100644 --- a/clang/lib/AST/ByteCode/Opcodes.td +++ b/clang/lib/AST/ByteCode/Opcodes.td @@ -758,7 +758,7 @@ def CastPointerIntegralAPS : Opcode { let Args = [ArgUint32]; } def CastIntegralFixedPoint : Opcode { - let Types = [FixedSizeIntegralTypeClass]; + let Types = [IntegralTypeClass]; let Args = [ArgUint32]; let HasGroup = 1; } diff --git a/clang/test/AST/ByteCode/fixed-point.cpp b/clang/test/AST/ByteCode/fixed-point.cpp index c8baa1972536a..fb44558fc037b 100644 --- a/clang/test/AST/ByteCode/fixed-point.cpp +++ b/clang/test/AST/ByteCode/fixed-point.cpp @@ -20,6 +20,11 @@ static_assert(A == 0.0k); static_assert(A == 0); static_assert(!A); +#ifdef __SIZEOF_INT128__ +constexpr __int128 i128 = 42; +static_assert(i128 == 42.0k, ""); +#endif + constexpr bool toBool() { if (A) return true; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
