blob: 6d896a915579b19ffea1b3b7fb69166329bf2f93 [file] [log] [blame]
Douglas Gregor2f04f182012-02-02 18:42:48 +00001// RUN: rm -rf %t
Douglas Gregor953a61f2013-02-07 19:01:24 +00002// RUN: %clang -fsyntax-only -isystem %S/Inputs/System/usr/include -fmodules -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s
Douglas Gregor2f04f182012-02-02 18:42:48 +00003
4// Supplied by compiler, but referenced from the "/usr/include" module map.
Douglas Gregor1b257af2012-12-11 22:11:52 +00005@import cstd.float_constants;
Douglas Gregor2f04f182012-02-02 18:42:48 +00006
7float getFltMax() { return FLT_MAX; }
8
9// Supplied by the "/usr/include" module map.
Douglas Gregor1b257af2012-12-11 22:11:52 +000010@import cstd.stdio;
Douglas Gregor2f04f182012-02-02 18:42:48 +000011
12void test_fprintf(FILE *file) {
13 fprintf(file, "Hello, modules\n");
14}
15
Sylvestre Ledrubed28ac2012-07-23 08:59:39 +000016// Supplied by compiler, which forwards to the "/usr/include" version.
Douglas Gregor1b257af2012-12-11 22:11:52 +000017@import cstd.stdint;
Douglas Gregor2f04f182012-02-02 18:42:48 +000018
19my_awesome_nonstandard_integer_type value;
20
21// Supplied by the compiler; that version wins.
Douglas Gregor1b257af2012-12-11 22:11:52 +000022@import cstd.stdbool;
Douglas Gregor2f04f182012-02-02 18:42:48 +000023
24#ifndef bool
25# error "bool was not defined!"
26#endif
27
28
29