2011-11-16 23:22:03 +08:00
|
|
|
// RUN: rm -rf %t
|
2012-01-04 02:24:14 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map
|
2012-01-27 09:47:08 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map
|
2012-01-04 02:24:14 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t %s -verify
|
2011-09-01 08:58:55 +08:00
|
|
|
|
2012-03-02 06:07:04 +08:00
|
|
|
@__experimental_modules_import category_bottom;
|
2011-09-01 08:58:55 +08:00
|
|
|
|
|
|
|
|
2012-01-27 09:47:08 +08:00
|
|
|
|
|
|
|
|
2011-11-16 23:22:03 +08:00
|
|
|
// in category_left.h: expected-note {{previous definition}}
|
2012-08-10 09:06:16 +08:00
|
|
|
// in category_right.h: expected-warning@11 {{duplicate definition of category}}
|
2011-09-01 08:58:55 +08:00
|
|
|
|
|
|
|
@interface Foo(Source)
|
2011-11-16 23:22:03 +08:00
|
|
|
-(void)source;
|
2011-09-01 08:58:55 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
void test(Foo *foo, LeftFoo *leftFoo) {
|
|
|
|
[foo source];
|
|
|
|
[foo bottom];
|
|
|
|
[foo left];
|
|
|
|
[foo right1];
|
|
|
|
[foo right2];
|
|
|
|
[foo top];
|
2012-01-27 09:47:08 +08:00
|
|
|
[foo top2];
|
|
|
|
[foo top3];
|
2011-09-01 08:58:55 +08:00
|
|
|
|
|
|
|
[leftFoo left];
|
|
|
|
[leftFoo bottom];
|
|
|
|
}
|
2012-01-27 09:47:08 +08:00
|
|
|
|
|
|
|
// Load another module that also adds categories to Foo, verify that
|
|
|
|
// we see those categories.
|
2012-03-02 06:07:04 +08:00
|
|
|
@__experimental_modules_import category_other;
|
2012-01-27 09:47:08 +08:00
|
|
|
|
|
|
|
void test_other(Foo *foo) {
|
|
|
|
[foo other];
|
|
|
|
}
|