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/SemaObjC/ivar-sem-check-1.m b/test/SemaObjC/ivar-sem-check-1.m
index a6d1a22..1ec4e57 100644
--- a/test/SemaObjC/ivar-sem-check-1.m
+++ b/test/SemaObjC/ivar-sem-check-1.m
@@ -1,19 +1,19 @@
 // RUN: clang -fsyntax-only -verify %s
 
-struct S;
+struct S; // expected-note{{forward declaration of 'struct S'}}
 typedef int FOO();
 
 @interface INTF
 {
 	struct F {} JJ;
-	int arr[];  // expected-error {{field 'arr' has incomplete type}}
-	struct S IC;  // expected-error {{field 'IC' has incomplete type}}
+	int arr[];  // expected-error {{field has incomplete type}}
+	struct S IC;  // expected-error {{field has incomplete type}}
 	struct T { // expected-note {{previous definition is here}}
 	  struct T {} X;  // expected-error {{nested redefinition of 'T'}}
 	}YYY; 
 	FOO    BADFUNC;  // expected-error {{field 'BADFUNC' declared as a function}}
 	int kaka;	// expected-note {{previous declaration is here}}
 	int kaka;	// expected-error {{duplicate member 'kaka'}}
-	char ch[];	// expected-error {{field 'ch' has incomplete type}}
+	char ch[];	// expected-error {{field has incomplete type}}
 }
 @end