xref: /llvm-project/lldb/test/API/functionalities/breakpoint/breakpoint_by_line_and_column/main.cpp (revision 35ecfda01ccd19e1222c065056f68bbd2575e4ac)

this_is_a_very_long_function_with_a_bunch_of_arguments(int first,int second,int third,int fourth,int fifth)1 static int this_is_a_very_long_function_with_a_bunch_of_arguments(
2     int first, int second, int third, int fourth, int fifth) {
3   int result = first + second + third + fourth + fifth;
4   return result;
5 }
6 
square(int x)7 int square(int x) { return x * x; }
8 
main(int argc,char const * argv[])9 int main(int argc, char const *argv[]) {
10   // This is a random comment.
11   int did_call = 0;
12 
13   int first = 1;
14   int second = 2;
15   int third = 3;
16   int fourth = 4;
17   int fifth = 5;
18 
19   //                                    v In the middle of a function name (col:42)
20   int result = this_is_a_very_long_function_with_a_bunch_of_arguments(
21       first, second, third, fourth, fifth);
22 
23   //                  v In the middle of the lambda declaration argument (col:23)
24   auto lambda = [&](int n) {
25   //                     v Inside the lambda (col:26)
26     return first + third * n;
27   };
28 
29   result = lambda(3);
30 
31   //                                             v At the beginning of a function name (col:50)
32   if(square(argc+1) != 0) { did_call = 1; return square(argc); }
33 
34   return square(0);
35 }
36