[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 14 13:13:45 PST 2020


HazardyKnusperkeks added a comment.

In D92257#2452063 <https://reviews.llvm.org/D92257#2452063>, @MyDeveloperDay wrote:

> This didn't really address the comments, what is the point of the maximum?

My goal is to remove all spaces between `//` and the content (with the exception of comment sections, as I have learned here), **and** do not break the current behavior in any way, and currently it seems to work with an unlimited maximum, and a minimum of 1.

In D92257#2452063 <https://reviews.llvm.org/D92257#2452063>, @MyDeveloperDay wrote:

> what if the maximum is > the ColumnLimit?

Most likely what ever happens now if the space in the comment is larger than the ColumnLimit. But one could just remove spaces as needed.
A more interesting question would be `what happens if the minimum is larger than the ColumnLimit?`. For that one had to decide which is more important, I would go with the ColumnLimit and reduce the minimum, but maybe that could be handled with the penalties? Although I have to admit that I don't understand where and how they are used.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92257/new/

https://reviews.llvm.org/D92257



More information about the cfe-commits mailing list