Douglas Gregor | f2161a7 | 2011-12-06 17:16:41 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 3a5999b | 2012-01-13 22:31:52 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify |
| 3 | // RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify |
Douglas Gregor | f2161a7 | 2011-12-06 17:16:41 +0000 | [diff] [blame] | 4 | |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame^] | 5 | @import DependsOnModule; |
Douglas Gregor | f2161a7 | 2011-12-06 17:16:41 +0000 | [diff] [blame] | 6 | |
| 7 | void testSubFramework() { |
| 8 | float *sf1 = sub_framework; // expected-error{{use of undeclared identifier 'sub_framework'}} |
| 9 | } |
| 10 | |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame^] | 11 | @import DependsOnModule.SubFramework; |
Douglas Gregor | f2161a7 | 2011-12-06 17:16:41 +0000 | [diff] [blame] | 12 | |
| 13 | void testSubFrameworkAgain() { |
| 14 | float *sf2 = sub_framework; |
| 15 | double *sfo1 = sub_framework_other; |
| 16 | } |
| 17 | |
Douglas Gregor | 1fb5c3a | 2011-12-31 04:05:44 +0000 | [diff] [blame] | 18 | #ifdef __cplusplus |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame^] | 19 | @import DependsOnModule.CXX; |
Douglas Gregor | 1fb5c3a | 2011-12-31 04:05:44 +0000 | [diff] [blame] | 20 | |
| 21 | CXXOnly cxxonly; |
| 22 | #endif |