aboutsummaryrefslogtreecommitdiffstats
path: root/test/cxxmembercallexpr.cpp
blob: 8d34dd5cd6b59ea846aee5fe65184f6388487160 (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
namespace cxxmembercallexpr_ns{
class testClass {
public:
  testClass() = default;
  int testFunction(int a, int b) { return a + b; }

private:
};

struct testStruct {
public:
  testStruct() = default;
  int testFunction(int a, int b) {
    return a + b;
  };
};
} // namespace

int __attribute__((weak)) main(int argc, char *argv[]) {
  int a = 10;
  int b = 10;
  cxxmembercallexpr_ns::testClass tc;
  tc.testFunction(a, b);
  cxxmembercallexpr_ns::testStruct ts;
  ts.testFunction(a, b);
  return 0;
}