apple-fcloutier wrote: As far as I'm concerned, `-Wmissing-format-attribute` is the subset of `-Wformat-nonliteral` that we can fix it by adding a format attribute. This change is valuable and I want it to land, but I think that we need to close the gaps with -Wformat-nonliteral to make sure we're consistent. This mostly means ensuring you don't get both a `-Wmissing-format-attribute` and a `-Wformat-nonliteral` diagnostic for the same code. And because of that relationship, I think we should also make `-Wmissing-format-attribute` a subgroup of `-Wformat-nonliteral`, as it will subsume diagnostics that -Wformat-nonliteral previously emitted.
This does mean code that was previously clean with `-Wformat-nonliteral` might now get diagnostics for strftime (since enabling `-Wformat-nonliteral` would enable `-Wmissing-format-attribute` and `-Wformat-nonliteral` did not trip for strftime), but I think that's fine. It also means that users could do `-Wformat-nonliteral -Wno-missing-format-attribute` and get fewer diagnostics than before, but there's a lot of silly diagnostic combinations and I don't think that should stop us. https://github.com/llvm/llvm-project/pull/166738 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
