annotate clang/test/Sema/attr-long-call.c @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents c4bab56944e8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple mips64-linux-gnu -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
3
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
4 __attribute__((long_call(0))) void foo1(void); // expected-error {{'long_call' attribute takes no arguments}}
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
5 __attribute__((short_call(0))) void foo9(void); // expected-error {{'short_call' attribute takes no arguments}}
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
6 __attribute__((far(0))) void foo2(void); // expected-error {{'far' attribute takes no arguments}}
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
7 __attribute__((near(0))) void foo3(void); // expected-error {{'near' attribute takes no arguments}}
150
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 __attribute((long_call)) int a; // expected-warning {{attribute only applies to functions}}
anatofuz
parents:
diff changeset
10 __attribute((short_call)) int d; // expected-warning {{attribute only applies to functions}}
anatofuz
parents:
diff changeset
11 __attribute((far)) int a; // expected-warning {{attribute only applies to functions}}
anatofuz
parents:
diff changeset
12 __attribute((near)) int a; // expected-warning {{attribute only applies to functions}}
anatofuz
parents:
diff changeset
13
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
14 __attribute((long_call)) void foo4(void);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
15 __attribute((short_call)) void foo10(void);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
16 __attribute((far)) void foo5(void);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
17 __attribute((near)) void foo6(void);
150
anatofuz
parents:
diff changeset
18
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
19 __attribute((long_call, far)) void foo7(void);
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
20 __attribute((short_call, near)) void foo11(void);
150
anatofuz
parents:
diff changeset
21
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
22 __attribute((far, near)) void foo8(void); // expected-error {{'near' and 'far' attributes are not compatible}} \
150
anatofuz
parents:
diff changeset
23 // expected-note {{conflicting attribute is here}}
anatofuz
parents:
diff changeset
24
236
c4bab56944e8 LLVM 16
kono
parents: 150
diff changeset
25 __attribute((short_call, long_call)) void foo12(void); // expected-error {{'long_call' and 'short_call' attributes are not compatible}} \
150
anatofuz
parents:
diff changeset
26 // expected-note {{conflicting attribute is here}}