blob: 7d5479cb92434f5871f5f6017be56c9127e2be52 [file] [log] [blame]
Vassil Vassilev928c8252016-04-28 14:13:28 +00001// RUN: rm -rf %t
2// RUN: %clang_cc1 -std=c++11 -I%S/Inputs/PR27401 -verify %s
3// RUN: %clang_cc1 -std=c++11 -fmodules -fmodule-map-file=%S/Inputs/PR27401/module.modulemap -fmodules-cache-path=%t -I%S/Inputs/PR27401 -verify %s
4
5#include "a.h"
6#define _LIBCPP_VECTOR
7template <class, class _Allocator>
8class __vector_base {
9protected:
10 _Allocator __alloc() const;
11 __vector_base(_Allocator);
12};
13
14template <class _Tp, class _Allocator = allocator>
15class vector : __vector_base<_Tp, _Allocator> {
16public:
17 vector() noexcept(is_nothrow_default_constructible<_Allocator>::value);
18 vector(const vector &);
19 vector(vector &&)
20 noexcept(is_nothrow_move_constructible<_Allocator>::value);
21};
22
23template <class _Tp, class _Allocator>
24vector<_Tp, _Allocator>::vector(const vector &__x) : __vector_base<_Tp, _Allocator>(__x.__alloc()) {}
25
26 struct CommentOptions {
27 vector<char> ParseAllComments;
28 CommentOptions() {}
29 };
30 struct PrintingPolicy {
31 PrintingPolicy(CommentOptions LO) : LangOpts(LO) {}
32 CommentOptions LangOpts;
33 };
34
35#include "b.h"
36CommentOptions fn1() { return fn1(); }
37
38// expected-no-diagnostics