diff options
Diffstat (limited to 'clang/test/Modules/lookup.m')
| -rw-r--r-- | clang/test/Modules/lookup.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Modules/lookup.m b/clang/test/Modules/lookup.m new file mode 100644 index 00000000000..bdffd44b910 --- /dev/null +++ b/clang/test/Modules/lookup.m @@ -0,0 +1,17 @@ + +// lookup_left.h: expected-note{{using}} +// lookup_right.h: expected-note{{also found}} + +void test(id x) { + [x method]; // expected-warning{{multiple methods named 'method' found}} +} + +// RUN: %clang_cc1 -emit-pch -x objective-c -o %t_lookup_left.h.pch %S/Inputs/lookup_left.h +// RUN: %clang_cc1 -emit-pch -x objective-c -o %t_lookup_right.h.pch %S/Inputs/lookup_right.h +// RUN: %clang_cc1 -x objective-c -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch -verify %s +// RUN: %clang_cc1 -ast-print -x objective-c -import-module %t_lookup_left.h.pch -import-module %t_lookup_right.h.pch %s | FileCheck -check-prefix=CHECK-PRINT %s + +// CHECK-PRINT: - (int) method; +// CHECK-PRINT: - (double) method +// CHECK-PRINT: void test(id x) + |

