[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaObjC / inst-method-lookup-in-root.m
blobbabd2a0e8da169b2b96ffb0681855decdec55092
1 // RUN: %clang_cc1  -fsyntax-only -verify %s
3 @protocol P
4 - (id) inst_in_proto;
5 @end
7 @interface Object <P>
8 - (id) inst_in_root;
9 @end
11 @interface Base
12 @end
14 @interface Derived: Base
15 - (id)starboard;
16 @end
18 void foo(void) {
19   Class receiver;
21   [Derived starboard]; // expected-warning {{method '+starboard' not found}}
23   [receiver starboard]; // expected-warning {{instance method 'starboard' is being used on 'Class'}}
24   [receiver inst_in_root]; // Ok!
25   [receiver inst_in_proto]; // Ok!