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

This reverts commit 020ea3e8d1075ab4a388ecd0d6e7a9d4cd415392. This seems to break `test/libcxx/clang_tidy.gen.py/regex.sh.cpp` (in C++03 mode for some reason): ``` 2024-01-17T07:32:22.1759374Z # RUN: at line 12 2024-01-17T07:32:22.1773919Z clang-tidy-18 /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/test/libcxx/clang_tidy.gen.py/regex.sh.cpp --warnings-as-errors=* -header-filter=.* --config-file=/home/runner/_work/llvm-project/llvm-project/libcxx/.clang-tidy -- -Wweak-vtables -nostdinc++ -I /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1 -I /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1 -I /home/runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++03 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -fno-modules 2024-01-17T07:32:22.1803227Z # executed command: clang-tidy-18 /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/test/libcxx/clang_tidy.gen.py/regex.sh.cpp '--warnings-as-errors=*' '-header-filter=.*' --config-file=/home/runner/_work/llvm-project/llvm-project/libcxx/.clang-tidy -- -Wweak-vtables -nostdinc++ -I /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1 -I /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1 -I /home/runner/_work/llvm-project/llvm-project/libcxx/test/support -std=c++03 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -fno-modules 2024-01-17T07:32:22.1817757Z # .---command stdout------------ 2024-01-17T07:32:22.1820160Z # | /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__iterator/iterator_traits.h:124:50: error: use nullptr [modernize-use-nullptr,-warnings-as-errors] 2024-01-17T07:32:22.1822498Z # | 124 | static const bool value = decltype(__test<_Tp>(0, 0, 0, 0, 0))::value; 2024-01-17T07:32:22.1823337Z # | | ^ 2024-01-17T07:32:22.1824052Z # | | nullptr 2024-01-17T07:32:22.1826651Z # | /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__iterator/iterator_traits.h:124:53: error: use nullptr [modernize-use-nullptr,-warnings-as-errors] 2024-01-17T07:32:22.1829325Z # | 124 | static const bool value = decltype(__test<_Tp>(0, 0, 0, 0, 0))::value; 2024-01-17T07:32:22.1831137Z # | | ^ 2024-01-17T07:32:22.1831963Z # | | nullptr 2024-01-17T07:32:22.1834149Z # | /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__iterator/iterator_traits.h:124:56: error: use nullptr [modernize-use-nullptr,-warnings-as-errors] 2024-01-17T07:32:22.1848711Z # | 124 | static const bool value = decltype(__test<_Tp>(0, 0, 0, 0, 0))::value; 2024-01-17T07:32:22.1849506Z # | | ^ 2024-01-17T07:32:22.1849997Z # | | nullptr 2024-01-17T07:32:22.1851528Z # | /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__iterator/iterator_traits.h:124:59: error: use nullptr [modernize-use-nullptr,-warnings-as-errors] 2024-01-17T07:32:22.1853391Z # | 124 | static const bool value = decltype(__test<_Tp>(0, 0, 0, 0, 0))::value; 2024-01-17T07:32:22.1854277Z # | | ^ 2024-01-17T07:32:22.1854841Z # | | nullptr 2024-01-17T07:32:22.1856314Z # | /home/runner/_work/llvm-project/llvm-project/build/generic-cxx03/include/c++/v1/__iterator/iterator_traits.h:124:62: error: use nullptr [modernize-use-nullptr,-warnings-as-errors] 2024-01-17T07:32:22.1857768Z # | 124 | static const bool value = decltype(__test<_Tp>(0, 0, 0, 0, 0))::value; 2024-01-17T07:32:22.1858493Z # | | ^ 2024-01-17T07:32:22.1858998Z # | | nullptr 2024-01-17T07:32:22.1859503Z # `----------------------------- 2024-01-17T07:32:22.1859900Z # .---command stderr------------ 2024-01-17T07:32:22.1860259Z # | 43 warnings generated. 2024-01-17T07:32:22.1860710Z # | Suppressed 33 warnings (33 in non-user code). 2024-01-17T07:32:22.1861809Z # | Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 2024-01-17T07:32:22.1862750Z # | 5 warnings treated as errors 2024-01-17T07:32:22.1863229Z # `----------------------------- 2024-01-17T07:32:22.1863622Z # error: command failed with exit status: 1 ``` (see https://github.com/llvm/llvm-project/actions/runs/7552394884/job/20561192096)
80 lines
2.6 KiB
YAML
80 lines
2.6 KiB
YAML
Checks: >
|
|
bugprone-copy-constructor-init,
|
|
bugprone-dangling-handle,
|
|
bugprone-infinite-loop,
|
|
bugprone-stringview-nullptr,
|
|
bugprone-use-after-move,
|
|
|
|
llvm-include-order,
|
|
llvm-namespace-comment,
|
|
|
|
misc-definitions-in-headers,
|
|
misc-misplaced-const,
|
|
misc-non-copyable-objects,
|
|
misc-uniqueptr-reset-release,
|
|
|
|
modernize-loop-convert,
|
|
modernize-redundant-void-arg,
|
|
modernize-use-override,
|
|
|
|
readability-duplicate-include,
|
|
readability-identifier-naming,
|
|
readability-function-cognitive-complexity,
|
|
readability-function-size,
|
|
readability-misplaced-array-index,
|
|
readability-redundant-control-flow,
|
|
readability-redundant-function-ptr-dereference,
|
|
readability-redundant-preprocessor,
|
|
readability-simplify-boolean-expr,
|
|
readability-simplify-subscript-expr,
|
|
readability-uniqueptr-delete-release,
|
|
|
|
CheckOptions:
|
|
- key: readability-function-cognitive-complexity.Threshold
|
|
value: 143 # TODO: bring that number down
|
|
- key: readability-function-size.LineThreshold
|
|
value: 194 # TODO: bring that number down
|
|
- key: readability-identifier-naming.GetConfigPerFile
|
|
value: false
|
|
- key: readability-identifier-naming.ParameterCase
|
|
value: lower_case
|
|
- key: readability-identifier-naming.ParameterPrefix
|
|
value: __
|
|
- key: readability-identifier-naming.PrivateMemberCase
|
|
value: lower_case
|
|
- key: readability-identifier-naming.PrivateMemberPrefix
|
|
value: __
|
|
- key: readability-identifier-naming.PrivateMemberSuffix
|
|
value: _
|
|
- key: readability-identifier-naming.LocalVariableCase
|
|
value: lower_case
|
|
- key: readability-identifier-naming.LocalVariablePrefix
|
|
value: __
|
|
- key: readability-identifier-naming.TemplateParameterCase
|
|
value: CamelCase
|
|
- key: readability-identifier-naming.TemplateParameterPrefix
|
|
value: _
|
|
- key: readability-identifier-naming.TemplateParameterIgnoredRegexp
|
|
value: (.*\:auto|expr-type) # This is https://llvm.org/PR56464
|
|
- key: readability-identifier-naming.ValueTemplateParameterIgnoredRegexp # TODO: enforce naming of variable parameters
|
|
value: .*
|
|
|
|
# TODO: investigate these checks
|
|
# bugprone-branch-clone,
|
|
# bugprone-macro-parentheses,
|
|
# cppcoreguidelines-prefer-member-initializer,
|
|
# misc-unused-parameters,
|
|
# modernize-use-bool-literals,
|
|
# modernize-use-default-member-init,
|
|
# modernize-use-equals-default,
|
|
# modernize-use-equals-delete,
|
|
# modernize-use-nullptr,
|
|
# portability-restrict-system-includes,
|
|
# readability-function-cognitive-complexity,
|
|
# readability-implicit-bool-conversion,
|
|
# readability-isolate-declaration,
|
|
# readability-redundant-access-specifiers,
|
|
# readability-redundant-declaration,
|
|
# readability-redundant-member-init,
|
|
#
|