xref: /minix3/external/bsd/llvm/dist/clang/test/Index/Inputs/t1.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc #include "foo.h"
2*f4a2713aSLionel Sambuc 
foo_func(int param1)3*f4a2713aSLionel Sambuc void foo_func(int param1) {
4*f4a2713aSLionel Sambuc   int local_var = global_var;
5*f4a2713aSLionel Sambuc   for (int for_var = 100; for_var < 500; ++for_var) {
6*f4a2713aSLionel Sambuc     local_var = param1 + for_var;
7*f4a2713aSLionel Sambuc   }
8*f4a2713aSLionel Sambuc   bar_func();
9*f4a2713aSLionel Sambuc }
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc struct S1 {
12*f4a2713aSLionel Sambuc   int x;
13*f4a2713aSLionel Sambuc };
14*f4a2713aSLionel Sambuc 
15*f4a2713aSLionel Sambuc struct S2 {
16*f4a2713aSLionel Sambuc   int x;
17*f4a2713aSLionel Sambuc };
18*f4a2713aSLionel Sambuc 
field_test(void)19*f4a2713aSLionel Sambuc void field_test(void) {
20*f4a2713aSLionel Sambuc   struct S1 s1;
21*f4a2713aSLionel Sambuc   s1.x = 0;
22*f4a2713aSLionel Sambuc   ((struct S2 *)0)->x = 0;
23*f4a2713aSLionel Sambuc 
24*f4a2713aSLionel Sambuc   struct MyStruct ms;
25*f4a2713aSLionel Sambuc   ms.field_var = 10;
26*f4a2713aSLionel Sambuc }
27*f4a2713aSLionel Sambuc 
28*f4a2713aSLionel Sambuc int (^CP)(int) = ^(int x) { return x * global_var; };
29