[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / aarch64-branch-protection-attr-err.c
blob0433dc2723208491ca6c0eabea1fdb1fb7ae18d8
1 // RUN: %clang_cc1 -triple aarch64 -verify -fsyntax-only %s
3 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
4 void
5 badvalue0(void) {}
7 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
8 void
9 badvalue1(void) {}
11 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
12 void
13 badvalue2(void) {}
15 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
16 void
17 badvalue3(void) {}
19 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
20 void
21 badoption0(void) {}
23 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
24 void
25 badorder0(void) {}
27 __attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
28 void
29 badorder1(void) {}