xref: /aosp_15_r20/external/clang/test/CodeGenCXX/apple-kext-guard-variable.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang -target x86_64-apple-darwin10 -S -o %t.s -mkernel -Xclang -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li // rdar://problem/9143356
4*67e74705SXin Li 
5*67e74705SXin Li int foo();
test()6*67e74705SXin Li void test() {
7*67e74705SXin Li   static int y = 0;
8*67e74705SXin Li   static int x = foo(); // expected-error {{this initialization requires a guard variable, which the kernel does not support}}
9*67e74705SXin Li }
10