[clang] [clang] Warn on signed char array constant conversion (PR #203792)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 02:55:36 PDT 2026


================
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -verify=expected,one-bit -triple x86_64-apple-darwin %s
-// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wno-single-bit-bitfield-constant-conversion -verify -triple x86_64-apple-darwin %s
+// RUN: %clang_cc1 -fsyntax-only -ffreestanding -verify=expected,signed-plain-char,one-bit -triple x86_64-apple-darwin %s
+// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wno-single-bit-bitfield-constant-conversion -verify=expected,signed-plain-char -triple x86_64-apple-darwin %s
+// RUN: %clang_cc1 -fsyntax-only -ffreestanding -Wno-single-bit-bitfield-constant-conversion -verify=expected,unsigned-plain-char -triple x86_64-apple-darwin -fno-signed-char %s
----------------
cor3ntin wrote:

can you add an explicit test for `-fsigned-char` (it's not the default on all platforms)

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


More information about the cfe-commits mailing list