[PATCH] D73354: clang-format: insert trailing commas into containers.

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 27 08:25:30 PST 2020


krasimir added inline comments.


================
Comment at: clang/lib/Format/Format.cpp:1482
+///     ];
+class TrailingCommaInserter : public TokenAnalyzer {
+public:
----------------
sammccall wrote:
> Worth a comment (somewhere) about the fact that this never rewraps, in particular if the line is long, for simplicity.
> 
> Another policy that occurred to me: don't insert the comma if you're exactly at the line limit.
+1 for "Another policy that occurred to me: don't insert the comma if you're exactly at the line limit." (or //over// the column limit). Seems like that would be enough to keep it idempotent.


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