summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorAndi-Bogdan Postelnicu <andi@mozilla.com>2017-03-10 15:10:37 +0000
committerAndi-Bogdan Postelnicu <andi@mozilla.com>2017-03-10 15:10:37 +0000
commit0ef8ee19f8fe2bd295a0980e3265f032cfead5fd (patch)
treecb3c17b12f33ff8e94d85bbd940d03ced2bb46cf /clang/lib/Format/Format.cpp
parent3e618c33fe991d6e848d928e932fda55c7f65500 (diff)
downloadbcm5719-llvm-0ef8ee19f8fe2bd295a0980e3265f032cfead5fd.tar.gz
bcm5719-llvm-0ef8ee19f8fe2bd295a0980e3265f032cfead5fd.zip
[clang-format] Add option to break before inheritance separation operator in class declaration.
Differential Revision: https://reviews.llvm.org/D30487 llvm-svn: 297467
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 7431feb8f59..07624620d01 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -298,6 +298,8 @@ template <> struct MappingTraits<FormatStyle> {
IO.mapOptional("BreakStringLiterals", Style.BreakStringLiterals);
IO.mapOptional("ColumnLimit", Style.ColumnLimit);
IO.mapOptional("CommentPragmas", Style.CommentPragmas);
+ IO.mapOptional("BreakBeforeInheritanceComma",
+ Style.BreakBeforeInheritanceComma);
IO.mapOptional("ConstructorInitializerAllOnOneLineOrOnePerLine",
Style.ConstructorInitializerAllOnOneLineOrOnePerLine);
IO.mapOptional("ConstructorInitializerIndentWidth",
@@ -521,6 +523,7 @@ FormatStyle getLLVMStyle() {
false, false, false, false, false};
LLVMStyle.BreakAfterJavaFieldAnnotations = false;
LLVMStyle.BreakConstructorInitializersBeforeComma = false;
+ LLVMStyle.BreakBeforeInheritanceComma = false;
LLVMStyle.BreakStringLiterals = true;
LLVMStyle.ColumnLimit = 80;
LLVMStyle.CommentPragmas = "^ IWYU pragma:";
@@ -674,6 +677,7 @@ FormatStyle getMozillaStyle() {
MozillaStyle.BinPackArguments = false;
MozillaStyle.BreakBeforeBraces = FormatStyle::BS_Mozilla;
MozillaStyle.BreakConstructorInitializersBeforeComma = true;
+ MozillaStyle.BreakBeforeInheritanceComma = true;
MozillaStyle.ConstructorInitializerIndentWidth = 2;
MozillaStyle.ContinuationIndentWidth = 2;
MozillaStyle.Cpp11BracedListStyle = false;
OpenPOWER on IntegriCloud