stdarg.h and stddef.h have to be textual headers in their upcoming modules to support their `__needs_xxx` macros. That means that they won't get precompiled into their modules' pcm, and instead their declarations will go into every other pcm that uses them. For now that's ok since the type merger can handle the declarations in these headers, but it's suboptimal at best. Make separate headers for all of the pieces so that they can be properly modularized. Reviewed By: aaron.ballman, ChuanqiXu Differential Revision: https://reviews.llvm.org/D158709
14 lines
395 B
C
14 lines
395 B
C
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify -fno-modules-error-recovery
|
|
|
|
#include "ptrdiff_t.h"
|
|
|
|
ptrdiff_t pdt;
|
|
|
|
size_t st; // expected-error {{missing '#include "include_again.h"'; 'size_t' must be declared before it is used}}
|
|
// expected-note@__stddef_size_t.h:* {{here}}
|
|
|
|
#include "include_again.h"
|
|
|
|
size_t st2;
|