[all-commits] [llvm/llvm-project] 3d0b61: [clang-format][NFC] Code Tidies in UnwrappedLineFo...

Björn Schäpers via All-commits all-commits at lists.llvm.org
Thu Feb 3 13:56:05 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d0b619261392f5f24a7b9961b24cdd621829c13
      https://github.com/llvm/llvm-project/commit/3d0b619261392f5f24a7b9961b24cdd621829c13
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-02-03 (Thu, 03 Feb 2022)

  Changed paths:
    M clang/lib/Format/UnwrappedLineFormatter.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list