aaron.ballman added inline comments.
================ Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:478-487 + } else if (auto *LE = dyn_cast<LambdaExpr>(S)) { + + for (unsigned I = 0, N = LE->capture_size(); I != N; ++I) { + const auto *C = LE->capture_begin() + I; + { + ASTNodeNotSpelledInSourceScope RAII( + this, TraversingASTNodeNotSpelledInSource || !C->isExplicit()); ---------------- ================ Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:512-513 + // Visit parameters. + for (unsigned I = 0, N = Proto.getNumParams(); I != N; ++I) + TraverseDecl(Proto.getParam(I)); + } ---------------- ================ Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:516 + + auto *T = Proto.getTypePtr(); + for (const auto &E : T->exceptions()) ---------------- ================ Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:526 + TraverseStmt(LE->getTrailingRequiresClause()); + + TraverseStmt(LE->getBody()); ---------------- Do we also need to traverse attributes of the lambda? ================ Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:3069 + + Code = R"cpp( +void foo() { ---------------- Do we have other test coverage for the rest of lambda matching, or should you add coverage for things like parameters, trailing requires clauses, etc? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93688/new/ https://reviews.llvm.org/D93688 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits