[clang-tools-extra] [clang-tidy] Fix false negative for binary logical expressions for tw… (PR #230846)

Abhay Singh via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 16 23:39:03 PDT 2026


================
@@ -203,9 +203,15 @@ 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 there are two varibles statement in both side
+      of `&&` in `if` like `a && b` .it showing correct warning for first variable
+      and failed for second variable in if condition.eg.  `(x && y) { if (y) ... }`
+      in this example warning is not shown properly. 
----------------
Abhay13332 wrote:

@EugeneZelenko can you check it now

https://github.com/llvm/llvm-project/pull/230846


More information about the cfe-commits mailing list