[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Sema / arm-branch-protection-attr-err.c
blobbd31b38c4487215581f1b5615e369ec434aae32e
1 // RUN: %clang_cc1 -triple thumbv7m -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=pac-ret+b-key"))) // expected-warning {{unsupported branch protection specification 'b-key'}}
20 void
21 badvalue4(void) {}
23 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
24 void
25 badoption0(void) {}
27 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
28 void
29 badorder0(void) {}
31 __attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
32 void
33 badorder1(void) {}