Make sure to use RequireCompleteType rather than testing for
incomplete types. RequireCompleteType is needed when the type may be
completed by instantiating a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/function.c b/test/Sema/function.c
index c240896..aec76a2 100644
--- a/test/Sema/function.c
+++ b/test/Sema/function.c
@@ -59,4 +59,5 @@
   register void f2register(int); // expected-error{{illegal storage class on function}}
 }
 
-struct incomplete_test a(void) {} // expected-error{{result type for function definition cannot be incomplete}}
+struct incomplete_test a(void) {} // expected-error{{incomplete result type 'struct incomplete_test' in function definition}} \
+    // expected-note{{forward declaration of 'struct incomplete_test'}}
diff --git a/test/Sema/typecheck-binop.c b/test/Sema/typecheck-binop.c
index 496bdd3..f5bdcbb 100644
--- a/test/Sema/typecheck-binop.c
+++ b/test/Sema/typecheck-binop.c
@@ -1,6 +1,6 @@
 /* RUN: clang-cc %s -fsyntax-only -pedantic -verify
  */
-struct incomplete;
+struct incomplete; // expected-note{{forward declaration of 'struct incomplete'}}
 
 int sub1(int *a, double *b) { 
   return a - b;    /* expected-error{{not pointers to compatible types}} */
@@ -18,6 +18,10 @@
   return P-Q;      /* expected-warning{{GNU void* extension}} */
 }
 
+int sub5(void *P, int *Q) {
+  return P-Q;      /* expected-error{{not pointers to compatible types}} */
+}
+
 int logicaland1(int a) {
   return a && (void)a; /* expected-error{{invalid operands}} */
 }