xref: /aosp_15_r20/external/clang/test/SemaObjC/forward-class-receiver.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1  -fsyntax-only -verify %s
2*67e74705SXin Li
3*67e74705SXin Li@interface I
4*67e74705SXin Li+ new; // expected-note {{method 'new' is used for the forward class}}
5*67e74705SXin Li@end
6*67e74705SXin LiClass isa;
7*67e74705SXin Li
8*67e74705SXin Li@class NotKnown; // expected-note{{forward declaration of class here}}
9*67e74705SXin Li
10*67e74705SXin Livoid foo(NotKnown *n) {
11*67e74705SXin Li  [isa new];
12*67e74705SXin Li  [NotKnown new];	   /* expected-warning {{receiver 'NotKnown' is a forward class and corresponding}} */
13*67e74705SXin Li}
14