HomePhabricator

[clang-format] Rework Whitesmiths mode to use line-level values in…

Authored by timwoj on Mar 5 2021, 12:30 PM.

Description

[clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

This commit removes the old way of handling Whitesmiths mode in favor of just setting the
levels during parsing and letting the formatter handle it from there. It requires a bit of
special-casing during the parsing, but ends up a bit cleaner than before. It also removes
some of switch/case unit tests that don't really make much sense when dealing with
Whitesmiths.

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