Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -Wall -verify %s |
John McCall | d0b7839 | 2009-08-29 08:20:44 +0000 | [diff] [blame] | 2 | template<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 | |
| 21 | A<int>::B<int>::C<int>::D<int>::E<int> global; |
Douglas Gregor | 1fe6b91 | 2009-11-04 17:16:11 +0000 | [diff] [blame] | 22 | |
| 23 | // PR5352 |
| 24 | template <typename T> |
| 25 | class Foo { |
| 26 | public: |
| 27 | Foo() {} |
| 28 | |
| 29 | struct Bar { |
| 30 | T value; |
| 31 | }; |
| 32 | |
| 33 | Bar u; |
| 34 | }; |
| 35 | |
| 36 | template class Foo<int>; |