Correct printing of nested anonymous type member accesses.

Patch by Florent Bruneau!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167736 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/ast-print.c b/test/Sema/ast-print.c
index ff66d35..2066e18 100644
--- a/test/Sema/ast-print.c
+++ b/test/Sema/ast-print.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -ast-print
+// RUN: %clang_cc1 %s -ast-print | FileCheck %s
 
 typedef void func_typedef();
 func_typedef xxx;
@@ -6,3 +6,15 @@
 typedef void func_t(int x);
 func_t a;
 
+struct blah {
+  struct {
+    struct {
+      int b;
+    };
+  };
+};
+
+int foo(const struct blah *b) {
+  // CHECK: return b->b;
+  return b->b;
+}