]> granicus.if.org Git - clang/commit
[clang-format] SpacesInSquareBrackets should affect lambdas with parameters too
authorPaul Hoad <mydeveloperday@gmail.com>
Sat, 5 Oct 2019 09:55:23 +0000 (09:55 +0000)
committerPaul Hoad <mydeveloperday@gmail.com>
Sat, 5 Oct 2019 09:55:23 +0000 (09:55 +0000)
commitf39ad0d7e84a97caabb7279725cc437b12b50a2b
tree7ea3e3121b996b56571040a5335a3ded71fb5dea
parent8a09348e37197a45c00334d48ab26d5f3430a068
[clang-format] SpacesInSquareBrackets should affect lambdas with parameters too

Summary:
This patch makes the `SpacesInSquareBrackets` setting also apply to C++ lambdas with parameters.

Looking through the revision history, it appears support for only array brackets was added, and lambda brackets were ignored. Therefore, I am inclined to think it was simply an omission, rather than a deliberate choice.

See https://bugs.llvm.org/show_bug.cgi?id=17887 and https://reviews.llvm.org/D4944.

Reviewers: MyDeveloperDay, reuk, owenpan

Reviewed By: MyDeveloperDay

Subscribers: cfe-commits

Patch by: mitchell-stellar

Tags: #clang-format, #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373821 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ClangFormatStyleOptions.rst
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTest.cpp