| 1 |
// Test that a [no_undeclared_headers] module can include builtin headers, even |
| 2 |
// if these have been "claimed" by a different module that wraps these builtin |
| 3 |
// headers. libc++ does this, for example. |
| 4 |
// |
| 5 |
// The test inputs used here replicates the relationship between libc++ and |
| 6 |
// glibc. When modularizing glibc, [no_undeclared_headers] must be used to |
| 7 |
// prevent glibc from including the libc++ versions of the C standard library |
| 8 |
// headers. |
| 9 |
|
| 10 |
// RUN: rm -rf %t |
| 11 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fbuiltin-headers-in-system-modules -fimplicit-module-maps -I %S/Inputs/no-undeclared-includes-builtins/libcxx -I %S/Inputs/no-undeclared-includes-builtins/glibc %s |
| 12 |
// expected-no-diagnostics |
| 13 |
|
| 14 |
#include <stddef.h> |