llvm-project
83 строки · 3.1 Кб
1BasedOnStyle: LLVM
2# Note that we don't specify the language in this file because some files are
3# detected as Cpp, but others are detected as ObjC and we want this formatting
4# to apply to all types of files.
5
6AlignAfterOpenBracket: Align
7AlignConsecutiveAssignments: Consecutive
8AlignConsecutiveBitFields: Consecutive
9AlignEscapedNewlines: Right
10AlignOperands: AlignAfterOperator
11AlignTrailingComments: true
12AllowAllArgumentsOnNextLine: true
13AllowAllParametersOfDeclarationOnNextLine: true
14AllowShortFunctionsOnASingleLine: true
15AllowShortLambdasOnASingleLine: All
16AttributeMacros: [
17'_ALIGNAS_TYPE',
18'_ALIGNAS',
19'_LIBCPP_ALIGNOF',
20'_LIBCPP_ALWAYS_INLINE',
21'_LIBCPP_CONSTEXPR_SINCE_CXX14',
22'_LIBCPP_CONSTEXPR_SINCE_CXX17',
23'_LIBCPP_CONSTEXPR_SINCE_CXX20',
24'_LIBCPP_CONSTEXPR_SINCE_CXX23',
25'_LIBCPP_CONSTEXPR',
26'_LIBCPP_CONSTINIT',
27'_LIBCPP_DEPRECATED_ATOMIC_SYNC',
28'_LIBCPP_DEPRECATED_IN_CXX11',
29'_LIBCPP_DEPRECATED_IN_CXX14',
30'_LIBCPP_DEPRECATED_IN_CXX17',
31'_LIBCPP_DEPRECATED_IN_CXX20',
32'_LIBCPP_DEPRECATED_IN_CXX23',
33'_LIBCPP_DEPRECATED',
34'_LIBCPP_DISABLE_EXTENTSION_WARNING',
35'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
36'_LIBCPP_EXPORTED_FROM_ABI',
37'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
38'_LIBCPP_FALLTHROUGH',
39'_LIBCPP_HIDDEN',
40'_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
41'_LIBCPP_HIDE_FROM_ABI',
42'_LIBCPP_INTERNAL_LINKAGE',
43'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
44'_LIBCPP_NO_SANITIZE',
45'_LIBCPP_NO_UNIQUE_ADDRESS',
46'_LIBCPP_NOALIAS',
47'_LIBCPP_NODISCARD',
48'_LIBCPP_NORETURN',
49'_LIBCPP_OVERRIDABLE_FUNC_VIS',
50'_LIBCPP_STANDALONE_DEBUG',
51'_LIBCPP_TEMPLATE_DATA_VIS',
52'_LIBCPP_TEMPLATE_VIS',
53'_LIBCPP_THREAD_SAFETY_ANNOTATION',
54'_LIBCPP_USING_IF_EXISTS',
55'_LIBCPP_WEAK',
56]
57BinPackArguments: false
58BinPackParameters: false
59BreakBeforeConceptDeclarations: true
60BreakInheritanceList: BeforeColon
61EmptyLineAfterAccessModifier: Never
62EmptyLineBeforeAccessModifier: Always
63IndentWrappedFunctionNames: false
64IndentRequires: true
65InsertTrailingCommas: Wrapped
66KeepEmptyLinesAtTheStartOfBlocks: false
67MaxEmptyLinesToKeep: 1
68PackConstructorInitializers: NextLine
69
70PenaltyIndentedWhitespace: 2
71
72Standard: c++20
73SpacesInAngles: Leave
74
75AlwaysBreakTemplateDeclarations: true
76PointerAlignment: Left
77
78
79# libc++'s preferred indentions of preprocessor statements.
80IndentPPDirectives: AfterHash
81
82# libc++ has some long names so we need more than the 80 column limit imposed by LLVM style, for sensible formatting
83ColumnLimit: 120
84