Tim Northover | a2ee433 | 2014-03-29 15:09:45 +0000 | [diff] [blame] | 1 | // RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only %s -Xclang -verify |
| 2 | // RUN: %clang -target x86_64-apple-darwin -arch arm64 -target x86_64-apple-darwin -mios-version-min=7 -fsyntax-only %s -Xclang -verify |
Tim Northover | 935d79b | 2015-11-02 21:14:48 +0000 | [diff] [blame^] | 3 | // RUN: %clang -target armv7k-apple-watchos -arch armv7k -target armv7k-apple-watchos -fsyntax-only %s -Xclang -verify |
Tim Northover | a2ee433 | 2014-03-29 15:09:45 +0000 | [diff] [blame] | 4 | |
| 5 | // For 64-bit iOS, automatically promote -Wimplicit-function-declaration |
| 6 | // to an error. |
| 7 | |
| 8 | void radar_10894044() { |
Ed Schouten | e8eab68 | 2015-09-04 16:07:39 +0000 | [diff] [blame] | 9 | printf("Hi\n"); // expected-error {{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} expected-note {{include the header <stdio.h> or explicitly provide a declaration for 'printf'}} |
Tim Northover | a2ee433 | 2014-03-29 15:09:45 +0000 | [diff] [blame] | 10 | radar_10894044_not_declared(); // expected-error {{implicit declaration of function 'radar_10894044_not_declared' is invalid in C99}} |
| 11 | } |