diff options
author | Daniel Jasper <djasper@google.com> | 2013-10-29 14:52:02 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-10-29 14:52:02 +0000 |
commit | dd978ae0e118ebd99d18df518cf8d03ea115af07 (patch) | |
tree | 7bbb6b836d37e8325a015cb0579ec94df4792bae /clang/lib/Format/Format.cpp | |
parent | f34ac3ed2c9badee39b3efc72d4c34f922cf3b39 (diff) | |
download | bcm5719-llvm-dd978ae0e118ebd99d18df518cf8d03ea115af07.tar.gz bcm5719-llvm-dd978ae0e118ebd99d18df518cf8d03ea115af07.zip |
clang-format: Option to control spacing in template argument lists.
Same as SpacesInParentheses, this option allows adding a space inside
the '<' and '>' of a template parameter list.
Patch by Christopher Olsen.
This fixes llvm.org/PR17301.
llvm-svn: 193614
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 54d0b1f5e2a..c75684b3b5a 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -158,6 +158,7 @@ template <> struct MappingTraits<clang::format::FormatStyle> { IO.mapOptional("IndentFunctionDeclarationAfterType", Style.IndentFunctionDeclarationAfterType); IO.mapOptional("SpacesInParentheses", Style.SpacesInParentheses); + IO.mapOptional("SpacesInAngles", Style.SpacesInAngles); IO.mapOptional("SpaceInEmptyParentheses", Style.SpaceInEmptyParentheses); IO.mapOptional("SpacesInCStyleCastParentheses", Style.SpacesInCStyleCastParentheses); @@ -218,6 +219,7 @@ FormatStyle getLLVMStyle() { LLVMStyle.SpaceAfterControlStatementKeyword = true; LLVMStyle.SpaceBeforeAssignmentOperators = true; LLVMStyle.ContinuationIndentWidth = 4; + LLVMStyle.SpacesInAngles = false; setDefaultPenalties(LLVMStyle); LLVMStyle.PenaltyReturnTypeOnItsOwnLine = 60; @@ -263,6 +265,7 @@ FormatStyle getGoogleStyle() { GoogleStyle.SpaceAfterControlStatementKeyword = true; GoogleStyle.SpaceBeforeAssignmentOperators = true; GoogleStyle.ContinuationIndentWidth = 4; + GoogleStyle.SpacesInAngles = false; setDefaultPenalties(GoogleStyle); GoogleStyle.PenaltyReturnTypeOnItsOwnLine = 200; |