blob: 5a7d549053db26524488ab81ae803d5da789b051 [file] [log] [blame]
Douglas Gregor524e33e2011-12-08 19:11:24 +00001// Note: inside the module. expected-note{{ 'nested_umbrella_a' declared here}}
2
Douglas Gregor718292f2011-11-11 19:10:28 +00003// RUN: rm -rf %t
Douglas Gregorab0c8a82011-11-11 22:18:48 +00004// RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fauto-module-import -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 Gregoraf28ec82011-11-12 00:05:07 +000011__import_module__ Umbrella2;
12
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
21__import_module__ nested_umbrella.a;
22
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
31__import_module__ nested_umbrella.b;
32
33int testNestedUmbrellaB() {
34 return nested_umbrella_b;
35}