[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>
Thu, 3 Feb 2022 21:55:27 +0000 (22:55 +0100)
commit3d0b619261392f5f24a7b9961b24cdd621829c13
tree5f2347bcd61dd299cf9480417ed7ca6c8edec635
parente017dbab8cc46fbd5e8898ebd603aa80fdd5a5d1
[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