[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / arm-branch-protection-attr-warn.c
blob864bff9b9e8a454e4ec9f4463dc5bdf0b2c0bdc2
1 // RUN: %clang_cc1 -triple thumbv6m -verify -fsyntax-only %s
3 // expected-warning@+1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
4 __attribute__((target("arch=cortex-m0,branch-protection=bti"))) void f1(void) {}
6 // expected-warning@+1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
7 __attribute__((target("arch=cortex-m0,branch-protection=pac-ret"))) void f2(void) {}
9 // expected-warning@+1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
10 __attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret"))) void f3(void) {}
12 // expected-warning@+1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
13 __attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret+leaf"))) void f4(void) {}
15 // expected-warning@+1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
16 __attribute__((target("arch=cortex-a17,thumb,branch-protection=bti+pac-ret+leaf"))) void f5(void) {}