summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/stress1/common.h
blob: d2fff1098d925e9fcf6f718491acc6cc93d62c08 (plain)
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
#ifndef STRESS1_COMMON_H
#define STRESS1_COMMON_H

inline char function00(char x) { return x + x; }
inline short function00(short x) { return x + x; }
inline int function00(int x) { return x + x; }

namespace N00 {
struct S00 {
  char c;
  short s;
  int i;

  S00(char x) : c(x) {}
  S00(short x) : s(x) {}
  S00(int x) : i(x) {}

  char method00(char x) { return x + x; }
  short method00(short x) { return x + x; }
  int method00(int x) { return x + x; }

  operator char() { return c; }
  operator short() { return s; }
  operator int() { return i; }
};
struct S01 {};
struct S03 {};
}

namespace N01 {
struct S00 : N00::S00 {
  using N00::S00::S00;
};
struct S01 {};
struct S02 {};
}

#endif
OpenPOWER on IntegriCloud