blob: 6509a6d023d5f1214a5f86b07bf79b160e3065e9 [file] [log] [blame]
Richard Trieu2fe9b7f2011-12-15 00:38:15 +00001// Note: inside the module. expected-note{{'nested_umbrella_a' declared here}}
Douglas Gregor77d029f2011-12-08 19:11:24 +00002
Douglas Gregora30cfe52011-11-11 19:10:28 +00003// RUN: rm -rf %t
Douglas Gregorc514a8a2012-01-03 15:21:29 +00004// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodules -I %S/Inputs/normal-module-map %s -verify
Douglas Gregoradb97992011-11-16 23:02:25 +00005#include "Umbrella/umbrella_sub.h"
Douglas Gregor484535e2011-11-11 23:20:24 +00006
7int getUmbrella() {
Douglas Gregoradb97992011-11-16 23:02:25 +00008 return umbrella + umbrella_sub;
Douglas Gregor484535e2011-11-11 23:20:24 +00009}
10
Douglas Gregor1b257af2012-12-11 22:11:52 +000011@import Umbrella2;
Douglas Gregorcf70d782011-11-12 00:05:07 +000012
Douglas Gregora081da52011-11-16 20:05:18 +000013#include "a1.h"
Douglas Gregora30cfe52011-11-11 19:10:28 +000014#include "b1.h"
15#include "nested/nested2.h"
16
17int test() {
18 return a1 + b1 + nested2;
19}
Douglas Gregor77d029f2011-12-08 19:11:24 +000020
Douglas Gregor1b257af2012-12-11 22:11:52 +000021@import nested_umbrella.a;
Douglas Gregor77d029f2011-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 Gregor1b257af2012-12-11 22:11:52 +000031@import nested_umbrella.b;
Douglas Gregor77d029f2011-12-08 19:11:24 +000032
33int testNestedUmbrellaB() {
34 return nested_umbrella_b;
35}
Douglas Gregor8b48e082012-10-12 21:15:50 +000036
Douglas Gregor1b257af2012-12-11 22:11:52 +000037@import nested_umbrella.a_extras;
Douglas Gregor8b48e082012-10-12 21:15:50 +000038
Douglas Gregor1b257af2012-12-11 22:11:52 +000039@import nested_umbrella._1;
Douglas Gregor8b48e082012-10-12 21:15:50 +000040
Douglas Gregor1b257af2012-12-11 22:11:52 +000041@import nested_umbrella.decltype_;
Douglas Gregor8b48e082012-10-12 21:15:50 +000042
43int testSanitizedName() {
44 return extra_a + one + decltype_val;
45}