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