[PATCH] D66856: [Sema] Suppress -Wformat diagnostics for bool types when printed using %hhd
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 28 06:11:48 PDT 2019
aaron.ballman added a comment.
I'm wondering whether this should even warn pedantically. There are no format specifiers that apply directly to a `_Bool` datatype, so the user is left making a choice as to what specifier fits best. I think `hhd` and `hhu` are both equally reasonable types, as are the `d` and `u` groups directly -- I don't think we should warn on either of those specifiers with a `_Bool` argument. I could maybe see a case for pedantically diagnosing `h`, `l`, and `ll` prefixes with `_Bool` because that seems a bit type-confused to me. `c` as a specifier seems weird (given that false values will potentially terminate the string suddenly depending on terminal behavior, IIRC), but `lc` seems like type confusion again.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66856/new/
https://reviews.llvm.org/D66856
More information about the cfe-commits
mailing list