From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- .../SemaTemplate/dependent-base-member-init.cpp | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 clang/test/SemaTemplate/dependent-base-member-init.cpp (limited to 'clang/test/SemaTemplate/dependent-base-member-init.cpp') diff --git a/clang/test/SemaTemplate/dependent-base-member-init.cpp b/clang/test/SemaTemplate/dependent-base-member-init.cpp new file mode 100644 index 0000000..1d4fed3 --- /dev/null +++ b/clang/test/SemaTemplate/dependent-base-member-init.cpp @@ -0,0 +1,68 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// PR4381 +template struct X {}; +template struct Y : public X::X { }; + +// PR4621 +class A1 { + A1(int x) {} +}; +template class B1 : public A1 { + B1(C x) : A1(x.x) {} +}; +class A2 { A2(int x, int y); }; +template class B2 { + A2 x; + B2(C x) : x(x.x, x.y) {} +}; +template class B3 { + C x; + B3() : x(1,2) {} +}; + +// PR4627 +template class insert_iterator { + _Container* container; + insert_iterator(_Container& __x) : container(&__x) {} +}; + +// PR4763 +template struct s0 {}; +template struct s0_traits {}; +template struct s1 : s0::t0> { + s1() {} +}; + +// PR6062 +namespace PR6062 { + template + class A : public T::type + { + A() : T::type() + { + } + + template + A(U const& init) + : T::type(init) + { } + + template + A(U& init) : U::other_type(init) { } + }; +} + +template +struct X0 : T::template apply { + X0(int i) : T::template apply(i) { } +}; + +// PR7698 +namespace PR7698 { + template + class A { + char mA[sizeof(Type *)]; + A(): mA() {} + }; +} -- cgit v1.2.3