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