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

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 29 01:06:06 PST 2021


krasimir added inline comments.


================
Comment at: clang/unittests/Format/FormatTestComments.cpp:3141-3147
             "        # commen3\n"
             "# commen4\n"
             "a: 1  # commen5\n"
             "      # commen6\n"
             "      # commen7",
             format("k:val#commen1 commen2\n"
                    " # commen3\n"
----------------
HazardyKnusperkeks wrote:
> Here the test fails, because `commen1` gets a space added and `commen3` belongs to the same section, thus also gets an additional space.
> I see three options:
> 
>   # The whole keeping indentation in a section is wrong.
>   # Disable the mechanic for text proto.
>   # Adapt the test.
> 
> 
This test change looks OK.


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