2012-02-03 02:42:48 +08:00
|
|
|
// RUN: rm -rf %t
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/System/usr/include -ffreestanding -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s
|
2012-02-03 02:42:48 +08:00
|
|
|
|
2013-05-03 01:58:30 +08:00
|
|
|
@import uses_other_constants;
|
|
|
|
const double other_value = DBL_MAX;
|
|
|
|
|
2012-02-03 02:42:48 +08:00
|
|
|
// Supplied by compiler, but referenced from the "/usr/include" module map.
|
2012-12-12 06:11:52 +08:00
|
|
|
@import cstd.float_constants;
|
2012-02-03 02:42:48 +08:00
|
|
|
|
|
|
|
float getFltMax() { return FLT_MAX; }
|
|
|
|
|
|
|
|
// Supplied by the "/usr/include" module map.
|
2012-12-12 06:11:52 +08:00
|
|
|
@import cstd.stdio;
|
2012-02-03 02:42:48 +08:00
|
|
|
|
|
|
|
void test_fprintf(FILE *file) {
|
|
|
|
fprintf(file, "Hello, modules\n");
|
|
|
|
}
|
|
|
|
|
2012-07-23 16:59:39 +08:00
|
|
|
// Supplied by compiler, which forwards to the "/usr/include" version.
|
2012-12-12 06:11:52 +08:00
|
|
|
@import cstd.stdint;
|
2012-02-03 02:42:48 +08:00
|
|
|
|
2013-05-03 01:58:30 +08:00
|
|
|
my_awesome_nonstandard_integer_type value2;
|
2012-02-03 02:42:48 +08:00
|
|
|
|
|
|
|
// Supplied by the compiler; that version wins.
|
2012-12-12 06:11:52 +08:00
|
|
|
@import cstd.stdbool;
|
2012-02-03 02:42:48 +08:00
|
|
|
|
|
|
|
#ifndef bool
|
|
|
|
# error "bool was not defined!"
|
|
|
|
#endif
|
|
|
|
|