Douglas Gregor | 2f04f18 | 2012-02-02 18:42:48 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 59c9c72 | 2012-02-02 19:35:15 +0000 | [diff] [blame] | 2 | // RUN: %clang -fsyntax-only -isystem %S/Inputs/System/usr/include -fmodules -fmodule-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. |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 5 | @__experimental_modules_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. |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 10 | @__experimental_modules_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 | |
| 16 | // Supplied by compiler, which forwards to the the "/usr/include" version. |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 17 | @__experimental_modules_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. |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 22 | @__experimental_modules_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 | |