blob: 658cb3aaf4d1e014510b5f4e5f9f4f54b22f7374 [file] [log] [blame]
Pirama Arumuga Nainar4967a712016-09-19 22:19:55 -07001// RUN: %clang_cc1 -verify %s
2// RUN: %clang_cc1 -verify -cl-std=CL2.0 -D CL20 %s
3// RUN: %clang_cc1 -verify -x c -D NOCL %s
4
5#ifndef NOCL
6kernel void f(__attribute__((nosvm)) global int* a);
7#ifndef CL20
8// expected-error@-2 {{'nosvm' attribute requires OpenCL version 2.0}}
9#else
10// expected-warning@-4 {{'nosvm' attribute is deprecated and ignored in OpenCL version 2.0}}
11#endif
12
13__attribute__((nosvm)) void g(); // expected-warning {{'nosvm' attribute only applies to variables}}
14
15#else
16void f(__attribute__((nosvm)) int* a); // expected-warning {{'nosvm' attribute ignored}}
17#endif