blob: 99d4bfdc0e375447c6f57ecd065065ed6da0744b [file] [log] [blame]
Artem Belevich83a6dcc2015-03-19 17:32:06 +00001// Verify that we can parse a simple CUDA file with or without -save-temps
2// http://llvm.org/PR22936
3// RUN: %clang -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
17int cudaConfigureCall(int, int);
18__attribute__((global)) void kernel() {}
19
20void func() {
21 kernel<<<1,1>>>();
22}
23