diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:25:37 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-01-24 20:25:37 +0000 |
| commit | 520a89e9d38bb1c9cc2de3f875eae3ac69f9f08a (patch) | |
| tree | 54fe8463a6692d6f8706ee98bffde249b43eed0c /test/Modules/Inputs | |
| parent | ead8c8e4f12a52fe33a395d4dce984c89ab04a77 (diff) | |
Notes
Diffstat (limited to 'test/Modules/Inputs')
| -rw-r--r-- | test/Modules/Inputs/DebugCXX.h | 3 | ||||
| -rw-r--r-- | test/Modules/Inputs/odr_hash-Friend/Box.h | 14 | ||||
| -rw-r--r-- | test/Modules/Inputs/odr_hash-Friend/M1.h | 6 | ||||
| -rw-r--r-- | test/Modules/Inputs/odr_hash-Friend/M2.h | 5 | ||||
| -rw-r--r-- | test/Modules/Inputs/odr_hash-Friend/M3.h | 7 | ||||
| -rw-r--r-- | test/Modules/Inputs/odr_hash-Friend/module.modulemap | 15 |
6 files changed, 50 insertions, 0 deletions
diff --git a/test/Modules/Inputs/DebugCXX.h b/test/Modules/Inputs/DebugCXX.h index 1ccf8d302f13..8f83c0bc69db 100644 --- a/test/Modules/Inputs/DebugCXX.h +++ b/test/Modules/Inputs/DebugCXX.h @@ -1,4 +1,7 @@ /* -*- C++ -*- */ + +#include "dummy.h" + namespace DebugCXX { // Records. struct Struct { diff --git a/test/Modules/Inputs/odr_hash-Friend/Box.h b/test/Modules/Inputs/odr_hash-Friend/Box.h new file mode 100644 index 000000000000..01ab90d601c2 --- /dev/null +++ b/test/Modules/Inputs/odr_hash-Friend/Box.h @@ -0,0 +1,14 @@ +template <class T> +struct iterator { + void Compare(const iterator &x) { } + friend void Check(iterator) {} +}; + +template <class T = int> struct Box { + iterator<T> I; + + void test() { + Check(I); + I.Compare(I); + } +}; diff --git a/test/Modules/Inputs/odr_hash-Friend/M1.h b/test/Modules/Inputs/odr_hash-Friend/M1.h new file mode 100644 index 000000000000..202ad06c3488 --- /dev/null +++ b/test/Modules/Inputs/odr_hash-Friend/M1.h @@ -0,0 +1,6 @@ +#include "Box.h" + +void Peek() { + Box<> Gift; + Gift.test(); +} diff --git a/test/Modules/Inputs/odr_hash-Friend/M2.h b/test/Modules/Inputs/odr_hash-Friend/M2.h new file mode 100644 index 000000000000..69f08a957ede --- /dev/null +++ b/test/Modules/Inputs/odr_hash-Friend/M2.h @@ -0,0 +1,5 @@ +#include "Box.h" +void x() { + Box<> Unused; + //Unused.test(); +} diff --git a/test/Modules/Inputs/odr_hash-Friend/M3.h b/test/Modules/Inputs/odr_hash-Friend/M3.h new file mode 100644 index 000000000000..ab457e0c08f2 --- /dev/null +++ b/test/Modules/Inputs/odr_hash-Friend/M3.h @@ -0,0 +1,7 @@ +#include "Box.h" +#include "M2.h" + +void Party() { + Box<> Present; + Present.test(); +} diff --git a/test/Modules/Inputs/odr_hash-Friend/module.modulemap b/test/Modules/Inputs/odr_hash-Friend/module.modulemap new file mode 100644 index 000000000000..28e1832e30e9 --- /dev/null +++ b/test/Modules/Inputs/odr_hash-Friend/module.modulemap @@ -0,0 +1,15 @@ +module Box { + header "Box.h" +} + +module Module1 { + header "M1.h" +} + +module Module2 { + header "M2.h" +} + +module Module3 { + header "M3.h" +} |
