1 // Verify that we can parse a simple CUDA file with or without -save-temps 2 // http://llvm.org/PR22936 3 // RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ 4 // RUN: -nocudainc -nocudalib -Werror -fsyntax-only -c %s 5 // 6 // Verify that we pass -x cuda-cpp-output to compiler after 7 // preprocessing a CUDA file 8 // RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ 9 // RUN: -Werror -### -save-temps -c %s 2>&1 | FileCheck %s 10 // CHECK-LABEL: "-cc1" 11 // CHECK: "-E" 12 // CHECK: "-x" "cuda" 13 // CHECK-LABEL: "-cc1" 14 // CHECK: "-x" "cuda-cpp-output" 15 // 16 // Verify that compiler accepts CUDA syntax with "-x cuda-cpp-output". 17 // RUN: %clang --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ 18 // RUN: -Werror -fsyntax-only -x cuda-cpp-output -c %s 19 20 extern "C" int cudaConfigureCall(int, int); 21 extern "C" int __cudaPushCallConfiguration(int, int); 22 kernel()23__attribute__((global)) void kernel() {} 24 func()25void func() { 26 kernel<<<1,1>>>(); 27 } 28