blob: 1752cd314bb3791502586d46ab2ec9ae8ed30e0b [file] [log] [blame]
Douglas Gregor2f04f182012-02-02 18:42:48 +00001// RUN: rm -rf %t
Douglas Gregor59c9c722012-02-02 19:35:15 +00002// RUN: %clang -fsyntax-only -isystem %S/Inputs/System/usr/include -fmodules -fmodule-cache-path %t -D__need_wint_t -Werror=implicit-function-declaration %s
Douglas Gregor2f04f182012-02-02 18:42:48 +00003
4// Supplied by compiler, but referenced from the "/usr/include" module map.
Ted Kremenek32ad2ee2012-03-01 22:07:04 +00005@__experimental_modules_import cstd.float_constants;
Douglas Gregor2f04f182012-02-02 18:42:48 +00006
7float getFltMax() { return FLT_MAX; }
8
9// Supplied by the "/usr/include" module map.
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000010@__experimental_modules_import cstd.stdio;
Douglas Gregor2f04f182012-02-02 18:42:48 +000011
12void test_fprintf(FILE *file) {
13 fprintf(file, "Hello, modules\n");
14}
15
16// Supplied by compiler, which forwards to the the "/usr/include" version.
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000017@__experimental_modules_import cstd.stdint;
Douglas Gregor2f04f182012-02-02 18:42:48 +000018
19my_awesome_nonstandard_integer_type value;
20
21// Supplied by the compiler; that version wins.
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000022@__experimental_modules_import cstd.stdbool;
Douglas Gregor2f04f182012-02-02 18:42:48 +000023
24#ifndef bool
25# error "bool was not defined!"
26#endif
27
28
29