[clang] [clang][test] Try to fix Sema/format-strings.c on i686 (PR #181800)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 17 03:33:14 PST 2026
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/181800
>From b71986e0deef83f164dd7dd36c5dc5fa4eb19661 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Tue, 17 Feb 2026 12:05:34 +0100
Subject: [PATCH] [clang][test] Try to fix Sema/format-strings.c on i686
https://github.com/llvm/llvm-project/pull/180566 did this for 32bit arm,
but this still breaks for us downstream on i686 with:
```
```
---
clang/test/Sema/format-strings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index 07bac7095ee82..c0895bb8744fc 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -986,7 +986,7 @@ void test_promotion(void) {
void test_bool(_Bool b, _Bool* bp)
{
-#ifndef __arm__
+#if defined(__LP64__) && !defined(_WIN32)
printf("%zu", b); // expected-warning-re{{format specifies type 'size_t' (aka '{{.+}}') but the argument has type '_Bool'}}
printf("%td", b); // expected-warning-re{{format specifies type 'ptrdiff_t' (aka '{{.+}}') but the argument has type '_Bool'}}
#else
More information about the cfe-commits
mailing list