================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to