[PATCH] D139834: [clang-format] AllowShortCompoundRequirementOnASingleLine

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 23:46:36 PST 2022


MyDeveloperDay added inline comments.


================
Comment at: clang/lib/Format/Format.cpp:809
                    Style.AllowShortCaseLabelsOnASingleLine);
+    IO.mapOptional("AllowShortCompoundRequirementOnASingleLine",
+                   Style.AllowShortCompoundRequirementOnASingleLine);
----------------
haven't we use "Requires" in other options? What is the definition of Compound?

I might be tempted for this to be AllShortRequiresOnASingleLine but then it be an enum with the following options

```
Leave
Never
Always
Compound
```


================
Comment at: clang/lib/Format/Format.cpp:1265
   LLVMStyle.AllowShortCaseLabelsOnASingleLine = false;
+  LLVMStyle.AllowShortCompoundRequirementOnASingleLine = true;
   LLVMStyle.AllowShortEnumsOnASingleLine = true;
----------------
why would the default be true, is that what happens today?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139834



More information about the cfe-commits mailing list