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

2023-08-25 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. Commit is https://github.com/llvm/llvm-project/commit/04e6178ae932c9a1d939dcfe3ef1189f4bbb21aa. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158318/new/ https://reviews.llvm.org/D158318 ___ cfe-commits mailing lis

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

2023-08-25 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier closed this revision. fcloutier added a comment. Apologies, I landed the change but forgot to update the commit message to include the "Differential Revision:" link. -_- I'm closing this change and I'll update the GitHub issue, which is linked. CHANGES SINCE LAST ACTION https://rev

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

2023-08-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D158318#4615285 , @fcloutier wrote: > It seems that clang allows `char` specifiers to match `bool` in `scanf` > today, without my cha

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

2023-08-24 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 553271. fcloutier added a comment. 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

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

2023-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I just realized that we may need some additional test coverage for `scanf`, as that interface also uses `ArgType::matchesType()`: https://github.com/llvm/llvm-project/blob/5686f06d7fc02b7e2ab1eceb56f3830b6fdf7301/clang/lib/AST/ScanfFormatString.cpp#L511 but I thin

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

2023-08-22 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added inline comments. Comment at: clang/lib/AST/FormatString.cpp:480-481 + break; +case BuiltinType::Half: +case BuiltinType::Float16: +case BuiltinType::Float: aaron.ballman wrote: > Should these be che

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

2023-08-22 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 552579. fcloutier marked an inline comment as done. fcloutier added a comment. Add release note, ensure `bool` as a formatted formal parameter is accepted. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158318/new/ https://reviews.llvm.org/D158318

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

2023-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this! The changes should come with a release note (in `clang/docs/ReleaseNotes.rst`). Also, you should upload the patch with `-U999` amount of context so that reviewers can see the bigger picture a bit more easily. Comment at: cla

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

2023-08-18 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier created this revision. fcloutier added a reviewer: aaron.ballman. Herald added a project: All. fcloutier requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. It's been reported that when using __attribute__((format)) on non-variadic f