Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame] | 2 | // 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 Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 3 | |
| 4 | // Supplied by compiler, but referenced from the "/usr/include" module map. |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 5 | @import cstd.float_constants; |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 6 | |
| 7 | float getFltMax() { return FLT_MAX; } |
| 8 | |
| 9 | // Supplied by the "/usr/include" module map. |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 10 | @import cstd.stdio; |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 11 | |
| 12 | void test_fprintf(FILE *file) { |
| 13 | fprintf(file, "Hello, modules\n"); |
| 14 | } |
| 15 | |
Sylvestre Ledru | bed28ac | 2012-07-23 08:59:39 +0000 | [diff] [blame] | 16 | // Supplied by compiler, which forwards to the "/usr/include" version. |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 17 | @import cstd.stdint; |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 18 | |
| 19 | my_awesome_nonstandard_integer_type value; |
| 20 | |
| 21 | // Supplied by the compiler; that version wins. |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 22 | @import cstd.stdbool; |
Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 23 | |
| 24 | #ifndef bool |
| 25 | # error "bool was not defined!" |
| 26 | #endif |
| 27 | |
| 28 | |
| 29 | |