[clang] Fix implicit integer conversion for opaque enums declared in class templates...
[llvm-project.git] / lldb / test / API / commands / command / script / main.cpp
blobb953498b0d37b24a144bc91050120dd45eadf6fc
1 #include <cstdlib>
2 #include <cstring>
3 #include <string>
4 #include <fstream>
5 #include <iostream>
7 int
8 product (int x, int y)
10 int result = x * y;
11 return result;
14 int
15 sum (int a, int b)
17 int result = a + b;
18 return result;
21 int
22 strange_max (int m, int n)
24 if (m > n)
25 return m;
26 else if (n > m)
27 return n;
28 else
29 return 0;
32 int
33 foo (int i, int j)
35 if (strange_max (i, j) == i)
36 return product (i, j);
37 else if (strange_max (i, j) == j)
38 return sum (i, j);
39 else
40 return product (sum (i, i), sum (j, j));
43 int
44 main(int argc, char const *argv[])
47 int array[9];
48 memset(array,0,9*sizeof(int));
50 array[0] = foo (1238, 78392);
51 array[1] = foo (379265, 23674);
52 array[2] = foo (872934, 234);
53 array[3] = foo (1238, 78392);
54 array[4] = foo (379265, 23674);
55 array[5] = foo (872934, 234);
56 array[6] = foo (1238, 78392);
57 array[7] = foo (379265, 23674);
58 array[8] = foo (872934, 234);
60 return 0;