[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 08:59:21 PST 2024
================
@@ -269,6 +472,23 @@ void BranchCloneCheck::check(const MatchFinder::MatchResult &Result) {
return;
}
+ if (const auto *IS = Result.Nodes.getNodeAs<IfStmt>("ifWithDescendantIf")) {
+ const Stmt *Then = IS->getThen();
+ if (const CompoundStmt *CS = dyn_cast<CompoundStmt>(Then)) {
+ if (!CS->body_empty()) {
+ const IfStmt *InnerIf = dyn_cast<IfStmt>(*CS->body_begin());
----------------
EugeneZelenko wrote:
```suggestion
const auto *InnerIf = dyn_cast<IfStmt>(*CS->body_begin());
```
https://github.com/llvm/llvm-project/pull/114715
More information about the cfe-commits
mailing list