diff options
Diffstat (limited to 'clang/test/Modules/Inputs')
| -rw-r--r-- | clang/test/Modules/Inputs/PR27401/a.h | 17 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/PR27401/b.h | 21 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/PR27401/module.modulemap | 1 |
3 files changed, 39 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/PR27401/a.h b/clang/test/Modules/Inputs/PR27401/a.h new file mode 100644 index 00000000000..63d6b707f46 --- /dev/null +++ b/clang/test/Modules/Inputs/PR27401/a.h @@ -0,0 +1,17 @@ +#ifndef _LIBCPP_ALGORITHM +#define _LIBCPP_ALGORITHM +template <class _Tp, _Tp> +struct integral_constant { + static const _Tp value = _Tp(); +}; + +template <class _Tp> +struct is_nothrow_default_constructible + : integral_constant<bool, __is_constructible(_Tp)> {}; + +template <class _Tp> +struct is_nothrow_move_constructible + : integral_constant<bool, __is_constructible(_Tp, _Tp)> {}; + +class allocator {}; +#endif diff --git a/clang/test/Modules/Inputs/PR27401/b.h b/clang/test/Modules/Inputs/PR27401/b.h new file mode 100644 index 00000000000..2b4e7f14fbb --- /dev/null +++ b/clang/test/Modules/Inputs/PR27401/b.h @@ -0,0 +1,21 @@ +#include "a.h" +#ifndef _LIBCPP_VECTOR +template <class, class _Allocator> +class __vector_base { +protected: + _Allocator __alloc() const; + __vector_base(_Allocator); +}; + +template <class _Tp, class _Allocator = allocator> +class vector : __vector_base<_Tp, _Allocator> { +public: + vector() noexcept(is_nothrow_default_constructible<_Allocator>::value); + vector(const vector &); + vector(vector &&) + noexcept(is_nothrow_move_constructible<_Allocator>::value); +}; + +#endif +void GetUniquePtrType() { vector<char> v; } + diff --git a/clang/test/Modules/Inputs/PR27401/module.modulemap b/clang/test/Modules/Inputs/PR27401/module.modulemap new file mode 100644 index 00000000000..a0efadaa0ea --- /dev/null +++ b/clang/test/Modules/Inputs/PR27401/module.modulemap @@ -0,0 +1 @@ +module "b" { header "b.h" export * } |

