[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / lookup-file-cache.cpp
blobfada031e389aef32fc21026bab92ca13223e9f8a
1 // RUN: rm -rf %t
2 // RUN: split-file %s %t
3 // RUN: %clang_cc1 -I %t/include -fmodules -fimplicit-module-maps \
4 // RUN: -fmodules-cache-path=%t/cache -fsyntax-only %t/tu.c
6 //--- include/module.modulemap
7 module A [no_undeclared_includes] { textual header "A.h" }
8 module B { header "B.h" }
10 //--- include/A.h
11 #if __has_include(<B.h>)
12 #error B.h should not be available from A.h.
13 #endif
15 //--- include/B.h
16 // This file intentionally left blank.
18 //--- tu.c
19 #if !__has_include(<B.h>)
20 #error B.h should be available from tu.c.
21 #endif
23 #include "A.h"
25 #if !__has_include(<B.h>)
26 #error B.h should still be available from tu.c.
27 #endif