Simplify the way in which we inject the names of tag definitions and
elaborated-type-specifier declarations into outer scopes while
retaining their proper lexical scope. This way is simpler and more
consistent with the way DeclContexts work, and also fixes

  http://llvm.org/bugs/show_bug.cgi?id=3430


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63581 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
index 7d7961b..ec006b4 100644
--- a/test/Sema/struct-decl.c
+++ b/test/Sema/struct-decl.c
@@ -1,5 +1,4 @@
 // RUN: clang -fsyntax-only -verify %s
-
 // PR3459
 struct bar {
 	char n[1];
@@ -9,3 +8,17 @@
 	char name[(int)&((struct bar *)0)->n];
 	char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{fields must have a constant size}}
 };
+
+// PR3430
+struct s {
+        struct st {
+                int v;
+        } *ts;
+};
+
+struct st;
+
+int foo() {
+        struct st *f;
+        return f->v + f[0].v;
+}