================
@@ -203,9 +203,17 @@ infrastructure are described first, followed by
tool-specific sections.
the pointer points to an incomplete (forward-declared) type.
- Improved {doc}`bugprone-redundant-branch-condition
- <clang-tidy/checks/bugprone/redundant-branch-condition>` check by fixing
- false positives when the condition variable is changed later in a loop that
- encloses the inner `if`.
+ <clang-tidy/checks/bugprone/redundant-branch-condition>` check:
+
+ - Fixed false positives when the condition variable is changed later in a
loop that
+ encloses the inner `if`.
+
+ - Fixed false negatives when two variables are present on both sides
+ of logical AND(`&&`) in `if` like `a && b`. Previously, it was only
evaluated for
+ first variable `a` and completely ignored the second variable `b` for
redundant
+ branch condition.For example, In `(x && y) { if (y){} if(x){} }` a
warning was
+ only generated for nested `if` with x(`if(x){}`) and never generated for
nested `if`
+ with y(`if (y){}`).
----------------
EugeneZelenko wrote:
```suggestion
of logical AND (`&&`) in `if` like `a && b`.
```
https://github.com/llvm/llvm-project/pull/230846
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits