aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/Inputs/ctu-other.cpp
blob: 8cad861578b49ecc60e37708184cd5bbd036d12a (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "../ctu-hdr.h"

int callback_to_main(int x);
int f(int x) {
  return x - 1;
}

int g(int x) {
  return callback_to_main(x) + 1;
}

int h_chain(int);

int h(int x) {
  return 2 * h_chain(x);
}

namespace myns {
int fns(int x) {
  return x + 7;
}

namespace embed_ns {
int fens(int x) {
  return x - 3;
}
}

class embed_cls {
public:
  int fecl(int x) {
    return x - 7;
  }
};
}

class mycls {
public:
  int fcl(int x) {
    return x + 5;
  }
  static int fscl(int x) {
    return x + 6;
  }

  class embed_cls2 {
  public:
    int fecl2(int x) {
      return x - 11;
    }
  };
};

namespace chns {
int chf2(int x);

class chcls {
public:
  int chf4(int x);
};

int chf3(int x) {
  return chcls().chf4(x);
}

int chf1(int x) {
  return chf2(x);
}
}

typedef struct { int n; } Anonymous;
int fun_using_anon_struct(int n) { Anonymous anon; anon.n = n; return anon.n; }

int other_macro_diag(int x) {
  MACRODIAG();
  return x;
}