xref: /llvm-project/lldb/test/API/commands/expression/anonymous-struct/main.cpp (revision 99451b4453688a94c6014cac233d371ab4cc342d)
1 #include <tgmath.h>
2 
3 typedef struct {
4     float f;
5     int i;
6 } my_untagged_struct;
7 
8 double multiply(my_untagged_struct *s)
9 {
10     return s->f * s->i;
11 }
12 
13 double multiply(my_untagged_struct *s, int x)
14 {
15     return multiply(s) * x;
16 }
17 
18 int main(int argc, char **argv)
19 {
20     my_untagged_struct s = {
21         .f = (float)argc,
22         .i = argc,
23     };
24     // lldb testsuite break
25     return !(multiply(&s, argc) == pow(argc, 3));
26 }
27