[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical
Ishaan Gandhi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 23 06:03:40 PDT 2022
ishaangandhi added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp:28
+ const Expr *RHSExpr = llvm::dyn_cast<Expr>(RHS);
+ if (LHSExpr->containsErrors() && RHSExpr->containsErrors()) {
+ return false;
----------------
njames93 wrote:
> Surely we can bail if only one of the sides contains an errors.
Makes no difference, since when only one of the side has errors, the two profile hashes will be different.
================
Comment at: clang-tools-extra/docs/ReleaseNotes.rst:236
+- Fixed a false positive in :doc:`bugprone-branch-clone
+ <clang-tidy/checks/bugprone-branch-clone>` when the branches
----------------
Eugene.Zelenko wrote:
> Documentation path was changed recently. Please also keep alphabetical order inside section.
Hm? Its still at this path on mastesr: https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/ReleaseNotes.rst
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128402/new/
https://reviews.llvm.org/D128402
More information about the cfe-commits
mailing list