etienneb added inline comments.

================
Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:244
+  // x != 5 || x != 10
+  if (OpcodeLHS == BO_NE || OpcodeLHS == BO_NE)
+    return true;
----------------
etienneb wrote:
> The good news is that this code will be catch by this check!
> ```
>   if (OpcodeLHS == BO_NE || OpcodeLHS == BO_NE)   <<-- redundant expression
> ```
> Should be:
> ```
>   if (OpcodeLHS == BO_NE || OpcodeRHS == BO_NE) 
> ```
> 
> 
> 
btw, it should be:

```
  if (OpcodeLHS == BO_NE && OpcodeRHS == BO_NE)
```


https://reviews.llvm.org/D29858



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to