add a bunch of missing prototypes to tests


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93072 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/attr-noreturn.c b/test/Sema/attr-noreturn.c
index 0966989..3f064a0 100644
--- a/test/Sema/attr-noreturn.c
+++ b/test/Sema/attr-noreturn.c
@@ -2,6 +2,8 @@
 
 static void (*fp0)(void) __attribute__((noreturn));
 
+void fatal();
+
 static void __attribute__((noreturn)) f0(void) {
   fatal();
 } // expected-warning {{function declared 'noreturn' should not return}}
diff --git a/test/Sema/block-labels.c b/test/Sema/block-labels.c
index af364b4..353a570 100644
--- a/test/Sema/block-labels.c
+++ b/test/Sema/block-labels.c
@@ -1,5 +1,7 @@
 // RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only
 
+void xx();
+
 int a() { 
   A:if (1) xx();
   return ^{A:return 1;}();
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index c1a2f08..52cebfe 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -64,6 +64,7 @@
 }
 
 
+void bar(void*);
 // rdar://6257721 - reference to static/global is byref by default.
 static int test5g;
 void test5() {
@@ -157,6 +158,8 @@
   __block int (*ap)[size]; // expected-error {{__block attribute not allowed on declaration with a variably modified type}}
 }
 
+void f();
+
 void test17() {
   void (^bp)(int);
   void (*rp)(int);
diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c
index 4240b09..6416545 100644
--- a/test/Sema/block-return.c
+++ b/test/Sema/block-return.c
@@ -76,6 +76,7 @@
   else 
     return 0;
 }
+void next();
 void foo4() {
   int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(char *)', expected 'int (^)(char const *)'}}
   int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (char *)', expected 'int (*)(char const *)'}}
diff --git a/test/Sema/conditional.c b/test/Sema/conditional.c
index e67580a..c3dbe13 100644
--- a/test/Sema/conditional.c
+++ b/test/Sema/conditional.c
@@ -3,6 +3,7 @@
 const char* test1 = 1 ? "i" : 1 == 1 ? "v" : "r";
 
 void _efree(void *ptr);
+void free(void *ptr);
 
 int _php_stream_free1() {
   return (1 ? free(0) : _efree(0)); // expected-error {{incompatible type returning 'void', expected 'int'}}
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 67081b5..20e4dcd 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -8,6 +8,7 @@
 int snprintf(char *restrict, size_t, const char *restrict, ...);
 int sprintf(char *restrict, const char *restrict, ...);
 int vasprintf(char **, const char *, va_list);
+int asprintf(char **, const char *, ...);
 int vfprintf(FILE *, const char *restrict, va_list);
 int vprintf(const char *restrict, va_list);
 int vsnprintf(char *, size_t, const char *, va_list);
diff --git a/test/Sema/implicit-builtin-decl.c b/test/Sema/implicit-builtin-decl.c
index 09ecd23..3d92038 100644
--- a/test/Sema/implicit-builtin-decl.c
+++ b/test/Sema/implicit-builtin-decl.c
@@ -22,7 +22,8 @@
 }
 
 void f2() {
-  fprintf(0, "foo"); // expected-error{{implicit declaration of 'fprintf' requires inclusion of the header <stdio.h>}}
+  fprintf(0, "foo"); // expected-error{{implicit declaration of 'fprintf' requires inclusion of the header <stdio.h>}} \
+   expected-warning {{implicit declaration of function 'fprintf' is invalid in C99}}
 }
 
 // PR2892
diff --git a/test/Sema/implicit-decl.c b/test/Sema/implicit-decl.c
index fc48895..830cde9 100644
--- a/test/Sema/implicit-decl.c
+++ b/test/Sema/implicit-decl.c
@@ -7,7 +7,8 @@
    int32_t *vector[16];
    const char compDesc[16 + 1];
    int32_t compCount = 0;
-   if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}}
+   if (_CFCalendarDecomposeAbsoluteTimeV(compDesc, vector, compCount)) { // expected-note {{previous implicit declaration is here}} \
+         expected-warning {{implicit declaration of function '_CFCalendarDecomposeAbsoluteTimeV' is invalid in C99}}
    }
    return ((void *)0); // expected-warning {{void function 'func' should not return a value}}
 }