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" |
4 | |
5 | int getUmbrella() { |
6 | return umbrella + umbrella_sub; |
7 | } |
8 | |
9 | @import Umbrella2; |
10 | |
11 | #include "a1.h" |
12 | #include "b1.h" |
13 | #include "nested/nested2.h" |
14 | |
15 | int test() { |
16 | return a1 + b1 + nested2; |
17 | } |
18 | |
19 | @import nested_umbrella.a; |
20 | |
21 | int testNestedUmbrellaA() { |
22 | return nested_umbrella_a; |
23 | } |
24 | |
25 | int testNestedUmbrellaBFail() { |
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{{previous}} |
29 | } |
30 | |
31 | @import nested_umbrella.b; |
32 | |
33 | int testNestedUmbrellaB() { |
34 | return nested_umbrella_b; |
35 | } |
36 | |
37 | @import nested_umbrella.a_extras; |
38 | |
39 | @import nested_umbrella._1; |
40 | |
41 | @import nested_umbrella.decltype_; |
42 | |
43 | int testSanitizedName() { |
44 | return extra_a + one + decltype_val; |
45 | } |
46 | |