[PATCH] D158318: [Sema] tolerate more promotion matches in format string checking

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 05:34:49 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

In D158318#4615285 <https://reviews.llvm.org/D158318#4615285>, @fcloutier wrote:

> It seems that clang allows `char` specifiers to match `bool` in `scanf` today, without my change (https://godbolt.org/z/e8PrjY65h). I think that this is a mistake, but that's almost certainly up for debate and I'd like to avoid scope creep on this change.

Agreed! Probably worth filing an issue over it so we don't lose track of it, so: https://github.com/llvm/llvm-project/issues/64987

> The new format-strings-scanf.cpp file covers the correct and "barely wrong" cases that I could think of.

Thank you, LGTM!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158318/new/

https://reviews.llvm.org/D158318



More information about the cfe-commits mailing list