Home | History | Annotate | Download | only in Modules
      1 // 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
      7 template <class, class _Allocator>
      8 class __vector_base {
      9 protected:
     10   _Allocator __alloc() const;
     11   __vector_base(_Allocator);
     12 };
     13 
     14 template <class _Tp, class _Allocator = allocator>
     15 class vector : __vector_base<_Tp, _Allocator> {
     16 public:
     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 
     23 template <class _Tp, class _Allocator>
     24 vector<_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"
     36 CommentOptions fn1() { return fn1(); }
     37 
     38 // expected-no-diagnostics
     39