[PATCH] D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 8 03:24:03 PDT 2019


klimek added inline comments.


================
Comment at: cfe/trunk/docs/ClangFormatStyleOptions.rst:384
+
+  * ``SIS_WithoutElse`` (in configuration: ``WithoutElse``)
+    Allow short if functions on the same line, as long as else
----------------
MyDeveloperDay wrote:
> klimek wrote:
> > Is that actually the status quo or is the current behavior missing?
> Yes that is "as was"
Ok, that seems... wrong :)
Specifically, I'd at least expect the first one to also do
  if (a) return;
  else return;

That would be SIS_Always now? If so, could we make "true" just be "Always"?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59087





More information about the cfe-commits mailing list