[libcxx-commits] [PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Apr 24 14:25:32 PDT 2023
cjdb added a comment.
In D147844#4293693 <https://reviews.llvm.org/D147844#4293693>, @dblaikie wrote:
>> I think some of the cases are ambiguous while others are not.
>
> Data would be good to have - if this assessment is true, we'd expect this to bear out in terms of bug finding, yeah? (that the cases you find to be ambiguous turn up as real bugs with some significant frequency in a codebase?)
I disagree that there's a need for bugs to add this warning. Reading ambiguous-but-correct code isn't going to be buggy, but it is going to cause readability issues for any reviewers or maintainers.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147844/new/
https://reviews.llvm.org/D147844
More information about the libcxx-commits
mailing list