2011-11-12 03:10:28 +08:00
|
|
|
// RUN: rm -rf %t
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/normal-module-map %s -verify
|
2011-11-17 07:02:25 +08:00
|
|
|
#include "Umbrella/umbrella_sub.h"
|
2011-11-12 07:20:24 +08:00
|
|
|
|
|
|
|
int getUmbrella() {
|
2011-11-17 07:02:25 +08:00
|
|
|
return umbrella + umbrella_sub;
|
2011-11-12 07:20:24 +08:00
|
|
|
}
|
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import Umbrella2;
|
2011-11-12 08:05:07 +08:00
|
|
|
|
2011-11-17 04:05:18 +08:00
|
|
|
#include "a1.h"
|
2011-11-12 03:10:28 +08:00
|
|
|
#include "b1.h"
|
|
|
|
#include "nested/nested2.h"
|
|
|
|
|
|
|
|
int test() {
|
|
|
|
return a1 + b1 + nested2;
|
|
|
|
}
|
2011-12-09 03:11:24 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import nested_umbrella.a;
|
2011-12-09 03:11:24 +08:00
|
|
|
|
|
|
|
int testNestedUmbrellaA() {
|
|
|
|
return nested_umbrella_a;
|
|
|
|
}
|
|
|
|
|
|
|
|
int testNestedUmbrellaBFail() {
|
2013-04-17 16:06:46 +08:00
|
|
|
return nested_umbrella_b;
|
2013-08-21 04:35:18 +08:00
|
|
|
// expected-error@-1{{declaration of 'nested_umbrella_b' must be imported from module 'nested_umbrella.b' before it is required}}
|
|
|
|
// expected-note@Inputs/normal-module-map/nested_umbrella/b.h:1{{previous}}
|
2011-12-09 03:11:24 +08:00
|
|
|
}
|
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import nested_umbrella.b;
|
2011-12-09 03:11:24 +08:00
|
|
|
|
|
|
|
int testNestedUmbrellaB() {
|
|
|
|
return nested_umbrella_b;
|
|
|
|
}
|
2012-10-13 05:15:50 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import nested_umbrella.a_extras;
|
2012-10-13 05:15:50 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import nested_umbrella._1;
|
2012-10-13 05:15:50 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import nested_umbrella.decltype_;
|
2012-10-13 05:15:50 +08:00
|
|
|
|
|
|
|
int testSanitizedName() {
|
|
|
|
return extra_a + one + decltype_val;
|
|
|
|
}
|