Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type). 
Fixes <rdar://problem/6500531>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/incomplete-decl.c b/test/Sema/incomplete-decl.c
index fedf2c6..bd60368 100644
--- a/test/Sema/incomplete-decl.c
+++ b/test/Sema/incomplete-decl.c
@@ -1,5 +1,7 @@
 // RUN: clang -fsyntax-only -verify %s
 
+struct foo; // expected-note {{forward declaration of 'struct foo'}}
+
 void b;  // expected-error {{variable has incomplete type 'void'}}
 struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}