Skip to content

Commit

Permalink
[clang-format] Don't wrap braces before lambdas.
Browse files Browse the repository at this point in the history
We used Allman-style brace formatting in clang-format 10. clang-format 12
incorporates a new behavior in the Allman style, which wraps the braces before
the lambdas, thus generating deeply indented lambda functions. We removed the
Allman style and set some options to their right values to mimic the behavior
we had in clang-format 10.
  • Loading branch information
luis4a0 committed Aug 26, 2021
1 parent 345d81c commit 943b4d6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ BasedOnStyle: LLVM
---
Language: Cpp
IndentWidth: 4
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
AccessModifierOffset: -4
Cpp11BracedListStyle: true
Standard: Cpp11
Expand Down

0 comments on commit 943b4d6

Please sign in to comment.