19 lines · plain
1// RUN: %clang %s -Xclang -verify -fsyntax-only2// RUN: %clang %s -cl-std=clc++ -Xclang -verify -fsyntax-only3// RUN: %clang %s -cl-std=cl2.0 -Xclang -verify -fsyntax-only4// RUN: %clang %s -### 2>&1 | FileCheck %s5 6// CHECK: "-x" "clcpp"7 8#ifdef __OPENCL_CPP_VERSION__9//expected-no-diagnostics10#endif11 12kernel void k(){13 auto a = get_local_id(1);14#ifndef __OPENCL_CPP_VERSION__15//expected-error@-2{{OpenCL C version 2.0 does not support the 'auto' storage class specifier}}16//expected-error@-3{{type specifier missing, defaults to 'int'}}17#endif18}19