blob: c5f65945afcbc9bbfd822edffab16ddecd681618 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -Wall -verify %s
John McCalld0b78392009-08-29 08:20:44 +00002template<typename a> struct A {
3 template <typename b> struct B {
4 template <typename c> struct C {
5 template <typename d> struct D {
6 template <typename e> struct E {
7 e field;
8 E() : field(0) {
9 d v1 = 4;
10 c v2 = v1 * v1;
11 b v3 = 8;
12 a v4 = v3 * v3;
13 field += v2 + v4;
14 }
15 };
16 };
17 };
18 };
19};
20
21A<int>::B<int>::C<int>::D<int>::E<int> global;
Douglas Gregor1fe6b912009-11-04 17:16:11 +000022
23// PR5352
24template <typename T>
25class Foo {
26public:
27 Foo() {}
28
29 struct Bar {
30 T value;
31 };
32
33 Bar u;
34};
35
36template class Foo<int>;