jroelofs wrote:

I think this diagnostic should not be firing on `%x` format specifiers:

https://clang.godbolt.org/z/YGh1qdq1h

```
#include <stdio.h>

void bad() {
    int u = 0;
    printf("%x\n", u);
}
```

```
<source>:5:20: warning: format specifies type 'unsigned int' but the argument 
has type 'int' [-Wformat]
    5 |     printf("%x\n", u);
      |             ~~     ^
      |             %x
1 warning generated.
```

https://github.com/llvm/llvm-project/pull/74440
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to