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