[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / normal-module-map.cpp
blob1f4e3e57d20e82ba7560134a1d003c46735e09d7
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/normal-module-map %s -verify
3 #include "Umbrella/umbrella_sub.h"
5 int getUmbrella(void) {
6 return umbrella + umbrella_sub;
9 @import Umbrella2;
11 #include "a1.h"
12 #include "b1.h"
13 #include "nested/nested2.h"
15 int test(void) {
16 return a1 + b1 + nested2;
19 @import nested_umbrella.a;
21 int testNestedUmbrellaA(void) {
22 return nested_umbrella_a;
25 int testNestedUmbrellaBFail(void) {
26 return nested_umbrella_b;
27 // expected-error@-1{{declaration of 'nested_umbrella_b' must be imported from module 'nested_umbrella.b' before it is required}}
28 // expected-note@Inputs/normal-module-map/nested_umbrella/b.h:1{{here}}
31 @import nested_umbrella.b;
33 int testNestedUmbrellaB(void) {
34 return nested_umbrella_b;
37 @import nested_umbrella.a_extras;
39 @import nested_umbrella._1;
41 @import nested_umbrella.decltype_;
43 int testSanitizedName(void) {
44 return extra_a + one + decltype_val;