Douglas Gregor | e919fb0 | 2009-05-27 17:07:49 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s |
| 2 | |
| 3 | namespace N { |
| 4 | struct Outer { |
| 5 | struct Inner { |
| 6 | template<typename T> |
| 7 | struct InnerTemplate { |
| 8 | struct VeryInner { |
| 9 | typedef T type; |
| 10 | |
| 11 | static enum K1 { K1Val = sizeof(T) } Kind1; |
Douglas Gregor | 8d71743 | 2009-05-27 17:20:35 +0000 | [diff] [blame^] | 12 | static enum { K2Val = sizeof(T)*2 } Kind2; |
Douglas Gregor | e919fb0 | 2009-05-27 17:07:49 +0000 | [diff] [blame] | 13 | |
| 14 | void foo() { |
| 15 | K1 k1 = K1Val; |
| 16 | Kind1 = K1Val; |
| 17 | Outer::Inner::InnerTemplate<type>::VeryInner::Kind2 = K2Val; |
| 18 | } |
| 19 | }; |
| 20 | }; |
| 21 | }; |
| 22 | }; |
| 23 | } |
| 24 | |
| 25 | typedef int INT; |
| 26 | template struct N::Outer::Inner::InnerTemplate<INT>::VeryInner; |