brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 7623982 Raw
34 lines · c
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fbuiltin-headers-in-system-modules -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify=builtin-headers-in-system-modules -fno-modules-error-recovery3// RUN: rm -rf %t4// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify=no-builtin-headers-in-system-modules -fno-modules-error-recovery5 6#include "ptrdiff_t.h"7 8ptrdiff_t pdt;9 10// size_t is declared in both size_t.h and __stddef_size_t.h. If11// -fbuiltin-headers-in-system-modules is set, then __stddef_size_t.h is a12// non-modular header that will be transitively pulled in the StdDef test module13// by include_again.h. Otherwise it will be in the _Builtin_stddef module. In14// any case it's not defined which module will win as the expected provider of15// size_t. For the purposes of this test it doesn't matter which of the two16// providing headers get reported.17size_t st; // builtin-headers-in-system-modules-error-re {{missing '#include "{{size_t|include_again}}.h"'; 'size_t' must be declared before it is used}} \18              no-builtin-headers-in-system-modules-error-re {{missing '#include "{{size_t|__stddef_size_t}}.h"'; 'size_t' must be declared before it is used}}19// builtin-headers-in-system-modules-note@size_t.h:* 0+ {{here}} \20   no-builtin-headers-in-system-modules-note@size_t.h:* 0+ {{here}}21// builtin-headers-in-system-modules-note@__stddef_size_t.h:* 0+ {{here}} \22   no-builtin-headers-in-system-modules-note@__stddef_size_t.h:* 0+ {{here}}23 24#include "include_again.h"25// Includes <stddef.h> which includes <__stddef_size_t.h>.26 27size_t st2;28 29#include "size_t.h"30// Redeclares size_t when -fbuiltin-headers-in-system-modules is not passed, but31// the type merger should figure it out.32 33size_t st3;34