summaryrefslogtreecommitdiffstats
path: root/test/Modules/method_pool.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-25 00:59:09 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-25 00:59:09 +0000
commit0d266d623452f09d06973528217390d762a8f3fa (patch)
tree3a910f774eaf4633c424b704c66781a1f7938cc7 /test/Modules/method_pool.m
parent43d1251a471d19ce83aa8ce91c0104addada5add (diff)
Whenever Sema attempts to look in the global method pool, try to load
additional data from the external Sema source. This properly copes with modules that are imported after we have already searched in the global method pool for a given selector. For PCH, it's a slight pessimization to be fixed soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/method_pool.m')
-rw-r--r--test/Modules/method_pool.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Modules/method_pool.m b/test/Modules/method_pool.m
new file mode 100644
index 0000000000..9574caa152
--- /dev/null
+++ b/test/Modules/method_pool.m
@@ -0,0 +1,30 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -I %S/Inputs %s -verify
+
+@import MethodPoolA;
+
+
+// in other file: // expected-note{{using}}
+
+
+
+
+// in other file: expected-note{{also found}}
+
+void testMethod1(id object) {
+ [object method1];
+}
+
+void testMethod2(id object) {
+ [object method2:1];
+}
+
+@import MethodPoolB;
+
+void testMethod1Again(id object) {
+ [object method1];
+}
+
+void testMethod2Again(id object) {
+ [object method2:1]; // expected-warning{{multiple methods named 'method2:' found}}
+}