https://github.com/NagyDonat created 
https://github.com/llvm/llvm-project/pull/206116

Commit 8ac2b77a11c9db9879557ce1c26e38628e1ef45f extended the check 
bugprone-branch-clone with a new feature but forgot to mention this in the 
doc-comment at the beginning of BranchCloneCheck.h.

Although I don't think that this comment is read too often, let's still update 
it to provide accurate information.

From 623d2d5c2bd3c2737c551d4c6d4d069b4597b930 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?= <[email protected]>
Date: Fri, 26 Jun 2026 17:46:05 +0200
Subject: [PATCH] [NFC][clang-tidy] Extend doc-comment of BranchCloneCheck

Commit 8ac2b77a11c9db9879557ce1c26e38628e1ef45f extended the check
bugprone-branch-clone with a new feature but forgot to mention this in
the doc-comment at the beginning of BranchCloneCheck.h.

Although I don't think that this comment is read too often, let's still
update it to provide accurate information.
---
 clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h 
b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
index 3888d5ede7b41..c5a240904ae6e 100644
--- a/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
+++ b/clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
@@ -18,6 +18,10 @@ namespace clang::tidy::bugprone {
 /// detecting switch statements where two or more consecutive branches are
 /// Type I clones of each other, and for detecting conditional operators where
 /// the true and false expressions are Type I clones of each other.
+/// Additionally, this check also reports situations like
+///   if (some && condition) { if (some && condition) { foo(); } }
+/// where an `if` statement directly contains another `if` statement that has
+/// exactly the same expression as its condition.
 ///
 /// For the user-facing documentation see:
 /// https://clang.llvm.org/extra/clang-tidy/checks/bugprone/branch-clone.html

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to