[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 01:52:32 PDT 2023


MyDeveloperDay requested changes to this revision.
MyDeveloperDay added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/unittests/Format/FormatTest.cpp:25504
+
+#if 0
   verifyFormat("if (quitelongarg !=\n"
----------------
we don't do this.


================
Comment at: clang/unittests/Format/FormatTest.cpp:25505-25510
   verifyFormat("if (quitelongarg !=\n"
                "    (alsolongarg - 1)) { // ABC is a very longgggggggggggg "
                "comment\n"
                "  return;\n"
                "}",
                Style);
----------------
you can't remove a test and just call it good... the original author put this test in for a reason I assume?


================
Comment at: clang/unittests/Format/FormatTest.cpp:25514
+  verifyFormat("void foo() {\n"
+               "  if (quitelongname < alsolongname ||\n"
+               "      anotherevenlongername <=\n"
----------------
isn't the breaking of `if (` and `} else if (\n` inconsistent?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154755



More information about the cfe-commits mailing list