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