blob: 423e808bcabfbbe7c501b1db729f18146bdc979b [file] [log] [blame]
Richard Trieu553b2b22011-12-15 00:38:15 +00001// Note: inside the module. expected-note{{'nested_umbrella_a' declared here}}
Douglas Gregor524e33e2011-12-08 19:11:24 +00002
Douglas Gregor718292f2011-11-11 19:10:28 +00003// RUN: rm -rf %t
Douglas Gregor35b04d62013-02-07 19:01:24 +00004// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/normal-module-map %s -verify
Douglas Gregorb65dbff2011-11-16 23:02:25 +00005#include "Umbrella/umbrella_sub.h"
Douglas Gregor88bdfb02011-11-11 23:20:24 +00006
7int getUmbrella() {
Douglas Gregorb65dbff2011-11-16 23:02:25 +00008 return umbrella + umbrella_sub;
Douglas Gregor88bdfb02011-11-11 23:20:24 +00009}
10
Douglas Gregorc50d4922012-12-11 22:11:52 +000011@import Umbrella2;
Douglas Gregoraf28ec82011-11-12 00:05:07 +000012
Douglas Gregor9dc32122011-11-16 20:05:18 +000013#include "a1.h"
Douglas Gregor718292f2011-11-11 19:10:28 +000014#include "b1.h"
15#include "nested/nested2.h"
16
17int test() {
18 return a1 + b1 + nested2;
19}
Douglas Gregor524e33e2011-12-08 19:11:24 +000020
Douglas Gregorc50d4922012-12-11 22:11:52 +000021@import nested_umbrella.a;
Douglas Gregor524e33e2011-12-08 19:11:24 +000022
23int testNestedUmbrellaA() {
24 return nested_umbrella_a;
25}
26
27int testNestedUmbrellaBFail() {
28 return nested_umbrella_b; // expected-error{{use of undeclared identifier 'nested_umbrella_b'; did you mean 'nested_umbrella_a'?}}
29}
30
Douglas Gregorc50d4922012-12-11 22:11:52 +000031@import nested_umbrella.b;
Douglas Gregor524e33e2011-12-08 19:11:24 +000032
33int testNestedUmbrellaB() {
34 return nested_umbrella_b;
35}
Douglas Gregor056396a2012-10-12 21:15:50 +000036
Douglas Gregorc50d4922012-12-11 22:11:52 +000037@import nested_umbrella.a_extras;
Douglas Gregor056396a2012-10-12 21:15:50 +000038
Douglas Gregorc50d4922012-12-11 22:11:52 +000039@import nested_umbrella._1;
Douglas Gregor056396a2012-10-12 21:15:50 +000040
Douglas Gregorc50d4922012-12-11 22:11:52 +000041@import nested_umbrella.decltype_;
Douglas Gregor056396a2012-10-12 21:15:50 +000042
43int testSanitizedName() {
44 return extra_a + one + decltype_val;
45}