[llvm-bugs] [Bug 37703] New: Add option to turn off argument reflowing (bin packing)
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 6 09:16:41 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37703
Bug ID: 37703
Summary: Add option to turn off argument reflowing (bin
packing)
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: matthew.woehlke at kitware.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
I'm having a number of issues trying to get clang-format to behave reasonably
on
https://github.com/Kitware/kwiver/blob/303a11ebb43c020ab8e48b6ef70407b460dba46b/vital/range/filter.h,
using
https://gist.github.com/mwoehlke-kitware/d8ef9466df5096a035059938aef2948d.
For this RFE, the problem is with bin packing parameters. Ultimately, what I
want is to be able to just turn off bin packing. I usually want parameters to
be split in whatever manner is both most aesthetic and most readable. IOW, I
don't want to *enforce* one parameter per line, but there are also cases when I
don't want to enforce "optimal" packing. Sometimes it just looks worse.
Sometimes a function takes a set of parameters that just "read better" with
less than optimal packing.
Here's an example that clang-format should leave along:
void foo(
Eigen::Matrix4d x_matrix, double x,
Eigen::Matrix4d y_matrix, double y)
"Optimal" packing would result in this, which (to a human) is clearly worse:
void foo(
Eigen::Matrix4d x_matrix, double x, Eigen::Matrix4d y_matrix,
double y)
--
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/20180606/a3ddd459/attachment.html>
More information about the llvm-bugs
mailing list