Skip to content

Commit cf2399a

Browse files
authored
[CI] enable code-format-helper for .cl files (llvm#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.
1 parent bb5f53c commit cf2399a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llvm/utils/git/code-format-helper.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,17 @@ def filter_changed_files(self, changed_files: List[str]) -> List[str]:
186186
filtered_files = []
187187
for path in changed_files:
188188
_, ext = os.path.splitext(path)
189-
if ext in (".cpp", ".c", ".h", ".hpp", ".hxx", ".cxx", ".inc", ".cppm"):
189+
if ext in (
190+
".cpp",
191+
".c",
192+
".h",
193+
".hpp",
194+
".hxx",
195+
".cxx",
196+
".inc",
197+
".cppm",
198+
".cl",
199+
):
190200
filtered_files.append(path)
191201
elif ext == "" and self.should_include_extensionless_file(path):
192202
filtered_files.append(path)

0 commit comments

Comments
 (0)