When we attempt to create a built-in that involves a library type we
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122744 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/implicit-builtin-decl.c b/test/Sema/implicit-builtin-decl.c
index 9e01de1..d80414d 100644
--- a/test/Sema/implicit-builtin-decl.c
+++ b/test/Sema/implicit-builtin-decl.c
@@ -22,7 +22,7 @@
 }
 
 void f2() {
-  fprintf(0, "foo"); // expected-error{{implicit declaration of 'fprintf' requires inclusion of the header <stdio.h>}} \
+  fprintf(0, "foo"); // expected-warning{{declaration of built-in function 'fprintf' requires inclusion of the header <stdio.h>}} \
    expected-warning {{implicit declaration of function 'fprintf' is invalid in C99}}
 }
 
@@ -52,3 +52,6 @@
 }
 
 void snprintf() { }
+
+// PR8316
+void longjmp(); // expected-warning{{declaration of built-in function 'longjmp' requires inclusion of the header <setjmp.h>}}