Home | History | Annotate | Download | only in Modules
      1 // RUN: rm -rf %t
      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
      3 
      4 @import uses_other_constants;
      5 const double other_value = DBL_MAX;
      6 
      7 // Supplied by compiler, but referenced from the "/usr/include" module map.
      8 @import cstd.float_constants;
      9 
     10 float getFltMax() { return FLT_MAX; }
     11 
     12 // Supplied by the "/usr/include" module map.
     13 @import cstd.stdio;
     14 
     15 void test_fprintf(FILE *file) {
     16   fprintf(file, "Hello, modules\n");
     17 }
     18 
     19 // Supplied by compiler, which forwards to the "/usr/include" version.
     20 @import cstd.stdint;
     21 
     22 my_awesome_nonstandard_integer_type value2;
     23 
     24 // Supplied by the compiler; that version wins.
     25 @import cstd.stdbool;
     26 
     27 #ifndef bool
     28 #  error "bool was not defined!"
     29 #endif
     30 
     31