[llvm-bugs] [Bug 43913] clang-format single line if impossible with braces

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 6 14:14:09 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43913

Michael Pozulp <mpozulp at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|CONFIRMED                   |RESOLVED

--- Comment #5 from Michael Pozulp <mpozulp at gmail.com> ---
Thanks for the analysis! I looked more closely and the style for the code that
I work on allows short if statements on a single line AND short loops on a
single line. That means that all of these are ok

if (x) { x++; }

for (int x = 0; x < 10; x++) { x++; }

while (x) { x++; }

and it appears that setting these options retains the above code

AllowShortIfStatementsOnASingleLine: Always
AllowShortBlocksOnASingleLine: Always
AllowShortLoopsOnASingleLine: true

I'm going to close this bug as RESOLVED. I really appreciate your help!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191106/7cdd4399/attachment.html>


More information about the llvm-bugs mailing list