[PATCH] D75034: [clang-format] use spaces for alignment with UT_ForContinuationAndIndentation

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 05:55:42 PST 2020


MyDeveloperDay added subscribers: djasper, klimek.
MyDeveloperDay added a comment.

> Is this intentional, or is it an oversight?

This is the key question, which I'm not sure how we can answer without the help of the original authors @djasper and @klimek

For example I can't understand with the example below if the TabWith is 8 why are you putting 13 spaces in, rather than the original test which had 1 tab (assuming 8 characters) and 5 spaces? (to make up 13)

Could you explain why this is the correct change for this example why its correct to put 13 spaces? (is this not continuation or indentation?)

  Tab.UseTab = FormatStyle::UT_ForContinuationAndIndentation;
  Tab.TabWidth = 8;
  Tab.IndentWidth = 8;
  verifyFormat("class X {\n"
               "\tvoid f() {\n"
               "\t\tsomeFunction(parameter1,\n"
               "\t\t.............parameter2);\n"
               "\t}\n"
               "};",
               Tab);


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

https://reviews.llvm.org/D75034





More information about the cfe-commits mailing list