diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-12 23:36:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-12 23:36:21 +0000 |
commit | 2cbd427ec533f022f612fed0dd93ef5fa214478a (patch) | |
tree | 959d117a29a037d4685781442e2e162fc51a6daf /test/Modules | |
parent | b0112e122650cbc9a1a0af42ad84b7178ba0a876 (diff) |
Order the methods in the global method pool based on when they become visible, not when they become deserialized <rdar://problem/13203033>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/Inputs/MethodPoolA.h | 6 | ||||
-rw-r--r-- | test/Modules/Inputs/MethodPoolASub.h | 2 | ||||
-rw-r--r-- | test/Modules/method_pool.m | 20 |
3 files changed, 22 insertions, 6 deletions
diff --git a/test/Modules/Inputs/MethodPoolA.h b/test/Modules/Inputs/MethodPoolA.h index 6af24a9291..ababb02009 100644 --- a/test/Modules/Inputs/MethodPoolA.h +++ b/test/Modules/Inputs/MethodPoolA.h @@ -6,3 +6,9 @@ + (int)method1; - (int)method2:(int)param; @end + +@interface B : A +@end + +@interface C +@end diff --git a/test/Modules/Inputs/MethodPoolASub.h b/test/Modules/Inputs/MethodPoolASub.h index 0b36dfa660..46fe0e11f2 100644 --- a/test/Modules/Inputs/MethodPoolASub.h +++ b/test/Modules/Inputs/MethodPoolASub.h @@ -1,4 +1,6 @@ @interface A (Sub) - (char)method3; - (char*)method4; +- (void)method5:(C*)obj; @end + diff --git a/test/Modules/method_pool.m b/test/Modules/method_pool.m index 712e55d4d6..9a8897b383 100644 --- a/test/Modules/method_pool.m +++ b/test/Modules/method_pool.m @@ -1,15 +1,15 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -I %S/Inputs %s -verify -@import MethodPoolA; - - -// in other file: // expected-note{{using}} - +@import MethodPoolA; +@interface D +- (void)method5:(D*)obj; +@end -// in other file: expected-note{{also found}} +// in other file: // expected-note@7{{using}} +// in other file: expected-note@12{{also found}} void testMethod1(id object) { [object method1]; @@ -23,6 +23,10 @@ void testMethod4(id object) { [object method4]; // expected-warning{{instance method '-method4' not found (return type defaults to 'id')}} } +void testMethod5(id object, D* d) { + [object method5:d]; +} + @import MethodPoolB; void testMethod1Again(id object) { @@ -54,3 +58,7 @@ void testMethod3AgainAgain(id object) { void testMethod4Again(id object) { [object method4]; } + +void testMethod5Again(id object, D* d) { + [object method5:d]; +} |