blob: 3d1dcf38e33cd1853707244a91f3c066d7f1e6a3 [file] [log] [blame]
Douglas Gregor3ec66632012-02-02 18:42:48 +00001// RUN: rm -rf %t
Douglas Gregor35b04d62013-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 Gregor3ec66632012-02-02 18:42:48 +00003
Douglas Gregor34d52742013-05-02 17:58:30 +00004@import uses_other_constants;
5const double other_value = DBL_MAX;
6
Douglas Gregor3ec66632012-02-02 18:42:48 +00007// Supplied by compiler, but referenced from the "/usr/include" module map.
Douglas Gregorc50d4922012-12-11 22:11:52 +00008@import cstd.float_constants;
Douglas Gregor3ec66632012-02-02 18:42:48 +00009
10float getFltMax() { return FLT_MAX; }
11
12// Supplied by the "/usr/include" module map.
Douglas Gregorc50d4922012-12-11 22:11:52 +000013@import cstd.stdio;
Douglas Gregor3ec66632012-02-02 18:42:48 +000014
15void test_fprintf(FILE *file) {
16 fprintf(file, "Hello, modules\n");
17}
18
Sylvestre Ledru830885c2012-07-23 08:59:39 +000019// Supplied by compiler, which forwards to the "/usr/include" version.
Douglas Gregorc50d4922012-12-11 22:11:52 +000020@import cstd.stdint;
Douglas Gregor3ec66632012-02-02 18:42:48 +000021
Douglas Gregor34d52742013-05-02 17:58:30 +000022my_awesome_nonstandard_integer_type value2;
Douglas Gregor3ec66632012-02-02 18:42:48 +000023
24// Supplied by the compiler; that version wins.
Douglas Gregorc50d4922012-12-11 22:11:52 +000025@import cstd.stdbool;
Douglas Gregor3ec66632012-02-02 18:42:48 +000026
27#ifndef bool
28# error "bool was not defined!"
29#endif
30