xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/static-local-in-local-class.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -emit-llvm -o %t %s
2 // PR6769
3 
4 struct X {
5   static void f();
6 };
7 
8 void X::f() {
9   static int *i;
10   {
11     struct Y {
12       static void g() {
13         i = new int();
14 	*i = 100;
15 	(*i) = (*i) +1;
16       }
17     };
18     (void)Y::g();
19   }
20   (void)i;
21 }
22 
23 // pr7101
24 void foo() {
25     static int n = 0;
26     struct Helper {
27         static void Execute() {
28             n++;
29         }
30     };
31     Helper::Execute();
32 }
33 
34