Skip to content

Conversation

@philnik777
Copy link
Contributor

clang-tidy doesn't run checks anymore in system headers by default in new versions to reduce runtime. In this case it's problematic, since we want to check system headers.

@philnik777 philnik777 requested a review from a team as a code owner December 3, 2025 09:39
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 3, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

clang-tidy doesn't run checks anymore in system headers by default in new versions to reduce runtime. In this case it's problematic, since we want to check system headers.


Full diff: https://github.com/llvm/llvm-project/pull/170446.diff

1 Files Affected:

  • (modified) libcxx/utils/libcxx/test/modules.py (+2-1)
diff --git a/libcxx/utils/libcxx/test/modules.py b/libcxx/utils/libcxx/test/modules.py
index bd4fbe78c1cdc..b93846bf1788e 100644
--- a/libcxx/utils/libcxx/test/modules.py
+++ b/libcxx/utils/libcxx/test/modules.py
@@ -166,7 +166,7 @@ def process_module_partition(self, header, is_c_header):
             f'" > {self.tmp_prefix}.{header}.cppm'
         )
 
-        # Extract the information of the module partition using lang-tidy
+        # Extract the information of the module partition using clang-tidy
         print(
             f"// RUN: {self.clang_tidy} {self.tmp_prefix}.{header}.cppm "
             "  --checks='-*,libcpp-header-exportable-declarations' "
@@ -222,6 +222,7 @@ def process_header(self, header, include, is_c_header):
         print(f'// RUN: echo -e "' f"{include}" f'" > {self.tmp_prefix}.{header}.cpp')
         print(
             f"// RUN: {self.clang_tidy} {self.tmp_prefix}.{header}.cpp "
+            "  --system-headers "
             "  --checks='-*,libcpp-header-exportable-declarations' "
             "  -config='{CheckOptions: [ "
             "    {"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants