clang-format: Make continuation indent width configurable.
Patch by Kim Gräsman. Thank you!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192964 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index ff85767..3496712 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -163,6 +163,7 @@
Style.SpaceAfterControlStatementKeyword);
IO.mapOptional("SpaceBeforeAssignmentOperators",
Style.SpaceBeforeAssignmentOperators);
+ IO.mapOptional("ContinuationIndentWidth", Style.ContinuationIndentWidth);
}
};
}
@@ -214,6 +215,7 @@
LLVMStyle.SpacesInCStyleCastParentheses = false;
LLVMStyle.SpaceAfterControlStatementKeyword = true;
LLVMStyle.SpaceBeforeAssignmentOperators = true;
+ LLVMStyle.ContinuationIndentWidth = 4;
setDefaultPenalties(LLVMStyle);
LLVMStyle.PenaltyReturnTypeOnItsOwnLine = 60;
@@ -257,6 +259,7 @@
GoogleStyle.SpacesInCStyleCastParentheses = false;
GoogleStyle.SpaceAfterControlStatementKeyword = true;
GoogleStyle.SpaceBeforeAssignmentOperators = true;
+ GoogleStyle.ContinuationIndentWidth = 4;
setDefaultPenalties(GoogleStyle);
GoogleStyle.PenaltyReturnTypeOnItsOwnLine = 200;