.clang-format 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. ---
  2. Language: Cpp
  3. BasedOnStyle: LLVM
  4. AlignAfterOpenBracket: true
  5. AccessModifierOffset: -2
  6. AlignArrayOfStructures: None
  7. AlignConsecutiveAssignments:
  8. Enabled: false
  9. AcrossEmptyLines: false
  10. AcrossComments: false
  11. AlignCompound: false
  12. AlignFunctionDeclarations: false
  13. AlignFunctionPointers: false
  14. PadOperators: true
  15. AlignConsecutiveBitFields:
  16. Enabled: false
  17. AcrossEmptyLines: false
  18. AcrossComments: false
  19. AlignCompound: false
  20. AlignFunctionDeclarations: false
  21. AlignFunctionPointers: false
  22. PadOperators: false
  23. AlignConsecutiveDeclarations:
  24. Enabled: false
  25. AcrossEmptyLines: false
  26. AcrossComments: false
  27. AlignCompound: false
  28. AlignFunctionDeclarations: true
  29. AlignFunctionPointers: false
  30. PadOperators: false
  31. AlignConsecutiveMacros:
  32. Enabled: false
  33. AcrossEmptyLines: false
  34. AcrossComments: false
  35. AlignCompound: false
  36. AlignFunctionDeclarations: false
  37. AlignFunctionPointers: false
  38. PadOperators: false
  39. AlignConsecutiveShortCaseStatements:
  40. Enabled: false
  41. AcrossEmptyLines: false
  42. AcrossComments: false
  43. AlignCaseArrows: false
  44. AlignCaseColons: false
  45. AlignConsecutiveTableGenBreakingDAGArgColons:
  46. Enabled: false
  47. AcrossEmptyLines: false
  48. AcrossComments: false
  49. AlignCompound: false
  50. AlignFunctionDeclarations: false
  51. AlignFunctionPointers: false
  52. PadOperators: false
  53. AlignConsecutiveTableGenCondOperatorColons:
  54. Enabled: false
  55. AcrossEmptyLines: false
  56. AcrossComments: false
  57. AlignCompound: false
  58. AlignFunctionDeclarations: false
  59. AlignFunctionPointers: false
  60. PadOperators: false
  61. AlignConsecutiveTableGenDefinitionColons:
  62. Enabled: false
  63. AcrossEmptyLines: false
  64. AcrossComments: false
  65. AlignCompound: false
  66. AlignFunctionDeclarations: false
  67. AlignFunctionPointers: false
  68. PadOperators: false
  69. AlignEscapedNewlines: Right
  70. AlignOperands: Align
  71. AlignTrailingComments:
  72. AlignPPAndNotPP: true
  73. Kind: Always
  74. OverEmptyLines: 0
  75. AllowAllArgumentsOnNextLine: true
  76. AllowAllParametersOfDeclarationOnNextLine: true
  77. AllowBreakBeforeNoexceptSpecifier: Never
  78. AllowBreakBeforeQtProperty: false
  79. AllowShortBlocksOnASingleLine: Never
  80. AllowShortCaseExpressionOnASingleLine: true
  81. AllowShortCaseLabelsOnASingleLine: false
  82. AllowShortCompoundRequirementOnASingleLine: true
  83. AllowShortEnumsOnASingleLine: true
  84. AllowShortFunctionsOnASingleLine: All
  85. AllowShortIfStatementsOnASingleLine: Never
  86. AllowShortLambdasOnASingleLine: All
  87. AllowShortLoopsOnASingleLine: false
  88. AllowShortNamespacesOnASingleLine: false
  89. AlwaysBreakAfterDefinitionReturnType: None
  90. AlwaysBreakBeforeMultilineStrings: false
  91. AttributeMacros:
  92. - __capability
  93. BinPackArguments: true
  94. BinPackLongBracedList: true
  95. BinPackParameters: BinPack
  96. BitFieldColonSpacing: Both
  97. BracedInitializerIndentWidth: -1
  98. BraceWrapping:
  99. AfterCaseLabel: false
  100. AfterClass: false
  101. AfterControlStatement: Never
  102. AfterEnum: false
  103. AfterExternBlock: false
  104. AfterFunction: false
  105. AfterNamespace: false
  106. AfterObjCDeclaration: false
  107. AfterStruct: false
  108. AfterUnion: false
  109. BeforeCatch: false
  110. BeforeElse: false
  111. BeforeLambdaBody: false
  112. BeforeWhile: false
  113. IndentBraces: false
  114. SplitEmptyFunction: true
  115. SplitEmptyRecord: true
  116. SplitEmptyNamespace: true
  117. BreakAdjacentStringLiterals: true
  118. BreakAfterAttributes: Leave
  119. BreakAfterJavaFieldAnnotations: false
  120. BreakAfterOpenBracketBracedList: false
  121. BreakAfterOpenBracketFunction: false
  122. BreakAfterOpenBracketIf: false
  123. BreakAfterOpenBracketLoop: false
  124. BreakAfterOpenBracketSwitch: false
  125. BreakAfterReturnType: None
  126. BreakArrays: true
  127. BreakBeforeBinaryOperators: None
  128. BreakBeforeCloseBracketBracedList: false
  129. BreakBeforeCloseBracketFunction: false
  130. BreakBeforeCloseBracketIf: false
  131. BreakBeforeCloseBracketLoop: false
  132. BreakBeforeCloseBracketSwitch: false
  133. BreakBeforeConceptDeclarations: Always
  134. BreakBeforeBraces: Attach
  135. BreakBeforeInlineASMColon: OnlyMultiline
  136. BreakBeforeTemplateCloser: false
  137. BreakBeforeTernaryOperators: true
  138. BreakBinaryOperations: Never
  139. BreakConstructorInitializers: BeforeColon
  140. BreakFunctionDefinitionParameters: false
  141. BreakInheritanceList: BeforeColon
  142. BreakStringLiterals: true
  143. BreakTemplateDeclarations: MultiLine
  144. ColumnLimit: 0
  145. CommentPragmas: '^ IWYU pragma:'
  146. CompactNamespaces: false
  147. ConstructorInitializerIndentWidth: 4
  148. ContinuationIndentWidth: 4
  149. Cpp11BracedListStyle: AlignFirstComment
  150. DerivePointerAlignment: false
  151. DisableFormat: false
  152. EmptyLineAfterAccessModifier: Never
  153. EmptyLineBeforeAccessModifier: LogicalBlock
  154. EnumTrailingComma: Leave
  155. ExperimentalAutoDetectBinPacking: false
  156. FixNamespaceComments: true
  157. ForEachMacros:
  158. - foreach
  159. - Q_FOREACH
  160. - BOOST_FOREACH
  161. IfMacros:
  162. - KJ_IF_MAYBE
  163. IncludeBlocks: Preserve
  164. IncludeCategories:
  165. - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
  166. Priority: 2
  167. SortPriority: 0
  168. CaseSensitive: false
  169. - Regex: '^(<|"(gtest|gmock|isl|json)/)'
  170. Priority: 3
  171. SortPriority: 0
  172. CaseSensitive: false
  173. - Regex: '.*'
  174. Priority: 1
  175. SortPriority: 0
  176. CaseSensitive: false
  177. IncludeIsMainRegex: '(Test)?$'
  178. IncludeIsMainSourceRegex: ''
  179. IndentAccessModifiers: false
  180. IndentCaseBlocks: false
  181. IndentCaseLabels: false
  182. IndentExportBlock: true
  183. IndentExternBlock: AfterExternBlock
  184. IndentGotoLabels: true
  185. IndentPPDirectives: None
  186. IndentRequiresClause: true
  187. IndentWidth: 2
  188. IndentWrappedFunctionNames: false
  189. InsertBraces: false
  190. InsertNewlineAtEOF: false
  191. InsertTrailingCommas: None
  192. IntegerLiteralSeparator:
  193. Binary: 0
  194. BinaryMinDigitsInsert: 0
  195. BinaryMaxDigitsRemove: 0
  196. Decimal: 0
  197. DecimalMinDigitsInsert: 0
  198. DecimalMaxDigitsRemove: 0
  199. Hex: 0
  200. HexMinDigitsInsert: 0
  201. HexMaxDigitsRemove: 0
  202. BinaryMinDigits: 0
  203. DecimalMinDigits: 0
  204. HexMinDigits: 0
  205. JavaScriptQuotes: Leave
  206. JavaScriptWrapImports: true
  207. KeepEmptyLines:
  208. AtEndOfFile: false
  209. AtStartOfBlock: true
  210. AtStartOfFile: true
  211. KeepFormFeed: false
  212. LambdaBodyIndentation: Signature
  213. LineEnding: DeriveLF
  214. MacroBlockBegin: ''
  215. MacroBlockEnd: ''
  216. MainIncludeChar: Quote
  217. MaxEmptyLinesToKeep: 1
  218. NamespaceIndentation: None
  219. NumericLiteralCase:
  220. ExponentLetter: Leave
  221. HexDigit: Leave
  222. Prefix: Leave
  223. Suffix: Leave
  224. ObjCBinPackProtocolList: Auto
  225. ObjCBlockIndentWidth: 2
  226. ObjCBreakBeforeNestedBlockParam: true
  227. ObjCSpaceAfterProperty: false
  228. ObjCSpaceBeforeProtocolList: true
  229. OneLineFormatOffRegex: ''
  230. PackConstructorInitializers: BinPack
  231. PenaltyBreakAssignment: 2
  232. PenaltyBreakBeforeFirstCallParameter: 19
  233. PenaltyBreakBeforeMemberAccess: 150
  234. PenaltyBreakComment: 300
  235. PenaltyBreakFirstLessLess: 120
  236. PenaltyBreakOpenParenthesis: 0
  237. PenaltyBreakScopeResolution: 500
  238. PenaltyBreakString: 1000
  239. PenaltyBreakTemplateDeclaration: 10
  240. PenaltyExcessCharacter: 0
  241. PenaltyIndentedWhitespace: 0
  242. PenaltyReturnTypeOnItsOwnLine: 60
  243. PointerAlignment: Right
  244. PPIndentWidth: -1
  245. QualifierAlignment: Leave
  246. ReferenceAlignment: Pointer
  247. ReflowComments: Always
  248. RemoveBracesLLVM: false
  249. RemoveEmptyLinesInUnwrappedLines: false
  250. RemoveParentheses: Leave
  251. RemoveSemicolon: false
  252. RequiresClausePosition: OwnLine
  253. RequiresExpressionIndentation: OuterScope
  254. SeparateDefinitionBlocks: Leave
  255. ShortNamespaceLines: 1
  256. SkipMacroDefinitionBody: false
  257. SortIncludes:
  258. Enabled: true
  259. IgnoreCase: false
  260. IgnoreExtension: false
  261. SortJavaStaticImport: Before
  262. SortUsingDeclarations: LexicographicNumeric
  263. SpaceAfterCStyleCast: false
  264. SpaceAfterLogicalNot: false
  265. SpaceAfterOperatorKeyword: false
  266. SpaceAfterTemplateKeyword: true
  267. SpaceAroundPointerQualifiers: Default
  268. SpaceBeforeAssignmentOperators: true
  269. SpaceBeforeCaseColon: false
  270. SpaceBeforeCpp11BracedList: false
  271. SpaceBeforeCtorInitializerColon: true
  272. SpaceBeforeInheritanceColon: true
  273. SpaceBeforeJsonColon: false
  274. SpaceBeforeParens: ControlStatements
  275. SpaceBeforeParensOptions:
  276. AfterControlStatements: true
  277. AfterForeachMacros: true
  278. AfterFunctionDefinitionName: false
  279. AfterFunctionDeclarationName: false
  280. AfterIfMacros: true
  281. AfterNot: false
  282. AfterOverloadedOperator: false
  283. AfterPlacementOperator: true
  284. AfterRequiresInClause: false
  285. AfterRequiresInExpression: false
  286. BeforeNonEmptyParentheses: false
  287. SpaceBeforeRangeBasedForLoopColon: true
  288. SpaceBeforeSquareBrackets: false
  289. SpaceInEmptyBraces: Never
  290. SpacesBeforeTrailingComments: 1
  291. SpacesInAngles: Never
  292. SpacesInContainerLiterals: true
  293. SpacesInLineCommentPrefix:
  294. Minimum: 1
  295. Maximum: -1
  296. SpacesInParens: Never
  297. SpacesInParensOptions:
  298. ExceptDoubleParentheses: false
  299. InCStyleCasts: false
  300. InConditionalStatements: false
  301. InEmptyParentheses: false
  302. Other: false
  303. SpacesInSquareBrackets: false
  304. Standard: Latest
  305. StatementAttributeLikeMacros:
  306. - Q_EMIT
  307. StatementMacros:
  308. - Q_UNUSED
  309. - QT_REQUIRE_VERSION
  310. TableGenBreakInsideDAGArg: DontBreak
  311. TabWidth: 8
  312. UseTab: Never
  313. VerilogBreakBetweenInstancePorts: true
  314. WhitespaceSensitiveMacros:
  315. - BOOST_PP_STRINGIZE
  316. - CF_SWIFT_NAME
  317. - NS_SWIFT_NAME
  318. - PP_STRINGIZE
  319. - STRINGIZE
  320. WrapNamespaceBodyWithEmptyLines: Leave
  321. ...