[clang-format] PR48569 clang-format fails to align case label with `switch`…

Authored by MyDeveloperDay on Dec 26 2020, 7:18 AM.


[clang-format] PR48569 clang-format fails to align case label with switch with Whitesmith Indentation


This is a tentative fix which addresses a PR raise regarding Case indentation when working with Whitesmiths Indentation

I could not find online any reference sources as to what the case indentation for Whitesmith's should be (or be allowed to be)

But according to the documentation, we don't obey the rules for Whitesmith's

In particular, the documentation states that this option is to "indent case labels one level from the switch statement. When false, use the same indentation level as for the switch statement."

The behaviour we add here is actually as the TODO in the tests used to state in D67627: Clang-format: Add Whitesmiths indentation style, but when D82016: [clang-format] [PR462254] fix indentation of default and break correctly in whitesmiths style was added and I brought these tests out from being TODO I realized I changed the indentation.

Reviewed By: curdeius, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D93806