blob: 8db3bbb0094afbcc5a71e42d3422d84fb14c2a63 [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
Richard Smith600adef2018-07-04 02:25:38 +00004// 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 -triple i686-windows
Vassil Vassilev928c8252016-04-28 14:13:28 +00005
6#include "a.h"
7#define _LIBCPP_VECTOR
8template <class, class _Allocator>
9class __vector_base {
10protected:
11 _Allocator __alloc() const;
12 __vector_base(_Allocator);
13};
14
15template <class _Tp, class _Allocator = allocator>
16class vector : __vector_base<_Tp, _Allocator> {
17public:
18 vector() noexcept(is_nothrow_default_constructible<_Allocator>::value);
19 vector(const vector &);
20 vector(vector &&)
21 noexcept(is_nothrow_move_constructible<_Allocator>::value);
22};
23
24template <class _Tp, class _Allocator>
25vector<_Tp, _Allocator>::vector(const vector &__x) : __vector_base<_Tp, _Allocator>(__x.__alloc()) {}
26
27 struct CommentOptions {
28 vector<char> ParseAllComments;
29 CommentOptions() {}
30 };
31 struct PrintingPolicy {
32 PrintingPolicy(CommentOptions LO) : LangOpts(LO) {}
33 CommentOptions LangOpts;
34 };
35
36#include "b.h"
37CommentOptions fn1() { return fn1(); }
38
39// expected-no-diagnostics