[clang] [Sema] Suggest missing format attributes (PR #166738)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 7 10:38:28 PST 2025


Sirraide wrote:

> Another possible issue is that clang supports the format attribute on non-variadic functions, which GCC doesn't. This diagnostic can suggest adding the attribute to such functions, which would cause an error when compiling with GCC. Should I just disable that case?

That’s a good point; we probably shouldn’t issue a fixit that when applied causes GCC to error... we might still be able to add an implicit format attribute as suggested by https://github.com/llvm/llvm-project/pull/166738#discussion_r2504843326 though.

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


More information about the cfe-commits mailing list