[clang] [clang][bytecode] Char<Signed> doesn't need a descriptor ctor (PR #203748)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 13 23:57:12 PDT 2026


https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/203748

This was lost when adding Char for 8-bit data.

>From cf8fdcb52ad52bbd26ebebdde4899aa0f5f6034a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Sat, 13 Jun 2026 19:45:02 +0200
Subject: [PATCH] [clang][bytecode] Char<Signed> doesn't need a descriptor ctor

This was lost when adding Char for 8-bit data.
---
 clang/lib/AST/ByteCode/Descriptor.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/AST/ByteCode/Descriptor.cpp b/clang/lib/AST/ByteCode/Descriptor.cpp
index dfe539ca85e04..8c5bb1af869d1 100644
--- a/clang/lib/AST/ByteCode/Descriptor.cpp
+++ b/clang/lib/AST/ByteCode/Descriptor.cpp
@@ -23,8 +23,8 @@ using namespace clang;
 using namespace clang::interp;
 
 template <typename T> static constexpr bool needsCtor() {
-  if constexpr (std::is_same_v<T, Integral<8, true>> ||
-                std::is_same_v<T, Integral<8, false>> ||
+  if constexpr (std::is_same_v<T, Char<true>> ||
+                std::is_same_v<T, Char<false>> ||
                 std::is_same_v<T, Integral<16, true>> ||
                 std::is_same_v<T, Integral<16, false>> ||
                 std::is_same_v<T, Integral<32, true>> ||



More information about the cfe-commits mailing list