diff options
Diffstat (limited to 'test/PCH/cxx-friends.h')
-rw-r--r-- | test/PCH/cxx-friends.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/PCH/cxx-friends.h b/test/PCH/cxx-friends.h index 05dcc96..2d20a4d 100644 --- a/test/PCH/cxx-friends.h +++ b/test/PCH/cxx-friends.h @@ -16,3 +16,28 @@ namespace PR12585 { int k; }; } + +namespace Lazy { + struct S { + friend void doNotDeserialize(); + }; +} + +// Reduced testcase from libc++'s <valarray>. Used to crash with modules +// enabled. +namespace std { + +template <class T> struct valarray; + +template <class T> struct valarray { + valarray(); + template <class U> friend struct valarray; + template <class U> friend U *begin(valarray<U> &v); +}; + +struct gslice { + valarray<int> size; + gslice() {} +}; + +} |