[cfe-dev] clang-tidy and CUDA

Richard via cfe-dev cfe-dev at lists.llvm.org
Mon Jul 2 14:29:40 PDT 2018


[Please reply *only* to the list and do not include my email directly
in the To: or Cc: of your reply; otherwise I will not see your reply.
Thanks.]

In article <a8b5d138-3a78-de72-181a-5271fec64a47 at eyen.eu>,
    Jakub Klener via cfe-dev <cfe-dev at lists.llvm.org> writes:

> is it somehow possible to specify source file extension for clang-tidy,
> can it for example parse ".cu" files? Is there some support for CUDA in
> clang-tidy? I ran it on my CUDA source file (which I have to rename to
> ".cc" file because otherwise clang-tidy could not find it), specified
> -D__CUDACC__, and it found error: unknown type
> name '__host__' [clang-diagnostic-error].

Are you using a compilation database or a command-line?

Either way, more information about exactly how you are invoking
clang-tidy is needed.  AFAIK, clang-tidy doesn't care about the actual
filename.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
            The Terminals Wiki <http://terminals-wiki.org>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the cfe-dev mailing list