diff options
Diffstat (limited to 'clang/test/Frontend/stdlang.c')
-rw-r--r-- | clang/test/Frontend/stdlang.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/Frontend/stdlang.c b/clang/test/Frontend/stdlang.c index 71997f1403c..765d7272294 100644 --- a/clang/test/Frontend/stdlang.c +++ b/clang/test/Frontend/stdlang.c @@ -1,6 +1,13 @@ // RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s -// RUN: %clang_cc1 -x cl -std=c99 -DOPENCL %s -// expected-no-diagnostics +// RUN: %clang_cc1 -x cl -DOPENCL %s +// RUN: %clang_cc1 -x cl -cl-std=CL -DOPENCL %s +// RUN: %clang_cc1 -x cl -cl-std=CL1.1 -DOPENCL %s +// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -DOPENCL %s +// RUN: %clang_cc1 -x cl -cl-std=CL2.0 -DOPENCL %s +// RUN: not %clang_cc1 -x cl -std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s +// RUN: not %clang_cc1 -x cl -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s +// CHECK-C99: error: invalid argument '-std=c99' not allowed with 'OpenCL' +// CHECK-INVALID: error: invalid value 'invalid' in '-cl-std=invalid' #if defined(CUDA) __attribute__((device)) void f_device(); |