diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp b/clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp index ef0f4bdded8..f009f9f5941 100644 --- a/clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp +++ b/clang-tools-extra/test/clang-tidy/readability-avoid-const-params-in-decls.cpp @@ -90,3 +90,7 @@ void ConstNotVisible(CONCAT(cons, t) int i); // CHECK-MESSAGES: :[[@LINE-1]]:22: warning: parameter 'i' // We warn, but we can't give a fix // CHECK-FIXES: void ConstNotVisible(CONCAT(cons, t) int i); + +// Regression test. We should not warn (or crash) on lambda expressions +auto lambda_with_name = [](const int n) {}; +auto lambda_without_name = [](const int) {}; |