From d6a1cab1bcf509645b5119d92e95bbd7ab5131a3 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Mon, 12 Jan 2015 10:23:24 +0000 Subject: clang-format: Improve format of lambdas in ctor initializers. Before: Constructor() : Constructor([] { // comment int i; }) {} After: Constructor() : Constructor([] { // comment int i; }) {} llvm-svn: 225625 --- clang/lib/Format/ContinuationIndenter.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Format') diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index f05471e712d..4cc92b02a9e 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -632,6 +632,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, // ^ line up here. State.Stack.back().Indent = State.Column + (Style.BreakConstructorInitializersBeforeComma ? 0 : 2); + State.Stack.back().NestedBlockIndent = State.Stack.back().Indent; if (Style.ConstructorInitializerAllOnOneLineOrOnePerLine) State.Stack.back().AvoidBinPacking = true; State.Stack.back().BreakBeforeParameter = false; -- cgit v1.2.3