2012-04-14 14:01:31 +00:00
|
|
|
// RUN: rm -rf %t
|
2015-06-21 14:00:56 +00: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-04-14 14:01:31 +00:00
|
|
|
|
2013-06-10 20:45:12 +00:00
|
|
|
@import uses_other_constants;
|
|
|
|
const double other_value = DBL_MAX;
|
|
|
|
|
2012-04-14 14:01:31 +00:00
|
|
|
// Supplied by compiler, but referenced from the "/usr/include" module map.
|
2013-04-08 18:45:10 +00:00
|
|
|
@import cstd.float_constants;
|
2012-04-14 14:01:31 +00:00
|
|
|
|
|
|
|
float getFltMax() { return FLT_MAX; }
|
|
|
|
|
|
|
|
// Supplied by the "/usr/include" module map.
|
2013-04-08 18:45:10 +00:00
|
|
|
@import cstd.stdio;
|
2012-04-14 14:01:31 +00:00
|
|
|
|
|
|
|
void test_fprintf(FILE *file) {
|
|
|
|
fprintf(file, "Hello, modules\n");
|
|
|
|
}
|
|
|
|
|
2012-08-15 20:02:54 +00:00
|
|
|
// Supplied by compiler, which forwards to the "/usr/include" version.
|
2013-04-08 18:45:10 +00:00
|
|
|
@import cstd.stdint;
|
2012-04-14 14:01:31 +00:00
|
|
|
|
2013-06-10 20:45:12 +00:00
|
|
|
my_awesome_nonstandard_integer_type value2;
|
2012-04-14 14:01:31 +00:00
|
|
|
|
|
|
|
// Supplied by the compiler; that version wins.
|
2013-04-08 18:45:10 +00:00
|
|
|
@import cstd.stdbool;
|
2012-04-14 14:01:31 +00:00
|
|
|
|
|
|
|
#ifndef bool
|
|
|
|
# error "bool was not defined!"
|
|
|
|
#endif
|
|
|
|
|