[llvm-branch-commits] [clang-tools-extra] [clang-tidy][docs] Rewrite bugprone check docs to Markdown [3/4] (PR #214422)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Aug 8 20:40:04 PDT 2026


================
@@ -1,107 +1,106 @@
-.. title:: clang-tidy - bugprone-redundant-branch-condition
+```{title} clang-tidy - bugprone-redundant-branch-condition
+```
 
-bugprone-redundant-branch-condition
-===================================
+# bugprone-redundant-branch-condition
 
-Finds condition variables in nested ``if`` statements that were also checked in
-the outer ``if`` statement and were not changed.
+Finds condition variables in nested `if` statements that were also checked in
+the outer `if` statement and were not changed.
 
 Simple example:
 
-.. code-block:: c
-
-  bool onFire = isBurning();
-  if (onFire) {
-    if (onFire)
-      scream();
-  }
+```c
+bool onFire = isBurning();
+if (onFire) {
+  if (onFire)
+    scream();
+}
+```
 
-Here `onFire` is checked both in the outer ``if`` and the inner ``if``
+Here `onFire` is checked both in the outer `if` and the inner `if`
 statement without a possible change between the two checks. The check warns for
-this code and suggests removal of the second checking of variable `onFire`.
+this code and suggests removal of the second checking of variable
+`onFire`.
 
 The checker also detects redundant condition checks if the condition variable
----------------
EugeneZelenko wrote:

```suggestion
The check also detects redundant condition checks if the condition variable
```

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


More information about the llvm-branch-commits mailing list