| 1 | // RUN: %clang_cc1 -fsyntax-only -verify -x renderscript -D__RENDERSCRIPT__ %s |
| 2 | // RUN: %clang_cc1 -fsyntax-only -verify -x c %s |
| 3 | |
| 4 | #ifndef __RENDERSCRIPT__ |
| 5 | // expected-warning@+2 {{'kernel' attribute ignored}} |
| 6 | #endif |
| 7 | void __attribute__((kernel)) kernel() {} |
| 8 | |
| 9 | #ifndef __RENDERSCRIPT__ |
| 10 | // expected-warning@+4 {{'kernel' attribute ignored}} |
| 11 | #else |
| 12 | // expected-warning@+2 {{'kernel' attribute only applies to functions}} |
| 13 | #endif |
| 14 | int __attribute__((kernel)) global; |
| 15 | |
| 16 | #ifndef __RENDERSCRIPT__ |
| 17 | // expected-error@+2 {{function return value cannot have __fp16 type; did you forget * ?}} |
| 18 | #endif |
| 19 | __fp16 fp16_return(); |
| 20 | |
| 21 | #ifndef __RENDERSCRIPT__ |
| 22 | // expected-error@+2 {{parameters cannot have __fp16 type; did you forget * ?}} |
| 23 | #endif |
| 24 | void fp16_arg(__fp16 p); |
| 25 | |