carlosgalvezp added inline comments.
================ Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-const-or-ref-data-members.cpp:191 + auto r5 = [&x5]{}; +} ---------------- njames93 wrote: > njames93 wrote: > > Can you add some cases with implicit capture (using [=] and [&]) > I should have been more clear, you need to actually use the variables inside > the lambda to implicitly capture them. Thanks, didn't know that! It's actually quite interesting, implicit lambda captures never trigger an error: https://godbolt.org/z/cErf4jv8E But it's probably good to keep the test anyway in case the lambda implementation changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131780/new/ https://reviews.llvm.org/D131780 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits