[PATCH] D73354: clang-format: insert trailing commas into containers.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 08:41:01 PST 2020
sammccall added a comment.
In D73354#1838964 <https://reviews.llvm.org/D73354#1838964>, @Bouska wrote:
> I have an issue with this change. Currently (at least for C++), the presence of a trailing comma is used as a formatting hint to put all the element in one line or one per line as below:
Good point about the interaction with bin-packing.
Do the style guides that want this actually endorse bin-packing containers? Insertion + bin-packing + comma-as-hint basically can't coexist - we could turn off the hint or make this option mutually exclusive with bin-packing.
> ...
> So I definitely think this change should be done before formatting and not after.
I don't think this is a solution - we might wrap a container and fail to insert the comma :-)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73354/new/
https://reviews.llvm.org/D73354
More information about the cfe-commits
mailing list