xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/cstd.m (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc// RUN: rm -rf %t
2*0a6a1f1dSLionel Sambuc// RUN: %clang -fsyntax-only -isystem %S/Inputs/System/usr/include -ffreestanding -fmodules -fmodules-cache-path=%t -D__need_wint_t -Werror=implicit-function-declaration %s
3f4a2713aSLionel Sambuc
4f4a2713aSLionel Sambuc@import uses_other_constants;
5f4a2713aSLionel Sambucconst double other_value = DBL_MAX;
6f4a2713aSLionel Sambuc
7f4a2713aSLionel Sambuc// Supplied by compiler, but referenced from the "/usr/include" module map.
8f4a2713aSLionel Sambuc@import cstd.float_constants;
9f4a2713aSLionel Sambuc
10f4a2713aSLionel Sambucfloat getFltMax() { return FLT_MAX; }
11f4a2713aSLionel Sambuc
12f4a2713aSLionel Sambuc// Supplied by the "/usr/include" module map.
13f4a2713aSLionel Sambuc@import cstd.stdio;
14f4a2713aSLionel Sambuc
15f4a2713aSLionel Sambucvoid test_fprintf(FILE *file) {
16f4a2713aSLionel Sambuc  fprintf(file, "Hello, modules\n");
17f4a2713aSLionel Sambuc}
18f4a2713aSLionel Sambuc
19f4a2713aSLionel Sambuc// Supplied by compiler, which forwards to the "/usr/include" version.
20f4a2713aSLionel Sambuc@import cstd.stdint;
21f4a2713aSLionel Sambuc
22f4a2713aSLionel Sambucmy_awesome_nonstandard_integer_type value2;
23f4a2713aSLionel Sambuc
24f4a2713aSLionel Sambuc// Supplied by the compiler; that version wins.
25f4a2713aSLionel Sambuc@import cstd.stdbool;
26f4a2713aSLionel Sambuc
27f4a2713aSLionel Sambuc#ifndef bool
28f4a2713aSLionel Sambuc#  error "bool was not defined!"
29f4a2713aSLionel Sambuc#endif
30f4a2713aSLionel Sambuc
31