sammccall added a comment.
Since the 12 branch has been cut, I've added a blocking bug to get this fixed
in some form: https://bugs.llvm.org/show_bug.cgi?id=48935
@rsmith I've assigned it to you to make a call about whether to cherrypick this
patch, this patch+followup, or revert the original c
steveire added inline comments.
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2063-2065
+ if (const auto *MD = dyn_cast(D)) {
+if (const CXXRecordDecl *RD = MD->getParent()) {
+ if (RD->isLambda()) {
rsmith wrote:
> This is incorrectly skipp
rsmith added inline comments.
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2063-2065
+ if (const auto *MD = dyn_cast(D)) {
+if (const CXXRecordDecl *RD = MD->getParent()) {
+ if (RD->isLambda()) {
This is incorrectly skipping the bodies of
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6f0df3cddb3e: [ASTMatchers] Avoid pathological traversal
over nested lambdas (authored by stephenkelly).
Changed prior to commit:
https://reviews.
alexfh added a comment.
Thanks for the prompt fix, btw!
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2064
+ if (const auto *MD = dyn_cast(D)) {
+if (const auto *RD = MD->getParent()) {
+ if (RD->isLambda()) {
Please specify the type expli
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
This fixes the issue with exponential traversal times for deeply nested
lambdas. Please add a test though. For example, this one:
void f() {
[] {
[] {
[] {
[] {
[] {
steveire created this revision.
steveire added a reviewer: aaron.ballman.
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/D95573
Files:
clang/include/clang/AST/Recu