mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-25 13:05:04 +00:00

In preparation for running clang-format on the whole code base, we are also removing mentions of the legacy _LIBCPP_INLINE_VISIBILITY macro in favor of the newer _LIBCPP_HIDE_FROM_ABI. We're still leaving the definition of _LIBCPP_INLINE_VISIBILITY to avoid creating needless breakage in case some older patches are checked-in with mentions of the old macro. After we branch for LLVM 18, we can do another pass to clean up remaining uses of the macro that might have gotten introduced by mistake (if any) and remove the macro itself at the same time. This is just a minor convenience to smooth out the transition as much as possible. See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all for the clang-format proposal.
83 lines
3.0 KiB
YAML
83 lines
3.0 KiB
YAML
BasedOnStyle: LLVM
|
|
# 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.
|
|
|
|
AlignAfterOpenBracket: Align
|
|
AlignConsecutiveAssignments: Consecutive
|
|
AlignConsecutiveBitFields: Consecutive
|
|
AlignEscapedNewlines: Right
|
|
AlignOperands: AlignAfterOperator
|
|
AlignTrailingComments: true
|
|
AllowAllArgumentsOnNextLine: true
|
|
AllowAllParametersOfDeclarationOnNextLine: true
|
|
AllowShortFunctionsOnASingleLine: true
|
|
AllowShortLambdasOnASingleLine: All
|
|
AttributeMacros: [
|
|
'_ALIGNAS_TYPE',
|
|
'_ALIGNAS',
|
|
'_LIBCPP_ALIGNOF',
|
|
'_LIBCPP_ALWAYS_INLINE',
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX14',
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX17',
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX20',
|
|
'_LIBCPP_CONSTEXPR_SINCE_CXX23',
|
|
'_LIBCPP_CONSTEXPR',
|
|
'_LIBCPP_CONSTINIT',
|
|
'_LIBCPP_DEPRECATED_IN_CXX11',
|
|
'_LIBCPP_DEPRECATED_IN_CXX14',
|
|
'_LIBCPP_DEPRECATED_IN_CXX17',
|
|
'_LIBCPP_DEPRECATED_IN_CXX20',
|
|
'_LIBCPP_DEPRECATED',
|
|
'_LIBCPP_DISABLE_EXTENTSION_WARNING',
|
|
'_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
|
|
'_LIBCPP_EXPORTED_FROM_ABI',
|
|
'_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
|
|
'_LIBCPP_FALLTHROUGH',
|
|
'_LIBCPP_HIDDEN',
|
|
'_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
|
|
'_LIBCPP_HIDE_FROM_ABI',
|
|
'_LIBCPP_INTERNAL_LINKAGE',
|
|
'_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
|
|
'_LIBCPP_NO_SANITIZE',
|
|
'_LIBCPP_NO_UNIQUE_ADDRESS',
|
|
'_LIBCPP_NOALIAS',
|
|
'_LIBCPP_NODISCARD_EXT',
|
|
'_LIBCPP_NODISCARD',
|
|
'_LIBCPP_NORETURN',
|
|
'_LIBCPP_OVERRIDABLE_FUNC_VIS',
|
|
'_LIBCPP_STANDALONE_DEBUG',
|
|
'_LIBCPP_TEMPLATE_DATA_VIS',
|
|
'_LIBCPP_TEMPLATE_VIS',
|
|
'_LIBCPP_THREAD_SAFETY_ANNOTATION',
|
|
'_LIBCPP_USING_IF_EXISTS',
|
|
'_LIBCPP_WEAK',
|
|
]
|
|
BinPackArguments: false
|
|
BinPackParameters: false
|
|
BreakBeforeConceptDeclarations: true
|
|
BreakInheritanceList: BeforeColon
|
|
EmptyLineAfterAccessModifier: Never
|
|
EmptyLineBeforeAccessModifier: Always
|
|
IndentWrappedFunctionNames: false
|
|
IndentRequires: true
|
|
InsertTrailingCommas: Wrapped
|
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
|
MaxEmptyLinesToKeep: 1
|
|
PackConstructorInitializers: NextLine
|
|
|
|
PenaltyIndentedWhitespace: 2
|
|
|
|
Standard: c++20
|
|
SpacesInAngles: Leave
|
|
|
|
AlwaysBreakTemplateDeclarations: true
|
|
PointerAlignment: Left
|
|
|
|
|
|
# libc++'s preferred indentions of preprocessor statements.
|
|
IndentPPDirectives: AfterHash
|
|
|
|
# libc++ has some long names so we need more than the 80 column limit imposed by LLVM style, for sensible formatting
|
|
ColumnLimit: 120
|