Handle nested structs.
typdef struct A { int i; struct A *next; } A


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43268 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/struct.c b/test/CodeGen/struct.c
index a3753d3..cc6f0aa 100644
--- a/test/CodeGen/struct.c
+++ b/test/CodeGen/struct.c
@@ -37,3 +37,21 @@
   else
     return 0;
 }
+
+/* Nested structs */
+typedef struct NA {
+  int data;
+  struct NA *next;
+} NA;
+void f1() {  A a; }
+
+typedef struct NB {
+  int d1;
+  struct _B2 {
+    int d2;
+    struct NB *n2;
+  } B2;
+} NB;
+
+void f2() { NB b; }
+