With commit 64d7d49e, our clang parser gains some basic ability to understand the kernel launch syntax in .cu files. However, nvcc and clang implicitly include many headers when compiling, which our parser doesn't, thus generating false alarms.
For now the user could manually include those headers in there file to get correct parsing result, but this of course is less than desirable.
Note: The include file list can be get by nvcc -E cuda.cu | egrep -o '/opt/cuda/.*\.h'| sort | uniq or clang++ --cuda-path=/opt/cuda -E cuda.cu | egrep -o '/opt/cuda/.*\.h'| sort | uniq. The file list is slightly different between nvcc and clang.
- nvcc knows where the CUDA installation is, but clang doesn't. Thus clang needs --cuda-path argument when compiling .cu files. Find a way to pass this argument to the clang parser. This information can be either provided directly by the user (similar to custom include path), or automatically found by looking for nvcc in PATH, or by looking at cmake generated information (not sure if the last one is possible, but cmake does has FindCuda)
- Not sure if adding --cuda-path will trigger the inclusion of additional header files by clang. If not, then we need to find a way to include these header files in our parser.