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