llvm-project
20 строк · 386.0 Байт
1// RUN: %clang_cc1 -verify %s
2
3@interface A
4@end
5
6template<typename T>
7struct X0 {
8void f(T); // expected-error{{interface type 'A' cannot be passed by value}}
9};
10
11X0<A> x0a; // expected-note{{instantiation}}
12
13
14struct test2 { virtual void foo() = 0; };
15@interface Test2
16- (void) foo: (test2) foo ;
17@end
18
19template<typename T> void r1(__restrict T);
20void r2(__restrict id x) { r1(x); }
21