[PATCH] D43183: clang-format: introduce `CaseBlockIndent` to control indent in switch
Francois Ferrand via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 15 06:53:38 PST 2018
Typz added a comment.
In https://reviews.llvm.org/D43183#1008632, @djasper wrote:
> Yes, that's what I mean. What do you mean, the style is too error prone?
When `IndentCaseLabels` is false, the code gets formatted in a way that "hides" the structure of the code, by indenting the end of the case in the exact same way as the end of a switch, which is error prone IMHO.
Indentation should "highlight" the structure of the code, to make it easier to understand, and thus avoid this kind of confusion.
Repository:
rC Clang
https://reviews.llvm.org/D43183
More information about the cfe-commits
mailing list