annotate clang/test/Sema/branch-protection-attr-err.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple aarch64 -verify -fsyntax-only %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
anatofuz
parents:
diff changeset
4 void badvalue0() {}
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
anatofuz
parents:
diff changeset
7 void badvalue1() {}
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
anatofuz
parents:
diff changeset
10 void badvalue2() {}
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
anatofuz
parents:
diff changeset
13 void badvalue3() {}
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
anatofuz
parents:
diff changeset
16 void badoption0() {}
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
anatofuz
parents:
diff changeset
19 void badorder0() {}
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 __attribute__ ((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
anatofuz
parents:
diff changeset
22 void badorder1() {}