Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to turn off argument reflowing (bin packing) #37051

Open
llvmbot opened this issue Jun 6, 2018 · 1 comment
Open

Add option to turn off argument reflowing (bin packing) #37051

llvmbot opened this issue Jun 6, 2018 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-format enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Jun 6, 2018

Bugzilla Link 37703
Version 6.0
OS Linux
Reporter LLVM Bugzilla Contributor

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)

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 27, 2021

mentioned in issue llvm/llvm-bugzilla-archive#37708

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@mydeveloperday mydeveloperday added the enhancement Improving things as opposed to bug fixing, e.g. new or missing feature label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-format enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

2 participants