[PATCH] D137762: [clang-format] avoid breaking )( with BlockIndent

Gedare Bloom via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 14 17:30:33 PST 2022


gedare added inline comments.


================
Comment at: clang/unittests/Format/FormatTest.cpp:7215
   Style.AlignAfterOpenBracket = FormatStyle::BAS_DontAlign;
-  EXPECT_EQ(StringRef("functionCall(paramA, paramB,\n"
-                      "    paramC);\n"
-                      "void functionDecl(int A, int B,\n"
-                      "    int C);"),
-            format(Input, Style));
+  verifyFormat("functionCall(paramA, paramB,\n"
+               "    paramC);\n"
----------------
HazardyKnusperkeks wrote:
> Sorry for the confusion, you can (and should?) keep the `Input` variable. There is a verifyFormat with 4 arguments. So that the input in the formatting doesn't have to be the expected.
Ok, I restored it in this function. I didn't add it to the other functions since they weren't using it already.  The vast majority of the calls to verifyFormat are using the 3-argument version. It's unclear what is preferred.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137762/new/

https://reviews.llvm.org/D137762



More information about the cfe-commits mailing list