summaryrefslogtreecommitdiff
path: root/test/SemaObjCXX/parameters.mm
blob: 363675a0ddf780dbcbee72aab6e8a563a0a616a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -verify %s

@interface A
@end

template<typename T>
struct X0 {
  void f(T); // expected-error{{interface type 'A' cannot be passed by value}}
};

X0<A> x0a; // expected-note{{instantiation}}


struct test2 { virtual void foo() = 0; }; // expected-note {{unimplemented}}
@interface Test2
- (void) foo: (test2) foo; // expected-error {{parameter type 'test2' is an abstract class}}
@end

template<typename T> void r1(__restrict T);
void r2(__restrict id x) { r1(x); }