llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

https://github.com/llvm/llvm-project/pull/180566 did this for 32bit arm, but 
this still breaks for us downstream on i686 with:
```
# .---command stderr------------
# | error: 'expected-warning' diagnostics expected but not seen: 
# |   File /builddir/build/BUILD/llvm-project/clang/test/Sema/format-strings.c 
Line 990: format specifies type 'size_t' (aka '{{.+}}') but the argument has 
type '_Bool'
# |   File /builddir/build/BUILD/llvm-project/clang/test/Sema/format-strings.c 
Line 991: format specifies type 'ptrdiff_t' (aka '{{.+}}') but the argument has 
type '_Bool'
# | 2 errors generated.
# `-----------------------------
```

---
Full diff: https://github.com/llvm/llvm-project/pull/181800.diff


1 Files Affected:

- (modified) clang/test/Sema/format-strings.c (+1-1) 


``````````diff
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index 07bac7095ee82..96159afefebd7 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__
+#ifdef __LP64__
   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

``````````

</details>


https://github.com/llvm/llvm-project/pull/181800
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to