Skip to content

Commit 5c363c1

Browse files
committed
fixup! clang-format
1 parent 4045243 commit 5c363c1

File tree

1 file changed

+23
-31
lines changed
  • lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/function

1 file changed

+23
-31
lines changed
Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,43 @@
11
#include <functional>
22

3-
int foo(int x, int y) {
4-
return x + y - 1;
5-
}
3+
int foo(int x, int y) { return x + y - 1; }
64

75
struct Bar {
8-
int operator()() {
9-
return 66 ;
10-
}
11-
int add_num(int i) const { return i + 3 ; }
12-
int add_num2(int i) {
13-
std::function<int (int)> add_num2_f = [](int x) {
14-
return x+1;
15-
};
16-
17-
return add_num2_f(i); // Set break point at this line.
18-
}
19-
} ;
6+
int operator()() { return 66; }
7+
int add_num(int i) const { return i + 3; }
8+
int add_num2(int i) {
9+
std::function<int(int)> add_num2_f = [](int x) { return x + 1; };
10+
11+
return add_num2_f(i); // Set break point at this line.
12+
}
13+
};
2014

2115
int foo2() {
22-
auto f = [](int x) {
23-
return x+1;
24-
};
16+
auto f = [](int x) { return x + 1; };
2517

26-
std::function<int (int)> foo2_f = f;
18+
std::function<int(int)> foo2_f = f;
2719

28-
return foo2_f(10); // Set break point at this line.
20+
return foo2_f(10); // Set break point at this line.
2921
}
3022

31-
int main (int argc, char *argv[])
32-
{
23+
int main(int argc, char *argv[]) {
3324
int acc = 42;
34-
std::function<int (int,int)> f1 = foo;
35-
std::function<int (int)> f2 = [acc,f1] (int x) -> int {
36-
return x+f1(acc,x);
25+
std::function<int(int, int)> f1 = foo;
26+
std::function<int(int)> f2 = [acc, f1](int x) -> int {
27+
return x + f1(acc, x);
3728
};
3829

3930
auto f = [](int x, int y) { return x + y; };
40-
auto g = [](int x, int y) { return x * y; } ;
41-
std::function<int (int,int)> f3 = argc %2 ? f : g ;
31+
auto g = [](int x, int y) { return x * y; };
32+
std::function<int(int, int)> f3 = argc % 2 ? f : g;
4233

43-
Bar bar1 ;
44-
std::function<int ()> f4( bar1 ) ;
45-
std::function<int (const Bar&, int)> f5 = &Bar::add_num;
34+
Bar bar1;
35+
std::function<int()> f4(bar1);
36+
std::function<int(const Bar &, int)> f5 = &Bar::add_num;
4637

4738
int foo2_result = foo2();
4839
int bar_add_num2_result = bar1.add_num2(10);
4940

50-
return f1(acc,acc) + f2(acc) + f3(acc+1,acc+2) + f4() + f5(bar1, 10); // Set break point at this line.
41+
return f1(acc, acc) + f2(acc) + f3(acc + 1, acc + 2) + f4() +
42+
f5(bar1, 10); // Set break point at this line.
5143
}

0 commit comments

Comments
 (0)