[clang] db6f7e0 - [git-clang-format] Process CUDA header files

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 14 04:39:43 PST 2020


Author: mydeveloperday
Date: 2020-11-14T12:39:16Z
New Revision: db6f7e0e9ec20049bfbb7c965baa90e1b9e56d3f

URL: https://github.com/llvm/llvm-project/commit/db6f7e0e9ec20049bfbb7c965baa90e1b9e56d3f
DIFF: https://github.com/llvm/llvm-project/commit/db6f7e0e9ec20049bfbb7c965baa90e1b9e56d3f.diff

LOG: [git-clang-format] Process CUDA header files

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.

Reviewed By: MyDeveloperDay

Patch By: tomilov

Differential Revision: https://reviews.llvm.org/D90780

Added: 
    

Modified: 
    clang/tools/clang-format/git-clang-format

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-format/git-clang-format b/clang/tools/clang-format/git-clang-format
index e4dc4cbc1dc9..ccd2f50fa4ad 100755
--- a/clang/tools/clang-format/git-clang-format
+++ b/clang/tools/clang-format/git-clang-format
@@ -78,7 +78,7 @@ def main():
       '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


        


More information about the cfe-commits mailing list