diff options
Diffstat (limited to 'clang/test/Modules/Inputs')
-rw-r--r-- | clang/test/Modules/Inputs/stress1/common.h | 38 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/m00.h | 6 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/m01.h | 6 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/m02.h | 6 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/m03.h | 6 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/merge00.h | 11 | ||||
-rw-r--r-- | clang/test/Modules/Inputs/stress1/module.modulemap | 6 |
7 files changed, 79 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/stress1/common.h b/clang/test/Modules/Inputs/stress1/common.h new file mode 100644 index 00000000000..d2fff1098d9 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/common.h @@ -0,0 +1,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 diff --git a/clang/test/Modules/Inputs/stress1/m00.h b/clang/test/Modules/Inputs/stress1/m00.h new file mode 100644 index 00000000000..ca5af38f58c --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/m00.h @@ -0,0 +1,6 @@ +#ifndef STRESS1_M00_H +#define STRESS1_M00_H + +#include "common.h" + +#endif diff --git a/clang/test/Modules/Inputs/stress1/m01.h b/clang/test/Modules/Inputs/stress1/m01.h new file mode 100644 index 00000000000..d0b150a7382 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/m01.h @@ -0,0 +1,6 @@ +#ifndef STRESS1_M01_H +#define STRESS1_M01_H + +#include "common.h" + +#endif diff --git a/clang/test/Modules/Inputs/stress1/m02.h b/clang/test/Modules/Inputs/stress1/m02.h new file mode 100644 index 00000000000..bb9714ff747 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/m02.h @@ -0,0 +1,6 @@ +#ifndef STRESS1_M02_H +#define STRESS1_M02_H + +#include "common.h" + +#endif diff --git a/clang/test/Modules/Inputs/stress1/m03.h b/clang/test/Modules/Inputs/stress1/m03.h new file mode 100644 index 00000000000..b6dbb68ccd5 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/m03.h @@ -0,0 +1,6 @@ +#ifndef STRESS1_M03_H +#define STRESS1_M03_H + +#include "common.h" + +#endif diff --git a/clang/test/Modules/Inputs/stress1/merge00.h b/clang/test/Modules/Inputs/stress1/merge00.h new file mode 100644 index 00000000000..c6dccdf5305 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/merge00.h @@ -0,0 +1,11 @@ +#ifndef STRESS1_MERGE00_H +#define STRESS1_MERGE00_H + +#include "m00.h" +#include "m01.h" +#include "m02.h" +#include "m03.h" + +inline int g() { return N00::S00('a').method00('b') + (int)N00::S00(42) + function00(42); } + +#endif diff --git a/clang/test/Modules/Inputs/stress1/module.modulemap b/clang/test/Modules/Inputs/stress1/module.modulemap new file mode 100644 index 00000000000..2b687b01521 --- /dev/null +++ b/clang/test/Modules/Inputs/stress1/module.modulemap @@ -0,0 +1,6 @@ +module m00 { header "Inputs/stress1/m00.h" export * } +module m01 { header "Inputs/stress1/m01.h" export * } +module m02 { header "Inputs/stress1/m02.h" export * } +module m03 { header "Inputs/stress1/m03.h" export * } + +module merge00 { header "Inputs/stress1/merge00.h" export * } |