Add option to turn off argument reflowing (bin packing) #37051
Labels
bugzilla
Issues migrated from bugzilla
clang-format
enhancement
Improving things as opposed to bug fixing, e.g. new or missing feature
Extended Description
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)
The text was updated successfully, but these errors were encountered: