[clang] [llvm] remove redundant uses of `isa` caught by clang-tidy (NFC) (PR #192813)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 19 19:13:31 PDT 2026


================
@@ -227,12 +226,8 @@ class ForwardDeclChecker : public Checker<check::ASTDecl<TranslationUnitDecl>> {
     if (BR->getSourceManager().isInSystemHeader(CE->getExprLoc()))
       return;
 
-    if (auto *F = CE->getConstructor()) {
-      // Skip the first argument for overloaded member operators (e. g. lambda
-      // or std::function call operator).
-      unsigned ArgIdx =
-          isa<CXXOperatorCallExpr>(CE) && isa_and_nonnull<CXXMethodDecl>(F);
-
+    if (const CXXMethodDecl *F = CE->getConstructor()) {
+      unsigned ArgIdx = 0;
----------------
ojhunt wrote:

Took me a moment - this is duplicated code - my feeling is that these should be refactored to a single impl but that's not a change for this PR

https://github.com/llvm/llvm-project/pull/192813


More information about the cfe-commits mailing list