[libcxx-commits] [libcxx] [libc++] run clang-tidy on src/ in the CI (PR #121198)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 2 08:26:00 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/121198.diff
2 Files Affected:
- (modified) libcxx/src/.clang-tidy (+15-1)
- (modified) libcxx/utils/ci/run-buildbot (+3)
``````````diff
diff --git a/libcxx/src/.clang-tidy b/libcxx/src/.clang-tidy
index ec8f2e0a76a3c4..3d5493d965558e 100644
--- a/libcxx/src/.clang-tidy
+++ b/libcxx/src/.clang-tidy
@@ -1,4 +1,18 @@
InheritParentConfig: true
Checks: >
- -readability-identifier-naming
+ -clang-analyzer-*,
+
+ -llvm-include-order,
+
+ -modernize-loop-convert,
+ -modernize-use-equals-delete,
+ -modernize-use-nullptr,
+ -modernize-use-override,
+
+ -readability-identifier-naming,
+ -readability-function-cognitive-complexity,
+ -readability-function-size,
+ -readability-simplify-boolean-expr,
+
+# TODO: Consider enabling clang-analyzer. Without the checks clang-tidy runs 18x faster on my system.
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index f1ede6474eb9ee..4070b7f9211963 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -144,6 +144,7 @@ function generate-cmake() {
generate-cmake-base \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLIBCXX_CXX_ABI=libcxxabi \
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=On \
"${@}"
}
@@ -328,6 +329,8 @@ generic-cxx26)
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx26.cmake"
check-runtimes
check-abi-list
+ python3 $MONOREPO_ROOT/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py \
+ -clang-tidy-binary clang-tidy-20 -warnings-as-errors \* -source-filter ".*libcxx/src.*" -p "${BUILD_DIR}"
;;
#
# Other compiler support
``````````
</details>
https://github.com/llvm/llvm-project/pull/121198
More information about the libcxx-commits
mailing list