[X86] Use NSW/NUW flags on ISD::TRUNCATE nodes to improve X86 PACKSS/PACKUS lowering...
[llvm-project.git] / lldb / test / API / lang / c / blocks / main.c
blobb1b215ec2331be32ba2061afaaa9b6319904fca0
1 #include <stdio.h>
3 struct CG {int x; int y;};
5 int g(int (^callback)(struct CG)) {
6 struct CG cg = {.x=1,.y=2};
8 int z = callback(cg); // Set breakpoint 2 here.
10 return z;
13 int h(struct CG cg){return 42;}
15 int main()
17 int c = 1;
19 int (^add)(int, int) = ^int(int a, int b)
21 return a + b + c; // Set breakpoint 0 here.
24 int (^neg)(int) = ^int(int a)
26 return -a;
29 printf("%d\n", add(3, 4));
30 printf("%d\n", neg(-5)); // Set breakpoint 1 here.
32 int (^add_struct)(struct CG) = ^int(struct CG cg)
34 return cg.x + cg.y;
37 g(add_struct);
39 return 0;