[clang] [clang] "modular_format" attribute for functions using format strings (PR #147431)
Daniel Thornburgh via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 16:07:53 PST 2025
mysterymath wrote:
> The only real 'gotcha' I can see is that thanks to the sorting, we allow 'different' attributes, as long as the 'aspects' are all the same (that is, `float, double` and `double, float`) thanks to the sort.
>
> I question the value of that sort, and probably would just want to disallow duplicate attributes unless identical, but if you have a good reason for it, I'm Ok with it.
It's mostly just annoyance at "overly conservative" error reporting; it's logically a set, so it should behave like a set. There's no real meaning associated with the order, so it would be odd for different orders to produce observable differences in behavior.
https://github.com/llvm/llvm-project/pull/147431
More information about the cfe-commits
mailing list