[all-commits] [llvm/llvm-project] 25f637: [clang-format][NFC] Prefer pass by reference

Björn Schäpers via All-commits all-commits at lists.llvm.org
Sat Dec 4 12:30:16 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25f637913fe31b6d23e78ff07c725bb537dd3b97
      https://github.com/llvm/llvm-project/commit/25f637913fe31b6d23e78ff07c725bb537dd3b97
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

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

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


  Commit: e7fdeda2c9dbe545445335f060eb450d15577aec
      https://github.com/llvm/llvm-project/commit/e7fdeda2c9dbe545445335f060eb450d15577aec
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Rename variable so no shadowing happens

In the loop there is also a Node.

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


  Commit: 5878ac7d2db692779c0d049a13cb29ed19d51ca9
      https://github.com/llvm/llvm-project/commit/5878ac7d2db692779c0d049a13cb29ed19d51ca9
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

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

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


  Commit: 4483e9b5279bc71c9da7bbb0e1524c3671493ab6
      https://github.com/llvm/llvm-project/commit/4483e9b5279bc71c9da7bbb0e1524c3671493ab6
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Reorder conditions

Prefer to check the local variables first before dereferencing the
pointer.

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


  Commit: c25536e4feed59f8a8685fac3ba225057b76a358
      https://github.com/llvm/llvm-project/commit/c25536e4feed59f8a8685fac3ba225057b76a358
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Use range based for

That's much easier to read.

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


  Commit: 8d1c85454daa40bd663d0ef4e8262fe6fc0f21ad
      https://github.com/llvm/llvm-project/commit/8d1c85454daa40bd663d0ef4e8262fe6fc0f21ad
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Move static variable in scope

Let only the JS/TS users pay for the initialistation.

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


  Commit: 4041f16bb489d6cbdebfed33a2c5cc586cb3839b
      https://github.com/llvm/llvm-project/commit/4041f16bb489d6cbdebfed33a2c5cc586cb3839b
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Early return when nothing to do

Do not compute SkipFirstExtraIndent just to see that there are no fake l
parens.

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


  Commit: 88fa4bfe1ec25e0ae74566bfc2ba213f2f96b44c
      https://github.com/llvm/llvm-project/commit/88fa4bfe1ec25e0ae74566bfc2ba213f2f96b44c
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Use range based for for fake l parens

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


  Commit: 6e8678903523019903222e4521a5e41af743cab0
      https://github.com/llvm/llvm-project/commit/6e8678903523019903222e4521a5e41af743cab0
  Author: Björn Schäpers <bjoern at hazardy.de>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

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

  Log Message:
  -----------
  [clang-format][NFC] Use member directly

Instead of passing it as argument to the member function.

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


Compare: https://github.com/llvm/llvm-project/compare/e94134052fda...6e8678903523


More information about the All-commits mailing list