[clang-format][NFC] Code Tidies in UnwrappedLineFormatter
authorBjörn Schäpers <bjoern@hazardy.de>
Fri, 3 Dec 2021 07:13:57 +0000 (08:13 +0100)
committerBjörn Schäpers <bjoern@hazardy.de>
Mon, 3 Jan 2022 22:06:55 +0000 (23:06 +0100)
commitf014ab933f35805159021d2d0c856a3c9af21a85
tree9539098e9ee9b2d702d6bcc12c60d84516938b62
parentc40049d6d7f18c3703b038e1e2517c9a551c1678
[clang-format][NFC] Code Tidies in UnwrappedLineFormatter

* Give I[1] and I[-1] a name:
  - Easier to understand
  - Easier to debug (since you don't go through operator[] everytime)
* TheLine->First != TheLine->Last follows since last is a l brace and
  first isn't.
* Factor the check for is(tok::l_brace) out.
* Drop else after return.

Differential Revision: https://reviews.llvm.org/D115060
clang/lib/Format/UnwrappedLineFormatter.cpp