================ @@ -22537,10 +22537,12 @@ TEST_F(FormatTest, FormatsLambdas) { " }\n" "}", Style); - verifyFormat("std::sort(v.begin(), v.end(),\n" - " [](const auto &foo, const auto &bar) {\n" - " return foo.baz < bar.baz;\n" - "});", ---------------- owenca wrote:
> I can add this back in but the reason I removed it in favour of putting the > equivalent code inside block scope is because the code in this example is a > violation of C++ grammar given it is not actually a declaration but is at > namespace/global scope. Yeah, but many clang-format test cases (`return` statements, function calls, etc) seem "invalid" because they are not wrapped in a block. What if the test case above is in a macro definition? https://github.com/llvm/llvm-project/pull/66755 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits