Fix PR18307: Properly (de)serialize inherited constructors and their using declarations
Reviewed in http://llvm-reviews.chandlerc.com/D3102
llvm-svn: 204951
diff --git a/clang/test/PCH/cxx11-inheriting-ctors.cpp b/clang/test/PCH/cxx11-inheriting-ctors.cpp
new file mode 100644
index 0000000..79f78ba
--- /dev/null
+++ b/clang/test/PCH/cxx11-inheriting-ctors.cpp
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
+
+// expected-no-diagnostics
+
+#ifndef HEADER_INCLUDED
+#define HEADER_INCLUDED
+
+struct Base {
+ Base(int) {}
+
+ template <typename T>
+ Base(T) {}
+};
+
+struct Test : Base {
+ using Base::Base;
+};
+
+template <typename T>
+struct Test2 : Base {
+ using Base::Base;
+};
+
+template <typename B>
+struct Test3 : B {
+ using B::B;
+};
+
+#else
+
+Test test1a(42);
+Test test1b(nullptr);
+Test2<int> test2a(42);
+Test2<int> test2b(nullptr);
+Test3<Base> test3a(42);
+Test3<Base> test3b(nullptr);
+
+#endif // HEADER_INCLUDED