2016-06-10 07:34:20 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -x renderscript -D__RENDERSCRIPT__ %s
|
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -x c %s
|
|
|
|
|
|
|
|
#ifndef __RENDERSCRIPT__
|
2016-06-11 05:51:18 +08:00
|
|
|
// expected-warning@+2 {{'kernel' attribute ignored}}
|
2016-06-10 07:34:20 +08:00
|
|
|
#endif
|
2016-06-11 05:51:18 +08:00
|
|
|
void __attribute__((kernel)) kernel() {}
|
2016-06-10 07:34:20 +08:00
|
|
|
|
2016-06-11 05:51:18 +08:00
|
|
|
#ifndef __RENDERSCRIPT__
|
|
|
|
// expected-warning@+4 {{'kernel' attribute ignored}}
|
|
|
|
#else
|
|
|
|
// expected-warning@+2 {{'kernel' attribute only applies to functions}}
|
|
|
|
#endif
|
2016-06-10 07:34:20 +08:00
|
|
|
int __attribute__((kernel)) global;
|
|
|
|
|
|
|
|
#ifndef __RENDERSCRIPT__
|
|
|
|
// expected-error@+2 {{function return value cannot have __fp16 type; did you forget * ?}}
|
|
|
|
#endif
|
|
|
|
__fp16 fp16_return();
|
|
|
|
|
|
|
|
#ifndef __RENDERSCRIPT__
|
|
|
|
// expected-error@+2 {{parameters cannot have __fp16 type; did you forget * ?}}
|
|
|
|
#endif
|
|
|
|
void fp16_arg(__fp16 p);
|