[PATCH] D136156: [Clang][Diagnostic] Add hidden-reinterpret-cast diagnostic warning
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 24 09:34:13 PDT 2022
aaron.ballman added a comment.
Thank you for the patch!
We don't typically add new diagnostics that are ignored by default because we have significant evidence that users don't enable them enough to warrant adding them.
In this case, I don't think we should enable this by default because it's effectively a "you're using the language feature" kind of diagnostic rather than pointing out inherently incorrect code. However, if there are situations where it points out undefined behavior were weren't diagnosing and we can limit the diagnostic to those cases, I think that would be great to enable by default. Alternatively, I think this would make sense as a clang-tidy check rather than part of the compiler itself as it feels more like a stylistic diagnostic than a correctness one.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136156/new/
https://reviews.llvm.org/D136156
More information about the cfe-commits
mailing list