xref: /aosp_15_r20/external/clang/test/SemaObjCXX/parameters.mm (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: %clang_cc1 -verify %s
2*67e74705SXin Li
3*67e74705SXin Li@interface A
4*67e74705SXin Li@end
5*67e74705SXin Li
6*67e74705SXin Litemplate<typename T>
7*67e74705SXin Listruct X0 {
8*67e74705SXin Li  void f(T); // expected-error{{interface type 'A' cannot be passed by value}}
9*67e74705SXin Li};
10*67e74705SXin Li
11*67e74705SXin LiX0<A> x0a; // expected-note{{instantiation}}
12*67e74705SXin Li
13*67e74705SXin Li
14*67e74705SXin Listruct test2 { virtual void foo() = 0; }; // expected-note {{unimplemented}}
15*67e74705SXin Li@interface Test2
16*67e74705SXin Li- (void) foo: (test2) foo; // expected-error {{parameter type 'test2' is an abstract class}}
17*67e74705SXin Li@end
18*67e74705SXin Li
19*67e74705SXin Litemplate<typename T> void r1(__restrict T);
20*67e74705SXin Livoid r2(__restrict id x) { r1(x); }
21