summaryrefslogtreecommitdiffstats
path: root/clang/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
commit70f449bf416bb2cdd94b7aacd59fd6bb38374360 (patch)
treef14aa940208ac4678a1c0b1bdd97dcd5d7221e43 /clang/test/Modules/method_pool.m
parent3b8dfa069b5aafe62abd8c761d47d22f78dc7642 (diff)
downloadbcm5719-llvm-70f449bf416bb2cdd94b7aacd59fd6bb38374360.tar.gz
bcm5719-llvm-70f449bf416bb2cdd94b7aacd59fd6bb38374360.zip
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. llvm-svn: 148891
Diffstat (limited to 'clang/test/Modules/method_pool.m')
-rw-r--r--clang/test/Modules/method_pool.m30
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/test/Modules/method_pool.m b/clang/test/Modules/method_pool.m
new file mode 100644
index 00000000000..9574caa1528
--- /dev/null
+++ b/clang/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}}
+}
OpenPOWER on IntegriCloud