annotate clang/test/Driver/implicit-function-as-error.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only %s -Xclang -verify
anatofuz
parents:
diff changeset
2 // RUN: %clang -target x86_64-apple-darwin -arch arm64 -target x86_64-apple-darwin -mios-version-min=7 -fsyntax-only %s -Xclang -verify
anatofuz
parents:
diff changeset
3 // RUN: %clang -target armv7k-apple-watchos -arch armv7k -target armv7k-apple-watchos -fsyntax-only %s -Xclang -verify
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 // For 64-bit iOS, automatically promote -Wimplicit-function-declaration
anatofuz
parents:
diff changeset
6 // to an error.
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 void radar_10894044() {
anatofuz
parents:
diff changeset
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'}}
anatofuz
parents:
diff changeset
10 radar_10894044_not_declared(); // expected-error {{implicit declaration of function 'radar_10894044_not_declared' is invalid in C99}}
anatofuz
parents:
diff changeset
11 }