Home | History | Annotate | Download | only in PCH
      1 // RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
      2 // RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
      3 
      4 // expected-no-diagnostics
      5 
      6 #ifndef HEADER_INCLUDED
      7 #define HEADER_INCLUDED
      8 
      9 struct Base {
     10   Base(int) {}
     11 
     12   template <typename T>
     13   Base(T) {}
     14 };
     15 
     16 struct Test : Base {
     17   using Base::Base;
     18 };
     19 
     20 template <typename T>
     21 struct Test2 : Base {
     22   using Base::Base;
     23 };
     24 
     25 template <typename B>
     26 struct Test3 : B {
     27   using B::B;
     28 };
     29 
     30 #else
     31 
     32 Test test1a(42);
     33 Test test1b(nullptr);
     34 Test2<int> test2a(42);
     35 Test2<int> test2b(nullptr);
     36 Test3<Base> test3a(42);
     37 Test3<Base> test3b(nullptr);
     38 
     39 #endif // HEADER_INCLUDED
     40