[clang] [clang-format] Add 'cl' to enable OpenCL kernel file formatting (PR #134529)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 22:50:47 PDT 2025


owenca wrote:

> > I feel like there are more places where this needs to be addressed if we are going to add it.
> 
> I added support in language detection for OpenCL in [88c1174](https://github.com/llvm/llvm-project/commit/88c11747fcc8db1921dfd8f73c9330c662f7fd91). It returns C language since OpenCL is based on C99 and C11 with restrictions, see https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html

OpenCL is formatted as C++ now. Do we really need to change that? See #132832 for potential problems.

https://github.com/llvm/llvm-project/pull/134529


More information about the cfe-commits mailing list