Issue 91188
Summary libclc/generic/lib/math/log_base.h:212: Possible &&/& mixup ?
Labels code-quality, libclc
Assignees
Reporter dcb314
    Static analyser cppcheck says:

libclc/generic/lib/math/log_base.h:212:36: style: Boolean result is used in bitwise operation. Clarify _expression_ with parentheses. [clarifyCondition]

Source code is

   int is_near = x >= log_thresh1 & x <= log_thresh2;

Perhaps better code:

 bool is_near = x >= log_thresh1 && x <= log_thresh2;

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to