mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

* Give the right diagnostic for 'restrict' applied to a non-pointer, non-reference type. * Don't reject 'restrict' applied indirectly to an Objective-C object pointer type (eg, through template instantiation). llvm-svn: 178200
21 lines
486 B
Plaintext
21 lines
486 B
Plaintext
// 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); }
|