[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

Jon Phillips via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 22 08:21:25 PDT 2023


================
@@ -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"
-               "});",
----------------
jp4a50 wrote:

I've added a test which puts the `std::sort(...)` in a macro definition. It works as expected.

I haven't added the original test back since I still think it's misleading but if you still think I should keep it I will add it back (and adjust it to pass as-is). Just let me know.

https://github.com/llvm/llvm-project/pull/66755


More information about the cfe-commits mailing list