[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG43cc4f15008f: Ensure that we traverse non-op() method bodys of lambdas (authored by stephenkelly). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:485 + A a; + auto l = [a] { }; + auto lCopy = l; steveire wrote: > rsmith wrote: > > steveire wrote: > > > I don't know how to create a lambda with a default cto

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319992. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95644/new/ https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveASTVisitor.h clang/unittests/ASTMa

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2065 if (const CXXRecordDecl *RD = MD->getParent()) { - if (RD->isLambda()) { + if (RD->isLambda() && RD->getLambdaCallOperator() == MD) { VisitBody = VisitBody && ge

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 319987. steveire added a comment. Use helper method Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95644/new/ https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveASTVisitor.h clang/unit

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2065 if (const CXXRecordDecl *RD = MD->getParent()) { - if (RD->isLambda()) { + if (RD->isLambda() && RD->getLambdaCallOperator() == MD) { VisitBody = VisitBody && getD

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:485 + A a; + auto l = [a] { }; + auto lCopy = l; I don't know how to create a lambda with a default ctor body. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

2021-01-28 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: rsmith. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95644 Files: clang/include/clang/AST/RecursiveAS