[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / no-undeclared-includes-builtins.cpp
blobf9eefd24a33c7d8903c5d20151ed1bccc716f6af
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.
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
14 #include <stddef.h>