diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-16 18:47:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-16 18:47:38 +0000 |
commit | f0e00046711280d494f3ef2d85ae67a442b97406 (patch) | |
tree | e065f209020d03e3be8521b8e415dda3b95de2c3 /test/Modules/method_pool.m | |
parent | d7bf4a4e9c100fb5fe098b0e1870d61891c09dd3 (diff) |
Teach global selector lookup to ignore hidden methods, which occur
when the methods are declared in a submodule that has not yet been
imported. Part of <rdar://problem/10634711>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/method_pool.m')
-rw-r--r-- | test/Modules/method_pool.m | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Modules/method_pool.m b/test/Modules/method_pool.m index 9574caa152..1ba5abd139 100644 --- a/test/Modules/method_pool.m +++ b/test/Modules/method_pool.m @@ -28,3 +28,21 @@ void testMethod1Again(id object) { void testMethod2Again(id object) { [object method2:1]; // expected-warning{{multiple methods named 'method2:' found}} } + +void testMethod3(id object) { + [object method3]; // expected-warning{{instance method '-method3' not found (return type defaults to 'id')}} +} + +@import MethodPoolB.Sub; + +void testMethod3Again(id object) { + char *str = [object method3]; // okay: only found in MethodPoolB.Sub +} + +@import MethodPoolA.Sub; + +void testMethod3AgainAgain(id object) { + [object method3]; // expected-warning{{multiple methods named 'method3' found}} + // expected-note@2{{using}} + // expected-note@2{{also found}} +} |