================ @@ -69,9 +73,13 @@ void LambdaFunctionNameCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { } void LambdaFunctionNameCheck::registerMatchers(MatchFinder *Finder) { - // Match on PredefinedExprs inside a lambda. - Finder->addMatcher(predefinedExpr(hasAncestor(lambdaExpr())).bind("E"), - this); + Finder->addMatcher( + cxxMethodDecl(isInLambda(), + hasBody(hasDescendant(expr( ---------------- PiotrZSL wrote:
May work, as forEachDescendant may be doing new "set" of variables, to be sure try this: ``` [] { struct S { void f() { __func__; } }; __func__(); struct S2 { void f() { __func__; } }; __func__(); }(); ``` If it work correctly then both func should be found. https://github.com/llvm/llvm-project/pull/89076 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits