[llvm-bugs] [Bug 47010] New: add warnings for possible ambiguity in logical expressions not currently covered
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Aug 5 17:07:38 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=47010
Bug ID: 47010
Summary: add warnings for possible ambiguity in logical
expressions not currently covered
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: vince.a.bridgers at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
During review of https://reviews.llvm.org/D85097, it came out in comments that
the current cases are not covered by clang warnings for -Wparentheses, and the
specific warning that might cover these. I'd prefer to finish
https://reviews.llvm.org/D85097, which covers ambiguous chained compare
operations, like x<y<z, and pick this up after as a separate patch.
Filing as a reminder to pick this up later, and use as reference in reply to
comments in https://reviews.llvm.org/D85097.
// FIXME - These do not currently trigger any warnings
b = (p1 == p2 < p3); // maybe intentional, but definitely deserving of
a warning
b = (p1 == p2 == p3); // definitely buggy and deserving of a warning
b = (p1 != p2 != p3); // definitely buggy and deserving of a warning
b = (p1 < p2 == p3 < p4); // maybe intentional, but definitely deserving of
a warning
b = (p1 == p2 < p3 == p4); // definitely buggy and deserving of a warning
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200806/ce052414/attachment.html>
More information about the llvm-bugs
mailing list