[PATCH] D119419: [clang-format] Do not remove required spaces when aligning tokens.

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 10 02:22:30 PST 2022


owenpan accepted this revision.
owenpan added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Format/WhitespaceManager.cpp:407
+    // We should not remove required spaces unless we break the line before.
+    assert(Changes[i].NewlinesBefore ||
+           Changes[i].Spaces >=
----------------



================
Comment at: clang/unittests/Format/FormatTest.cpp:17287
+               "  return 2;\n"
+               "}};\n",
+               BracedAlign);
----------------



================
Comment at: clang/unittests/Format/FormatTest.cpp:17298
+               "  return 2;\n"
+               "} };\n",
+               BracedAlign);
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119419



More information about the cfe-commits mailing list