2016-11-15 20:21:30 +00:00
|
|
|
BasedOnStyle: LLVM
|
2023-06-16 14:32:08 -04:00
|
|
|
# Note that we don't specify the language in this file because some files are
|
|
|
|
# detected as Cpp, but others are detected as ObjC and we want this formatting
|
|
|
|
# to apply to all types of files.
|
2016-11-23 01:18:56 +00:00
|
|
|
|
2022-06-14 20:09:03 +02:00
|
|
|
AlignAfterOpenBracket: Align
|
|
|
|
AlignConsecutiveAssignments: Consecutive
|
|
|
|
AlignConsecutiveBitFields: Consecutive
|
|
|
|
AlignEscapedNewlines: Right
|
|
|
|
AlignOperands: AlignAfterOperator
|
|
|
|
AlignTrailingComments: true
|
|
|
|
AllowAllArgumentsOnNextLine: true
|
|
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
|
|
AllowShortFunctionsOnASingleLine: true
|
|
|
|
AllowShortLambdasOnASingleLine: All
|
2023-07-04 11:25:15 -04:00
|
|
|
AttributeMacros: [
|
|
|
|
'_ALIGNAS_TYPE',
|
|
|
|
'_ALIGNAS',
|
|
|
|
'_LIBCPP_ALIGNOF',
|
|
|
|
'_LIBCPP_ALWAYS_INLINE',
|
2022-08-19 13:08:01 +02:00
|
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX14',
|
|
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX17',
|
|
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX20',
|
|
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_CONSTEXPR',
|
2023-11-13 13:06:06 +01:00
|
|
|
'_LIBCPP_CONSTINIT',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX11',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX14',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX17',
|
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX20',
|
2024-01-20 06:07:19 +02:00
|
|
|
'_LIBCPP_DEPRECATED_IN_CXX23',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_DEPRECATED',
|
2022-06-14 20:09:03 +02:00
|
|
|
'_LIBCPP_DISABLE_EXTENTSION_WARNING',
|
|
|
|
'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_EXPORTED_FROM_ABI',
|
|
|
|
'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
|
|
|
|
'_LIBCPP_FALLTHROUGH',
|
|
|
|
'_LIBCPP_HIDDEN',
|
2022-06-14 20:09:03 +02:00
|
|
|
'_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_HIDE_FROM_ABI',
|
|
|
|
'_LIBCPP_INTERNAL_LINKAGE',
|
|
|
|
'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
|
2023-06-07 13:33:02 -07:00
|
|
|
'_LIBCPP_NO_SANITIZE',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_NO_UNIQUE_ADDRESS',
|
|
|
|
'_LIBCPP_NOALIAS',
|
2022-06-14 20:09:03 +02:00
|
|
|
'_LIBCPP_NODISCARD_EXT',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_NODISCARD',
|
|
|
|
'_LIBCPP_NORETURN',
|
|
|
|
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
|
2022-06-14 20:09:03 +02:00
|
|
|
'_LIBCPP_STANDALONE_DEBUG',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_TEMPLATE_DATA_VIS',
|
|
|
|
'_LIBCPP_TEMPLATE_VIS',
|
2023-07-03 11:02:47 -04:00
|
|
|
'_LIBCPP_THREAD_SAFETY_ANNOTATION',
|
2023-07-04 11:25:15 -04:00
|
|
|
'_LIBCPP_USING_IF_EXISTS',
|
|
|
|
'_LIBCPP_WEAK',
|
2022-06-14 20:09:03 +02:00
|
|
|
]
|
|
|
|
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 10:32:02 +02:00
|
|
|
PenaltyIndentedWhitespace: 2
|
2022-06-14 20:09:03 +02:00
|
|
|
|
2021-10-28 17:48:27 +02:00
|
|
|
Standard: c++20
|
|
|
|
SpacesInAngles: Leave
|
2016-11-23 01:18:56 +00:00
|
|
|
|
|
|
|
AlwaysBreakTemplateDeclarations: true
|
2017-01-03 04:23:52 +00:00
|
|
|
PointerAlignment: Left
|
2016-12-09 03:17:25 +00: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 17:25:23 +02:00
|
|
|
|
2021-09-15 18:29:22 +02:00
|
|
|
# libc++'s preferred indentions of preprocessor statements.
|
|
|
|
IndentPPDirectives: AfterHash
|
|
|
|
|
2021-03-31 22:46:28 +00:00
|
|
|
# libc++ has some long names so we need more than the 80 column limit imposed by LLVM style, for sensible formatting
|
|
|
|
ColumnLimit: 120
|