[cfe-commits] r80426 - /cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp

John McCall rjmccall at apple.com
Sat Aug 29 01:20:44 PDT 2009


Author: rjmccall
Date: Sat Aug 29 03:20:44 2009
New Revision: 80426

URL: http://llvm.org/viewvc/llvm-project?rev=80426&view=rev
Log:
Test case.


Added:
    cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp

Added: cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp?rev=80426&view=auto

==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp (added)
+++ cfe/trunk/test/SemaTemplate/instantiate-deeply.cpp Sat Aug 29 03:20:44 2009
@@ -0,0 +1,22 @@
+// RUN: clang-cc -fsyntax-only -Wall -verify %s
+
+template<typename a> struct A {
+  template <typename b> struct B {
+    template <typename c> struct C {
+      template <typename d> struct D {
+        template <typename e> 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<int>::B<int>::C<int>::D<int>::E<int> global;





More information about the cfe-commits mailing list