[clang] [clang-tools-extra] [clang-tidy] Add readability-avoid-default-lambda-capture (PR #160150)
JJ Marr via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 9 12:05:40 PDT 2025
================
@@ -0,0 +1,143 @@
+// RUN: %check_clang_tidy %s readability-avoid-default-lambda-capture %t -- -- -Wno-vla-extension
----------------
jjmarr-amd wrote:
Well, you'd get a compiler warning on the variable-length array on line 137 since that's not a valid C++ construct. However, implicitly capturing a VLA is a clang compiler extension so it's a necessary test case.
I suppose I could remove and check for the VLA warning, but I thought that might be confusing to someone reading the test case expecting there not to be a warning.
https://github.com/llvm/llvm-project/pull/160150
More information about the cfe-commits
mailing list