2016-11-16 04:21:30 +08:00
|
|
|
BasedOnStyle: LLVM
|
2016-11-23 09:18:56 +08:00
|
|
|
|
2022-06-15 02:09:03 +08:00
|
|
|
AlignAfterOpenBracket: Align
|
|
|
|
AlignConsecutiveAssignments: Consecutive
|
|
|
|
AlignConsecutiveBitFields: Consecutive
|
|
|
|
AlignEscapedNewlines: Right
|
|
|
|
AlignOperands: AlignAfterOperator
|
|
|
|
AlignTrailingComments: true
|
|
|
|
AllowAllArgumentsOnNextLine: true
|
|
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
|
|
AllowShortFunctionsOnASingleLine: true
|
|
|
|
AllowShortLambdasOnASingleLine: All
|
|
|
|
AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
|
|
|
|
'_LIBCPP_CONSTEXPR',
|
|
|
|
'_LIBCPP_CONSTEXPR_AFTER_CXX11',
|
|
|
|
'_LIBCPP_CONSTEXPR_AFTER_CXX14',
|
|
|
|
'_LIBCPP_CONSTEXPR_AFTER_CXX17',
|
|
|
|
'_LIBCPP_CONSTEXPR_AFTER_CXX20',
|
|
|
|
'_LIBCPP_ALIGNOF',
|
|
|
|
'_ALIGNAS_TYPE',
|
|
|
|
'_ALIGNAS',
|
|
|
|
'_LIBCPP_NORETURN',
|
|
|
|
'_LIBCPP_ALWAYS_INLINE',
|
|
|
|
'_LIBCPP_DISABLE_EXTENTSION_WARNING',
|
|
|
|
'_LIBCPP_HIDDEN',
|
|
|
|
'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
|
|
|
|
'_LIBCPP_FUNC_VIS',
|
|
|
|
'_LIBCPP_TYPE_VIS',
|
|
|
|
'_LIBCPP_TEMPLATE_VIS',
|
|
|
|
'_LIBCPP_TEMPLATE_DATA_VIS',
|
|
|
|
'_LIBCPP_EXPORTED_FROM_ABI',
|
|
|
|
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
|
|
|
|
'_LIBCPP_EXCEPTION_ABI',
|
|
|
|
'_LIBCPP_ENUM_VIS',
|
|
|
|
'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
|
|
|
|
'_LIBCPP_INTERNAL_LINKAGE',
|
|
|
|
'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
|
|
|
|
'_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
|
|
|
|
'_LIBCPP_INLINE_VISIBILITY',
|
|
|
|
'_LIBCPP_CONSTEVAL',
|
|
|
|
'_LIBCPP_NOALIAS',
|
|
|
|
'_LIBCPP_USING_IF_EXISTS',
|
|
|
|
'_LIBCPP_DEPRECATED',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX11',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX14',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX17',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX20',
|
|
|
|
'_LIBCPP_NODISCARD',
|
|
|
|
'_LIBCPP_NODISCARD_EXT',
|
|
|
|
'_LIBCPP_NO_DESTROY',
|
|
|
|
'_LIBCPP_WEAK',
|
|
|
|
'_LIBCPP_CONSTINIT',
|
|
|
|
'_LIBCPP_FALLTHROUGH',
|
|
|
|
'_LIBCPP_STANDALONE_DEBUG',
|
|
|
|
'_LIBCPP_NO_UNIQUE_ADDRESS',
|
|
|
|
]
|
|
|
|
BinPackArguments: false
|
|
|
|
BinPackParameters: false
|
|
|
|
BreakBeforeConceptDeclarations: true
|
|
|
|
BreakInheritanceList: BeforeColon
|
|
|
|
EmptyLineAfterAccessModifier: Never
|
|
|
|
EmptyLineBeforeAccessModifier: Always
|
|
|
|
IndentWrappedFunctionNames: false
|
|
|
|
IndentRequires: true
|
|
|
|
InsertTrailingCommas: Wrapped
|
|
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
|
|
MaxEmptyLinesToKeep: 1
|
|
|
|
PackConstructorInitializers: NextLine
|
|
|
|
|
2022-07-28 16:32:02 +08:00
|
|
|
PenaltyIndentedWhitespace: 2
|
2022-06-15 02:09:03 +08:00
|
|
|
|
2016-11-23 09:18:56 +08:00
|
|
|
Language: Cpp
|
2021-10-28 23:48:27 +08:00
|
|
|
Standard: c++20
|
|
|
|
SpacesInAngles: Leave
|
2016-11-23 09:18:56 +08:00
|
|
|
|
|
|
|
AlwaysBreakTemplateDeclarations: true
|
2017-01-03 12:23:52 +08:00
|
|
|
PointerAlignment: Left
|
2016-12-09 11:17:25 +08:00
|
|
|
|
[libc++][NFC] clang-format <__config>
It's not perfect, but it's a lot better than the status quo.
Reviewed By: ldionne, #libc
Spies: EricWF, aheejin, libcxx-commits, dschuff, krytarowski, fedor.sergeev, mstorsjo, phosek, abrachet
Differential Revision: https://reviews.llvm.org/D127644
2022-06-13 23:25:23 +08:00
|
|
|
|
2016-12-09 11:17:25 +08:00
|
|
|
# Disable formatting options which may break tests.
|
|
|
|
SortIncludes: false
|
2016-12-09 11:18:45 +08:00
|
|
|
ReflowComments: false
|
2021-04-01 06:46:28 +08:00
|
|
|
|
2021-09-16 00:29:22 +08:00
|
|
|
# libc++'s preferred indentions of preprocessor statements.
|
|
|
|
IndentPPDirectives: AfterHash
|
|
|
|
|
2021-04-01 06:46:28 +08:00
|
|
|
# libc++ has some long names so we need more than the 80 column limit imposed by LLVM style, for sensible formatting
|
|
|
|
ColumnLimit: 120
|