[clang-tools-extra] 894cca4 - [NFC][clang-tidy] Extend doc-comment of BranchCloneCheck (#206116)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 26 09:01:50 PDT 2026
Author: DonĂ¡t Nagy
Date: 2026-06-26T16:01:44Z
New Revision: 894cca4c2669cfcbeae96edd7c59eacf71369a00
URL: https://github.com/llvm/llvm-project/commit/894cca4c2669cfcbeae96edd7c59eacf71369a00
DIFF: https://github.com/llvm/llvm-project/commit/894cca4c2669cfcbeae96edd7c59eacf71369a00.diff
LOG: [NFC][clang-tidy] Extend doc-comment of BranchCloneCheck (#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.
Added:
Modified:
clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
Removed:
################################################################################
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
More information about the cfe-commits
mailing list