[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 07:59:16 PST 2022


HazardyKnusperkeks added a comment.

Please mark comments as done.



================
Comment at: clang/lib/Format/Format.cpp:1270
   LLVMStyle.AllowShortLoopsOnASingleLine = false;
+  LLVMStyle.AllowShortRequiresExpressionOnASingleLine = true;
   LLVMStyle.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
----------------
Please initialize to false, because that is what we are doing right now.


================
Comment at: clang/unittests/Format/FormatTest.cpp:2904
+  FormatStyle Style = getLLVMStyle();
+  EXPECT_TRUE(Style.AllowShortRequiresExpressionOnASingleLine);
+  verifyFormat("template <typename T>\n"
----------------
Please add a test where the clause is too long and will still be wrapped. Reduce the column limit and use some longer identifiers.


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

https://reviews.llvm.org/D139786



More information about the cfe-commits mailing list