aboutsummaryrefslogtreecommitdiffstats
path: root/test/callexpr.cpp
blob: db9670983e06d38ecbc42f6a7663a40c60a8a8ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace callexpr_ns{
int testFunction(int a, int b) { return a + b; }

class testClass {
public:
  testClass() = default;
  int testMemberFunction(int a, int b) { return a + b; }

private:
  /* data */
};

struct testStruct {
public:
  testStruct() = default;
  int a;
  int b;
  char *c;
  int testMemberFunctionn(int a, int b) { return a + b; }
};
} // namespace

int __attribute__((weak)) main(int argc, char *argv[]) {
  int a = 10;
  int b = 10;
  callexpr_ns::testFunction(a, b);
  callexpr_ns::testClass tc;
  tc.testMemberFunction(a, b);
  callexpr_ns::testStruct ts;
  ts.testMemberFunctionn(a, b);

  return 0;
}