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). --- clang/test/SemaTemplate/instantiate-deeply.cpp | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 clang/test/SemaTemplate/instantiate-deeply.cpp (limited to 'clang/test/SemaTemplate/instantiate-deeply.cpp') diff --git a/clang/test/SemaTemplate/instantiate-deeply.cpp b/clang/test/SemaTemplate/instantiate-deeply.cpp new file mode 100644 index 0000000..c5f6594 --- /dev/null +++ b/clang/test/SemaTemplate/instantiate-deeply.cpp @@ -0,0 +1,36 @@ +// RUN: %clang_cc1 -fsyntax-only -Wall -verify %s +template struct A { + template struct B { + template struct C { + template struct D { + template struct E { + e field; + E() : field(0) { + d v1 = 4; + c v2 = v1 * v1; + b v3 = 8; + a v4 = v3 * v3; + field += v2 + v4; + } + }; + }; + }; + }; +}; + +A::B::C::D::E global; + +// PR5352 +template +class Foo { +public: + Foo() {} + + struct Bar { + T value; + }; + + Bar u; +}; + +template class Foo; -- cgit v1.2.3