================ @@ -0,0 +1,38 @@ +// RUN: %check_clang_tidy -std=c++17 %s readability-redundant-lambda-parentheses %t ---------------- localspook wrote:
With this check, I would advocate for putting all the tests into one file and using combinations of `#ifdef` guards and `-check-suffixes=...`. This check is *not* like `readability-trailing-comma`, because it behaves differently in different standards *given the exact same code*. Using separate files makes it difficult to fully test that kind of behaviour. For example, if you wanted to test a scenario like "on this snippet, the check warns in C++23 but not earlier", you would have to write that snippet three times: once in the C++11 file (no warning), once in the C++20 file (no warning), and once in the C++23 file (yes warning). If you, say, skip the C++20 file, and you have a bug where you're actually warning in C++20 and up instead of C++23 and up, you won't catch it. If you instead put everything in one file, you can avoid having to make that tradeoff between lots of icky copypasting and incomplete coverage. https://github.com/llvm/llvm-project/pull/190438 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
