[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 26 12:35:35 PDT 2023


aaron.ballman added a comment.

In D147844#4299856 <https://reviews.llvm.org/D147844#4299856>, @chaitanyav wrote:

> Disable precedence conditional warning by default; Revert changes to test files

I'm sorry, I think there was a miscommunication. We were saying that we don't typically want off-by-default diagnostics at all, not asking to turn this one off by default. We've found that when a diagnostic is off by default, it very rarely gets enabled by enough projects to be worth having the diagnostic. So we instead expect diagnostics to have a very low false positive rate so that they can be on by default without worrying that a lot of users will have to disable it due to chattiness.

So instead of making this diagnostic be `DefaultIgnore`, I think you should back out most of the recent changes so we're back to only the small number of additional diagnostics in the earlier patches.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147844/new/

https://reviews.llvm.org/D147844



More information about the cfe-commits mailing list