[PATCH] D107294: [clang] adds warning to suggest users replace symbols with alt tokens
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 2 11:24:30 PDT 2021
aaron.ballman added a comment.
In D107294#2920477 <https://reviews.llvm.org/D107294#2920477>, @cjdb wrote:
> In D107294#2920355 <https://reviews.llvm.org/D107294#2920355>, @aaron.ballman wrote:
>
>> The usual community viewpoint on off-by-default diagnostics is that they're generally low value and not something that users will manually enable.
>
> I was under the impression many warnings weren't enabled by default?
We certainly have some! My understanding is that many of those were added before we realized most people don't actually enable off-by-default warnings, so it's only "recently" (within the past 5-10 years) that we've pushed back more consistently on off-by-default diagnostics (and even then, we still allow them sometimes; `-Wfallthrough` is a good example of that).
>> I think this functionality is better handled by clang-tidy
>
> Ack. I've not touched clang-tidy yet; how different do you expect the code to look to what I've got right now?
Because you're doing this at the AST node level, I would expect it to be pretty easy. If you want to do it within preprocessor expressions (or other places where the information isn't in the AST node), it's still doable but might be a bit more complex.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107294/new/
https://reviews.llvm.org/D107294
More information about the cfe-commits
mailing list