brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · bd31b38 Raw
34 lines · c
1// RUN: %clang_cc1 -triple thumbv7m -verify -fsyntax-only %s2 3__attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}4void5badvalue0(void) {}6 7__attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}8void9badvalue1(void) {}10 11__attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}12void13badvalue2(void) {}14 15__attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}16void17badvalue3(void) {}18 19__attribute__((target("branch-protection=pac-ret+b-key"))) // expected-warning {{unsupported branch protection specification 'b-key'}}20void21badvalue4(void) {}22 23__attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}24void25badoption0(void) {}26 27__attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}28void29badorder0(void) {}30 31__attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}32void33badorder1(void) {}34