| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: %clang_cc1 -fsyntax-only -internal-isystem %S/Inputs/System/usr/include -fmodules -fimplicit-module-maps -fbuiltin-headers-in-system-modules -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s |
| 3 |
// UNSUPPORTED: target={{.*}}-zos{{.*}} |
| 4 |
|
| 5 |
@import uses_other_constants; |
| 6 |
const double other_value = DBL_MAX; |
| 7 |
|
| 8 |
// Supplied by compiler, but referenced from the "/usr/include" module map. |
| 9 |
@import cstd.float_constants; |
| 10 |
|
| 11 |
float getFltMax(void) { return FLT_MAX; } |
| 12 |
|
| 13 |
// Supplied by the "/usr/include" module map. |
| 14 |
@import cstd.stdio; |
| 15 |
|
| 16 |
void test_fprintf(FILE *file) { |
| 17 |
fprintf(file, "Hello, modules\n"); |
| 18 |
} |
| 19 |
|
| 20 |
// Supplied by compiler, which forwards to the "/usr/include" version. |
| 21 |
@import cstd.stdint; |
| 22 |
|
| 23 |
my_awesome_nonstandard_integer_type value2; |
| 24 |
|
| 25 |
// Supplied by the compiler; that version wins. |
| 26 |
@import cstd.stdbool; |
| 27 |
|
| 28 |
#ifndef bool |
| 29 |
# error "bool was not defined!" |
| 30 |
#endif |
| 31 |
|