[llvm] [CI] enable code-format-helper for .cl files (PR #135748)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 22:31:18 PDT 2025
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/135748
In clang-format, OpenCL .cl file uses default C++ formatting. There are many pull-requests in libclc project that change OpenCL files. It is beneficial to enable clang-format for them in CI.
>From 1b29c187280c8542c738cb81bb9014c6ffc7f415 Mon Sep 17 00:00:00 2001
From: Wenju He <wenju.he at intel.com>
Date: Mon, 14 Apr 2025 22:22:58 -0700
Subject: [PATCH] [CI] enable code-format-helper for .cl files
In clang-format, OpenCL .cl file uses default C++ formatting.
There are many pull-requests in libclc project that change OpenCL files.
It is beneficial to enable clang-format for them in CI.
---
llvm/utils/git/code-format-helper.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index 69d654b87e856..aed655234134c 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -186,7 +186,7 @@ def filter_changed_files(self, changed_files: List[str]) -> List[str]:
filtered_files = []
for path in changed_files:
_, ext = os.path.splitext(path)
- if ext in (".cpp", ".c", ".h", ".hpp", ".hxx", ".cxx", ".inc", ".cppm"):
+ if ext in (".cpp", ".c", ".h", ".hpp", ".hxx", ".cxx", ".inc", ".cppm", ".cl"):
filtered_files.append(path)
elif ext == "" and self.should_include_extensionless_file(path):
filtered_files.append(path)
More information about the llvm-commits
mailing list