[llvm-bugs] [Bug 38156] New: [Formatter/ObjC] Formatter should put arguments into one line when block is the last argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jul 13 00:49:12 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38156
Bug ID: 38156
Summary: [Formatter/ObjC] Formatter should put arguments into
one line when block is the last argument
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: jolesiak at google.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
For a method invocation with many arguments but only one inline block which is
the last argument, clang-format should put arguments into one line (if a column
limit allows).
Right now, this:
[object aa:aa bb:^{
return cccccccc;
}];
Is formatted (clang-format -style='{BasedOnStyle: llvm, ColumnLimit: 20}'
file.m) to:
[object
aa:aa
bb:^{
return cccccccc;
}];
Notice that the return line in the output breaks the column limit.
I think that output style makes sense in a general case, e.g. if:
1. There is more then 1 inline block.
2. Arguments don't fit into one line.
--
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/20180713/631bb772/attachment.html>
More information about the llvm-bugs
mailing list