diff options
author | Andi-Bogdan Postelnicu <andi@mozilla.com> | 2017-03-10 15:10:37 +0000 |
---|---|---|
committer | Andi-Bogdan Postelnicu <andi@mozilla.com> | 2017-03-10 15:10:37 +0000 |
commit | c658c8caa228ebed6629ee2364f5c88c2234cbf8 (patch) | |
tree | b464d2f3c5265c97e33e2ab19d3595cc3dc92906 /lib/Format/Format.cpp | |
parent | a024a336fe8a86be1630ec37a10dfaaf3b04a32e (diff) | |
download | clang-c658c8caa228ebed6629ee2364f5c88c2234cbf8.tar.gz |
[clang-format] Add option to break before inheritance separation operator in class declaration.
Differential Revision: https://reviews.llvm.org/D30487
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 7431feb8f5..07624620d0 100644 --- a/lib/Format/Format.cpp +++ b/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; |