[PATCH] D90780: [git-clang-format] Process CUDA header files

Anatoliy Tomilov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 11:29:52 PST 2020


tomilov created this revision.
tomilov added a reviewer: dcoughlin.
tomilov added a project: clang-format.
Herald added subscribers: llvm-commits, Charusso, yaxunl.
Herald added a project: LLVM.
tomilov requested review of this revision.

Clang supports compiling CUDA source files,
CUDA header files may contain CUDA specific code
that is why they have special extension, which
can be recognized by nvcc (CUDA compiler driver)
as CUDA source file.
Format them by default as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90780

Files:
  tools/clang-format/git-clang-format


Index: tools/clang-format/git-clang-format
===================================================================
--- tools/clang-format/git-clang-format
+++ tools/clang-format/git-clang-format
@@ -78,7 +78,7 @@
       'm',  # ObjC
       'mm',  # ObjC++
       'cc', 'cp', 'cpp', 'c++', 'cxx', 'hh', 'hpp', 'hxx',  # C++
-      'cu',  # CUDA
+      'cu', 'cuh',  # CUDA
       # Other languages that clang-format supports
       'proto', 'protodevel',  # Protocol Buffers
       'java',  # Java


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90780.302916.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201104/bf3810f0/attachment.bin>


More information about the llvm-commits mailing list