Douglas Gregor | 4ba7c2a | 2011-11-16 15:22:03 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 0bf886d | 2012-01-03 18:24:14 +0000 | [diff] [blame^] | 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 %s -verify |
Argyrios Kyrtzidis | 7d847c9 | 2011-09-01 00:58:55 +0000 | [diff] [blame] | 7 | |
Douglas Gregor | 22d0974 | 2012-01-03 18:04:46 +0000 | [diff] [blame] | 8 | @import category_bottom; |
Argyrios Kyrtzidis | 7d847c9 | 2011-09-01 00:58:55 +0000 | [diff] [blame] | 9 | |
Douglas Gregor | 6ac0b71 | 2011-09-01 19:02:18 +0000 | [diff] [blame] | 10 | |
Douglas Gregor | 4ba7c2a | 2011-11-16 15:22:03 +0000 | [diff] [blame] | 11 | // in category_left.h: expected-note {{previous definition}} |
Argyrios Kyrtzidis | 7d847c9 | 2011-09-01 00:58:55 +0000 | [diff] [blame] | 12 | |
| 13 | @interface Foo(Source) |
Douglas Gregor | 4ba7c2a | 2011-11-16 15:22:03 +0000 | [diff] [blame] | 14 | -(void)source; |
Argyrios Kyrtzidis | 7d847c9 | 2011-09-01 00:58:55 +0000 | [diff] [blame] | 15 | @end |
| 16 | |
| 17 | void test(Foo *foo, LeftFoo *leftFoo) { |
| 18 | [foo source]; |
| 19 | [foo bottom]; |
| 20 | [foo left]; |
| 21 | [foo right1]; |
| 22 | [foo right2]; |
| 23 | [foo top]; |
| 24 | |
| 25 | [leftFoo left]; |
| 26 | [leftFoo bottom]; |
| 27 | } |