-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[libc++] run clang-tidy on src/ in the CI #121198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e93c269
to
cf8ae75
Compare
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesFull diff: https://github.com/llvm/llvm-project/pull/121198.diff 2 Files Affected:
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
|
ldionne
requested changes
Jan 8, 2025
cf8ae75
to
8dafe63
Compare
✅ With the latest revision this PR passed the Python code formatter. |
3fea1ac
to
21ace2f
Compare
21ace2f
to
c0ef730
Compare
ldionne
approved these changes
May 14, 2025
ldionne
reviewed
May 14, 2025
Co-authored-by: Louis Dionne <[email protected]>
TIFitis
pushed a commit
to TIFitis/llvm-project
that referenced
this pull request
May 19, 2025
This adds a new test to run clang-tidy on the `src/` directory and temporarily disables and clang-tidy checks that currently fail. They will be enabled in follow-up patches.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new test to run clang-tidy on the
src/
directory and temporarily disables and clang-tidy checks that currently fail. They will be enabled in follow-up patches.