blob: 4d2f59a7ca829eeb201bde0bcf33924e8032478a [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 Gregorcf70d782011-11-12 00:05:07 +000011__import_module__ Umbrella2;
12
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
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}