[all-commits] [llvm/llvm-project] 8d7bd5: [clang-format] Fix SpacesInSquareBrackets for Lamb...

mitchell-stellar via All-commits all-commits at lists.llvm.org
Thu Oct 31 08:10:34 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d7bd57526486cab9e3daba9934042c405d7946b
      https://github.com/llvm/llvm-project/commit/8d7bd57526486cab9e3daba9934042c405d7946b
  Author: Mitchell Balan <mitchell at stellarscience.com>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

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

  Log Message:
  -----------
  [clang-format] Fix SpacesInSquareBrackets for Lambdas with Initial "&ref" Parameter

Summary:
This fixes an edge case in the `SpacesInSquareBrackets` option where an initial `&ref` lambda parameter is not padded with an initial space.

`int foo = [&bar ]() {}` is fixed to give `int foo = [ &bar ]() {}`

Reviewers: MyDeveloperDay, klimek, sammccall

Reviewed by: MyDeveloperDay

Subscribers: cfe-commits

Tags: #clang, #clang-format

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




More information about the All-commits mailing list