[cfe-dev] [RFC] How to communicate that -Wpedantic controls only certain cases of DiagGroups
Volodymyr Sapsai via cfe-dev
cfe-dev at lists.llvm.org
Wed Apr 11 19:03:37 PDT 2018
I’ll illustrate the problem with a situation encountered by our user. For some code compiled with -Wpedantic they encountered some -Wextra-semi warnings. So they’ve assumed that -Wpedantic controls -Wextra-semi but documentation <https://clang.llvm.org/docs/DiagnosticsReference.html#wpedantic> doesn’t say so. And it is correct because -Wpedantic enables all extension warnings but not disabled-by-default warnings. And for -Wextra-semi the DiagGroups structure is
So there are -Wextra-semi warnings that won’t be enabled by -Wpedantic.
I don’t think that Clang users should understand the intricacies of the DiagGroup structure to use it successfully. And provided example shows we don’t always achieve this goal. Does anybody have an idea how we can communicate that -Wpedantic can enable some warnings in certain cases but not in all cases? And should it be the case at all? Maybe it would be better if we don’t mix extension warnings and regular warnings in the same DiagGroup. I don’t suggest to update all the warnings to adhere to this requirement. But it can be useful to pay more attention to this in the future.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev