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

Björn Schäpers via All-commits all-commits at lists.llvm.org
Mon Jan 3 14:07:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f014ab933f35805159021d2d0c856a3c9af21a85
      https://github.com/llvm/llvm-project/commit/f014ab933f35805159021d2d0c856a3c9af21a85
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-01-03 (Mon, 03 Jan 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


  Commit: d48d1f8ee84577a1ca38d4fe03956ee27884e399
      https://github.com/llvm/llvm-project/commit/d48d1f8ee84577a1ca38d4fe03956ee27884e399
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-01-03 (Mon, 03 Jan 2022)

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

  Log Message:
  -----------
  [clang-format][NFC] Merge another two calls to isOneOf

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


  Commit: 1188f241acb78dacef00b7b6b3ec0b04cb43c786
      https://github.com/llvm/llvm-project/commit/1188f241acb78dacef00b7b6b3ec0b04cb43c786
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2022-01-03 (Mon, 03 Jan 2022)

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

  Log Message:
  -----------
  Revert "[clang-format][NFC] Prefer pass by reference"

This reverts commit 25f637913fe31b6d23e78ff07c725bb537dd3b97.

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


Compare: https://github.com/llvm/llvm-project/compare/c40049d6d7f1...1188f241acb7


More information about the All-commits mailing list