annotate clang/test/Sema/renderscript.rs @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -verify -x renderscript -D__RENDERSCRIPT__ %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -fsyntax-only -verify -x c %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 #ifndef __RENDERSCRIPT__
anatofuz
parents:
diff changeset
5 // expected-warning@+2 {{'kernel' attribute ignored}}
anatofuz
parents:
diff changeset
6 #endif
anatofuz
parents:
diff changeset
7 void __attribute__((kernel)) kernel() {}
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 #ifndef __RENDERSCRIPT__
anatofuz
parents:
diff changeset
10 // expected-warning@+4 {{'kernel' attribute ignored}}
anatofuz
parents:
diff changeset
11 #else
anatofuz
parents:
diff changeset
12 // expected-warning@+2 {{'kernel' attribute only applies to functions}}
anatofuz
parents:
diff changeset
13 #endif
anatofuz
parents:
diff changeset
14 int __attribute__((kernel)) global;
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 #ifndef __RENDERSCRIPT__
anatofuz
parents:
diff changeset
17 // expected-error@+2 {{function return value cannot have __fp16 type; did you forget * ?}}
anatofuz
parents:
diff changeset
18 #endif
anatofuz
parents:
diff changeset
19 __fp16 fp16_return();
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 #ifndef __RENDERSCRIPT__
anatofuz
parents:
diff changeset
22 // expected-error@+2 {{parameters cannot have __fp16 type; did you forget * ?}}
anatofuz
parents:
diff changeset
23 #endif
anatofuz
parents:
diff changeset
24 void fp16_arg(__fp16 p);