diff --git a/Software/Applications/Clang/Clang_Format_自定义风格.md b/Software/Applications/Clang/Clang_Format_自定义风格.md index 0187c06..fa62411 100644 --- a/Software/Applications/Clang/Clang_Format_自定义风格.md +++ b/Software/Applications/Clang/Clang_Format_自定义风格.md @@ -410,6 +410,45 @@ TabWidth: 4 UseTab: Never ``` +```yml +--- +# 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto +Language: Cpp +BasedOnStyle: LLVM +AccessModifierOffset: '-4' +AlignAfterOpenBracket: Align +AlignEscapedNewlines: Left +AllowShortFunctionsOnASingleLine: Inline +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +BreakConstructorInitializers: BeforeComma +ColumnLimit: '100' +ConstructorInitializerIndentWidth: '4' +ContinuationIndentWidth: '4' +ForEachMacros: 'foreach,Q_FOREACH,BOOST_FOREACH' +IndentPPDirectives: AfterHash +IndentWidth: '4' +MaxEmptyLinesToKeep: '10' +ObjCBlockIndentWidth: '4' +PenaltyBreakBeforeFirstCallParameter: '2' +PenaltyBreakComment: '300' +PenaltyBreakFirstLessLess: '120' +PenaltyBreakString: '1000' +PenaltyExcessCharacter: '1000000' +PenaltyReturnTypeOnItsOwnLine: '120' +PointerAlignment: Left +SpaceBeforeParens: ControlStatements +SpacesBeforeTrailingComments: '3' +Standard: Cpp11 +TabWidth: '4' +UseTab: ForIndentation + +... + +``` + ## 外部参考资料 1. [Clang 18.0.0git documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html)