diff options
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/Inputs/MethodPoolASub.h | 1 | ||||
-rw-r--r-- | test/Modules/Inputs/MethodPoolBSub.h | 1 | ||||
-rw-r--r-- | test/Modules/Inputs/module.map | 4 | ||||
-rw-r--r-- | test/Modules/method_pool.m | 8 |
4 files changed, 14 insertions, 0 deletions
diff --git a/test/Modules/Inputs/MethodPoolASub.h b/test/Modules/Inputs/MethodPoolASub.h index e0bd238567..0b36dfa660 100644 --- a/test/Modules/Inputs/MethodPoolASub.h +++ b/test/Modules/Inputs/MethodPoolASub.h @@ -1,3 +1,4 @@ @interface A (Sub) - (char)method3; +- (char*)method4; @end diff --git a/test/Modules/Inputs/MethodPoolBSub.h b/test/Modules/Inputs/MethodPoolBSub.h index 3404ce91fa..0a7899df81 100644 --- a/test/Modules/Inputs/MethodPoolBSub.h +++ b/test/Modules/Inputs/MethodPoolBSub.h @@ -1,3 +1,4 @@ @interface B (Sub) - (char *)method3; +- (char*)method4; @end diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map index 234bfcc2b0..499dcba279 100644 --- a/test/Modules/Inputs/module.map +++ b/test/Modules/Inputs/module.map @@ -116,6 +116,10 @@ module templates_right { module MethodPoolA { header "MethodPoolA.h" + explicit module Sub2 { + header "MethodPoolASub2.h" + } + explicit module Sub { header "MethodPoolASub.h" } diff --git a/test/Modules/method_pool.m b/test/Modules/method_pool.m index 1b94efb79f..712e55d4d6 100644 --- a/test/Modules/method_pool.m +++ b/test/Modules/method_pool.m @@ -19,6 +19,10 @@ void testMethod2(id object) { [object method2:1]; } +void testMethod4(id object) { + [object method4]; // expected-warning{{instance method '-method4' not found (return type defaults to 'id')}} +} + @import MethodPoolB; void testMethod1Again(id object) { @@ -46,3 +50,7 @@ void testMethod3AgainAgain(id object) { // expected-note@2{{using}} // expected-note@2{{also found}} } + +void testMethod4Again(id object) { + [object method4]; +} |