================ @@ -190,9 +188,15 @@ void MakeSmartPtrCheck::checkConstruct(SourceManager &SM, ASTContext *Ctx, ConstructCallEnd = ConstructCallStart.getLocWithOffset(LAngle); } + std::string FinalMakeSmartPtrFunctionName = MakeSmartPtrFunctionName.str(); + auto Parents = Ctx->getParents(*Construct); + if (!Parents.empty() && Parents[0].get<clang::Decl>()) ---------------- vbvictor wrote:
Waking up AST with parents is expensive, and I think this part can be moved in matchers. Something like: `cxxConstructExpr(..., optionally(hasParent(varDecl().bind("decl"))))` https://github.com/llvm/llvm-project/pull/154732 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits