[llvm] cf2399a - [CI] enable code-format-helper for .cl files (#135748)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 04:35:02 PDT 2025
Author: Wenju He
Date: 2025-04-16T12:34:59+01:00
New Revision: cf2399a2ee5b8a721eff385acbaa68fb9b00127c
URL: https://github.com/llvm/llvm-project/commit/cf2399a2ee5b8a721eff385acbaa68fb9b00127c
DIFF: https://github.com/llvm/llvm-project/commit/cf2399a2ee5b8a721eff385acbaa68fb9b00127c.diff
LOG: [CI] enable code-format-helper for .cl files (#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.
Added:
Modified:
llvm/utils/git/code-format-helper.py
Removed:
################################################################################
diff --git a/llvm/utils/git/code-format-helper.py b/llvm/utils/git/code-format-helper.py
index ed102b54f9b52..4e4145dcbb8c2 100755
--- a/llvm/utils/git/code-format-helper.py
+++ b/llvm/utils/git/code-format-helper.py
@@ -186,7 +186,17 @@ 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