Currently, when UseTab is set to ForIndentation, the following code is indented using a tab for the struct indentation and spaces for the braced init indentation:
c static const struct { const char *name; # This line starts with a tab int value; } keywords[] = { {"build", BUILD}, # This line starts with 4 spaces {"default", DEFAULT}, {"include", INCLUDE}, {"pool", POOL}, {"rule", RULE}, {"subninja", SUBNINJA}, };
I believe the braced init lines should start with a tab as well in this case.
When trying to modify clang-format to make this happen, I discovered braced init lists are currently marked with the BK_Unknown block type so I modified the code to assign the BK_BracedInit block type to l_brace tokens that start a braced init. I also modified the method that decides whether to use block indents to take braced inits into account.
I'm completely unfamiliar with the clang-format codebase so these might not be the best changes to achieve the desired affect. I'm also not entirely sure everyone will agree that a tab should be used here so I'm submitting this first for feedback before adding/fixing the tests.