From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaObjCXX/warn-strict-selector-match.mm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 clang/test/SemaObjCXX/warn-strict-selector-match.mm (limited to 'clang/test/SemaObjCXX/warn-strict-selector-match.mm') diff --git a/clang/test/SemaObjCXX/warn-strict-selector-match.mm b/clang/test/SemaObjCXX/warn-strict-selector-match.mm new file mode 100644 index 0000000..330b10b --- /dev/null +++ b/clang/test/SemaObjCXX/warn-strict-selector-match.mm @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -Wstrict-selector-match -fsyntax-only -verify %s + +@interface Base +- (id) meth1: (Base *)arg1; // expected-note {{using}} +- (id) window; // expected-note {{using}} +@end + +@interface Derived: Base +- (id) meth1: (Derived *)arg1; // expected-note {{also found}} +- (Base *) window; // expected-note {{also found}} +@end + +void foo(void) { + id r; + + [r meth1:r]; // expected-warning {{multiple methods named 'meth1:' found}} + [r window]; // expected-warning {{multiple methods named 'window' found}} +} -- cgit v1.2.3