[llvm-bugs] [Bug 45532] New: flang/lib/Semantics/check-declarations.cpp: 2 * strange use of bitwise operator

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 14 05:29:58 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45532

            Bug ID: 45532
           Summary: flang/lib/Semantics/check-declarations.cpp: 2 *
                    strange use of bitwise operator
           Product: flang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Fortran IR
          Assignee: unassignedbugs at nondot.org
          Reporter: dcb314 at hotmail.com
                CC: David.Truby at arm.com, eric.schweitz at pgroup.com,
                    llvm-bugs at lists.llvm.org

1.

flang/lib/Semantics/check-declarations.cpp:860:66: style: Boolean result is
used in bitwise operation. Clarify expression with parentheses.
[clarifyCondition]

Source code is

  } else if (!CheckDefinedOperatorArg(opName, specific, proc, 0) |
      !CheckDefinedOperatorArg(opName, specific, proc, 1)) {

Maybe better code

  } else if (!CheckDefinedOperatorArg(opName, specific, proc, 0) ||
      !CheckDefinedOperatorArg(opName, specific, proc, 1)) {

2.

flang/lib/Semantics/check-declarations.cpp:950:78: style: Boolean result is
used in bitwise operation. Clarify expression with parentheses.
[clarifyCondition]

Duplicate.

-- 
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/20200414/aa177627/attachment.html>


More information about the llvm-bugs mailing list