blob: 7cd448235d81f563c0f5adf77b715275c323b14a [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
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000011@__experimental_modules_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
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000021@__experimental_modules_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
Ted Kremenek32ad2ee2012-03-01 22:07:04 +000031@__experimental_modules_import nested_umbrella.b;
Douglas Gregor77d029f2011-12-08 19:11:24 +000032
33int testNestedUmbrellaB() {
34 return nested_umbrella_b;
35}