[clang-tools-extra] [clang-tidy] Add documentation and smoke test for CUDA (PR #173699)

Carlos Galvez via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 27 10:51:56 PST 2025


================
@@ -349,6 +349,25 @@ An overview of all the command-line options:
         some-check.SomeOption: 'some value'
       ...
 
+Running Clang-Tidy on CUDA Files
+--------------------------------
+
+:program:`clang-tidy` supports analyzing CUDA source files. To ensure correct
----------------
carlosgalvezp wrote:

Worth mentioning that if the user is coming from a GCC + NVCC setup (very likely), they will also need to use the `ArgsToRemove` feature of clang-tidy (or equivalent command-line option) to remove NVCC-specific flags. And use `ExtraArgs` to add the `cuda-path`.

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


More information about the cfe-commits mailing list