[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 16:20:48 PST 2024


PiJoules wrote:

> This patch looks fine from my end, but I was wondering: Does clang do warnings for printf flags that don't apply to a specific conversion? As an example, in the format specifier `"%+R"` is technically undefined since the `+` flag only applies to signed conversions. In practice it's not a big deal (we just ignore irrelevant flags) but it could be an area of further development.

Oh, that's a good point. Since `+` is used for signed types, I'll also emit a warning for `+` with unsigned types similar to how clang does it with unsigned ints.

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


More information about the cfe-commits mailing list