xref: /llvm-project/clang/test/Sema/arm-cmse-no-diag.c (revision e765e0bc8ed06ebb186a9905227273517f0b7240)
1 // RUN: %clang_cc1 -triple thumbv8m.base-none-eabi -mcmse -verify -Wno-cmse-union-leak %s
2 // expected-no-diagnostics
3 
4 union U { unsigned n; char b[4]; } u;
5 
6 void (*fn2)(int, union U) __attribute__((cmse_nonsecure_call));
7 
xyzzy(void)8 union U xyzzy(void) __attribute__((cmse_nonsecure_entry)) {
9   fn2(0, u);
10   return u;
11 }
12