[clang-tools-extra] [clang-tidy] Fix FP/FN in cppcoreguidelines-missing-std-forward (PR #178651)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 30 03:26:57 PST 2026
================
@@ -107,19 +107,21 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) {
auto CapturedInLambda = hasDeclContext(cxxRecordDecl(
isLambda(),
- hasParent(lambdaExpr(forCallable(equalsBoundNode("func")),
- anyOf(CapturedInCaptureList, CapturedInBody)))));
+ hasAncestor(lambdaExpr(forCallable(equalsBoundNode("func")),
+ anyOf(CapturedInCaptureList, CapturedInBody)))));
----------------
zeyi2 wrote:
Hi, thanks for reviewing! I've updated the matcher. However I'm not sure that I understand what you said correctly > <, could you please take another look when you have time?
https://github.com/llvm/llvm-project/pull/178651
More information about the cfe-commits
mailing list