[cfe-users] clang-format bracewrapping

Philipp Kraus via cfe-users cfe-users at lists.llvm.org
Sun Oct 4 10:16:30 PDT 2015


Hello,

I'm new with clang-format and I try under OSX 10.9 with clang-format 
version 3.8.0 (tags/google/testing/2015-07-31) to use the BraceWrapping 
definition on my .clang-format file. My current style definition the 
following structure but I cannot create the correct definition of the 
BraceWrapping item. How can I set this correctly?

Thanks

Phil


--------
Language:                                          Cpp
BasedOnStyle:                                      LLVM
Standard:                                          Cpp11
TabWidth:                                          4
UseTab:                                            Never

#BraceWrapping: custom
#    AfterFunction:                       true
#    IndentBraces:                        true
#    AfterClass:                          true

NamespaceIndentation:                              Inner
AccessModifierOffset:                              -2
AlignAfterOpenBracket:                             true
AlignConsecutiveAssignments:                       false
AlignEscapedNewlinesLeft:                          false
AlignOperands:                                     true
AlignTrailingComments:                             true
AllowAllParametersOfDeclarationOnNextLine:         true
AllowShortBlocksOnASingleLine:                     false
AllowShortCaseLabelsOnASingleLine:                 false
AllowShortFunctionsOnASingleLine:                  None
AllowShortIfStatementsOnASingleLine:               false
AllowShortLoopsOnASingleLine:                      false
AlwaysBreakAfterDefinitionReturnType:              None
AlwaysBreakBeforeMultilineStrings:                 false
AlwaysBreakTemplateDeclarations:                   false
BinPackArguments:                                  true
BinPackParameters:                                 true
BreakBeforeBinaryOperators:                        None
BreakBeforeBraces:                                 Allman
BreakBeforeTernaryOperators:                       true
BreakConstructorInitializersBeforeComma:           false
ColumnLimit:                                       120
CommentPragmas:                                    '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine:    false
ConstructorInitializerIndentWidth:                 4
ContinuationIndentWidth:                           4
Cpp11BracedListStyle:                              true
DerivePointerAlignment:                            false
DisableFormat:                                     false
ExperimentalAutoDetectBinPacking:                  false
ForEachMacros:                                     [ foreach, 
Q_FOREACH, BOOST_FOREACH ]
IndentCaseLabels:                                  true
IndentWidth:                                       2
IndentWrappedFunctionNames:                        false
KeepEmptyLinesAtTheStartOfBlocks:                  true
MacroBlockBegin:                                   ''
MacroBlockEnd:                                     ''
MaxEmptyLinesToKeep:                               1
NamespaceIndentation:                              None
ObjCBlockIndentWidth:                              2
ObjCSpaceAfterProperty:                            false
ObjCSpaceBeforeProtocolList:                       true
PenaltyBreakBeforeFirstCallParameter:              19
PenaltyBreakComment:                               300
PenaltyBreakFirstLessLess:                         120
PenaltyBreakString:                                1000
PenaltyExcessCharacter:                            1000000
PenaltyReturnTypeOnItsOwnLine:                     60
PointerAlignment:                                  Left
SpaceAfterCStyleCast:                              false
SpaceBeforeAssignmentOperators:                    true
SpaceBeforeParens:                                 ControlStatements
SpaceInEmptyParentheses:                           false
SpacesBeforeTrailingComments:                      1
SpacesInAngles:                                    true
SpacesInContainerLiterals:                         true
SpacesInCStyleCastParentheses:                     false
SpacesInParentheses:                               true
SpacesInSquareBrackets:                            false
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20151004/ee199a54/attachment.html>


More information about the cfe-users mailing list