1// RUN: rm -rf %t 2// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_top -emit-module %S/Inputs/module.map 3// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_left -emit-module %S/Inputs/module.map 4// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map 5// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map 6// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map 7// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t %s -verify 8 9@__experimental_modules_import category_bottom; 10 11 12 13 14// in category_left.h: expected-note {{previous definition}} 15 16@interface Foo(Source) 17-(void)source; 18@end 19 20void test(Foo *foo, LeftFoo *leftFoo) { 21 [foo source]; 22 [foo bottom]; 23 [foo left]; 24 [foo right1]; 25 [foo right2]; 26 [foo top]; 27 [foo top2]; 28 [foo top3]; 29 30 [leftFoo left]; 31 [leftFoo bottom]; 32} 33 34// Load another module that also adds categories to Foo, verify that 35// we see those categories. 36@__experimental_modules_import category_other; 37 38void test_other(Foo *foo) { 39 [foo other]; 40} 41