Richard Trieu | 2fe9b7f | 2011-12-15 00:38:15 +0000 | [diff] [blame] | 1 | // Note: inside the module. expected-note{{'nested_umbrella_a' declared here}} |
Douglas Gregor | 77d029f | 2011-12-08 19:11:24 +0000 | [diff] [blame] | 2 | |
Douglas Gregor | a30cfe5 | 2011-11-11 19:10:28 +0000 | [diff] [blame] | 3 | // RUN: rm -rf %t |
Douglas Gregor | c514a8a | 2012-01-03 15:21:29 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -x objective-c -fmodule-cache-path %t -fmodules -I %S/Inputs/normal-module-map %s -verify |
Douglas Gregor | adb9799 | 2011-11-16 23:02:25 +0000 | [diff] [blame] | 5 | #include "Umbrella/umbrella_sub.h" |
Douglas Gregor | 484535e | 2011-11-11 23:20:24 +0000 | [diff] [blame] | 6 | |
| 7 | int getUmbrella() { |
Douglas Gregor | adb9799 | 2011-11-16 23:02:25 +0000 | [diff] [blame] | 8 | return umbrella + umbrella_sub; |
Douglas Gregor | 484535e | 2011-11-11 23:20:24 +0000 | [diff] [blame] | 9 | } |
| 10 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 11 | @import Umbrella2; |
Douglas Gregor | cf70d78 | 2011-11-12 00:05:07 +0000 | [diff] [blame] | 12 | |
Douglas Gregor | a081da5 | 2011-11-16 20:05:18 +0000 | [diff] [blame] | 13 | #include "a1.h" |
Douglas Gregor | a30cfe5 | 2011-11-11 19:10:28 +0000 | [diff] [blame] | 14 | #include "b1.h" |
| 15 | #include "nested/nested2.h" |
| 16 | |
| 17 | int test() { |
| 18 | return a1 + b1 + nested2; |
| 19 | } |
Douglas Gregor | 77d029f | 2011-12-08 19:11:24 +0000 | [diff] [blame] | 20 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 21 | @import nested_umbrella.a; |
Douglas Gregor | 77d029f | 2011-12-08 19:11:24 +0000 | [diff] [blame] | 22 | |
| 23 | int testNestedUmbrellaA() { |
| 24 | return nested_umbrella_a; |
| 25 | } |
| 26 | |
| 27 | int testNestedUmbrellaBFail() { |
| 28 | return nested_umbrella_b; // expected-error{{use of undeclared identifier 'nested_umbrella_b'; did you mean 'nested_umbrella_a'?}} |
| 29 | } |
| 30 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 31 | @import nested_umbrella.b; |
Douglas Gregor | 77d029f | 2011-12-08 19:11:24 +0000 | [diff] [blame] | 32 | |
| 33 | int testNestedUmbrellaB() { |
| 34 | return nested_umbrella_b; |
| 35 | } |
Douglas Gregor | 8b48e08 | 2012-10-12 21:15:50 +0000 | [diff] [blame] | 36 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 37 | @import nested_umbrella.a_extras; |
Douglas Gregor | 8b48e08 | 2012-10-12 21:15:50 +0000 | [diff] [blame] | 38 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 39 | @import nested_umbrella._1; |
Douglas Gregor | 8b48e08 | 2012-10-12 21:15:50 +0000 | [diff] [blame] | 40 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 41 | @import nested_umbrella.decltype_; |
Douglas Gregor | 8b48e08 | 2012-10-12 21:15:50 +0000 | [diff] [blame] | 42 | |
| 43 | int testSanitizedName() { |
| 44 | return extra_a + one + decltype_val; |
| 45 | } |