1*f4a2713aSLionel Sambuc // RUN: rm -rf %t 2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/normal-module-map %s -verify 3*f4a2713aSLionel Sambuc #include "Umbrella/umbrella_sub.h" 4*f4a2713aSLionel Sambuc getUmbrella()5*f4a2713aSLionel Sambucint getUmbrella() { 6*f4a2713aSLionel Sambuc return umbrella + umbrella_sub; 7*f4a2713aSLionel Sambuc } 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc @import Umbrella2; 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc #include "a1.h" 12*f4a2713aSLionel Sambuc #include "b1.h" 13*f4a2713aSLionel Sambuc #include "nested/nested2.h" 14*f4a2713aSLionel Sambuc test()15*f4a2713aSLionel Sambucint test() { 16*f4a2713aSLionel Sambuc return a1 + b1 + nested2; 17*f4a2713aSLionel Sambuc } 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc @import nested_umbrella.a; 20*f4a2713aSLionel Sambuc testNestedUmbrellaA()21*f4a2713aSLionel Sambucint testNestedUmbrellaA() { 22*f4a2713aSLionel Sambuc return nested_umbrella_a; 23*f4a2713aSLionel Sambuc } 24*f4a2713aSLionel Sambuc testNestedUmbrellaBFail()25*f4a2713aSLionel Sambucint testNestedUmbrellaBFail() { 26*f4a2713aSLionel Sambuc return nested_umbrella_b; 27*f4a2713aSLionel Sambuc // expected-error@-1{{declaration of 'nested_umbrella_b' must be imported from module 'nested_umbrella.b' before it is required}} 28*f4a2713aSLionel Sambuc // expected-note@Inputs/normal-module-map/nested_umbrella/b.h:1{{previous}} 29*f4a2713aSLionel Sambuc } 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc @import nested_umbrella.b; 32*f4a2713aSLionel Sambuc testNestedUmbrellaB()33*f4a2713aSLionel Sambucint testNestedUmbrellaB() { 34*f4a2713aSLionel Sambuc return nested_umbrella_b; 35*f4a2713aSLionel Sambuc } 36*f4a2713aSLionel Sambuc 37*f4a2713aSLionel Sambuc @import nested_umbrella.a_extras; 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc @import nested_umbrella._1; 40*f4a2713aSLionel Sambuc 41*f4a2713aSLionel Sambuc @import nested_umbrella.decltype_; 42*f4a2713aSLionel Sambuc testSanitizedName()43*f4a2713aSLionel Sambucint testSanitizedName() { 44*f4a2713aSLionel Sambuc return extra_a + one + decltype_val; 45*f4a2713aSLionel Sambuc } 46