aaron.ballman added a comment. In D97653#2681458 <https://reviews.llvm.org/D97653#2681458>, @njames93 wrote:
> Use implicit capture instead of default capture. > > @aaron.ballman, Unfortunately the AST dump tests don't work as implicit > captures don't appear to show up in the textual representation. Yeah, I was suggesting to add that as part of this patch so it'd be testable. We currently print something like `-DeclRefExpr <col:14> 'int' lvalue Var 0x55b0ddc7f808 'b' 'int'` and I think if we changed `TextNodeDumper::VisitDeclRefExpr()` to also print out `RefersToEnclosingVariableOrCapture` and `RefersToImplicitCapture` only when they're set, we could output something like: `-DeclRefExpr <col:14> 'int' lvalue Var 0x55b0ddc7f808 'b' 'int' implicit_capture` or `-DeclRefExpr <col:14> 'int' lvalue Var 0x55b0ddc7f808 'b' 'int' explicit_capture`, which would be useful (in addition to making your changes testable). WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97653/new/ https://reviews.llvm.org/D97653 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits