1 // RUN: %clang_cc1 -triple aarch64 -verify -fsyntax-only %s
2 
3 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
badvalue0()4 void badvalue0() {}
5 
6 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
badvalue1()7 void badvalue1() {}
8 
9 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
badvalue2()10 void badvalue2() {}
11 
12 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
badvalue3()13 void badvalue3() {}
14 
15 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
badoption0()16 void badoption0() {}
17 
18 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
badorder0()19 void badorder0() {}
20 
21 __attribute__ ((target("branch-protection=pac-ret+bti+leaf")))  // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
badorder1()22 void badorder1() {}
23