Page MenuHomePhabricator

[clang-format] SpacesInSquareBrackets should affect lambdas with parameters too
ClosedPublic

Authored by mitchell-stellar on Oct 4 2019, 10:23 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2019, 10:23 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
MyDeveloperDay accepted this revision.Oct 4 2019, 10:33 AM

Thanks for the patch.

LGTM

This revision is now accepted and ready to land.Oct 4 2019, 10:33 AM

Thanks, please commit on my behalf.

MyDeveloperDay added inline comments.Oct 5 2019, 2:55 AM
clang/lib/Format/TokenAnnotator.cpp
2613 ↗(On Diff #223245)

super minor git clang-format change on committing.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2019, 2:56 AM