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

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 8 02:08:26 PDT 2019


MyDeveloperDay marked 2 inline comments as done.
MyDeveloperDay added a comment.

In D59087#1456129 <https://reviews.llvm.org/D59087#1456129>, @krasimir wrote:

> I believe there is no such thing as an "short else statement". The `else` is part of the `if` statement and if it is present, I don't consider the whole `if` statement short. As such, IMO the bug is invalid.


I understand your point, but that is just one viewpoint only.

The opinion of the person who logged the defect (and I'm not that user just someone who wants to address the defects), whether something is a bug or not is 100% about their perspective, (that doesn't mean we have to address everything)

The question is does the change to the option hurt anyone who doesn't care? Is it useful the to the user requesting it? Does it significantly impact our ability to maintain the code, could it be useful to others.



================
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
----------------
klimek wrote:
> Is that actually the status quo or is the current behavior missing?
Yes that is "as was"


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