• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3@interface Super @end
4Super s1; // expected-error{{interface type cannot be statically allocated}}
5
6extern Super e1; // expected-error{{interface type cannot be statically allocated}}
7
8struct S {
9  Super s1; // expected-error{{interface type cannot be statically allocated}}
10};
11
12@protocol P1 @end
13
14@interface INTF
15{
16  Super ivar1; // expected-error{{interface type cannot be statically allocated}}
17}
18@end
19
20struct whatever {
21  Super objField; // expected-error{{interface type cannot be statically allocated}}
22};
23
24@interface MyIntf
25{
26  Super<P1> ivar1; // expected-error{{interface type cannot be statically allocated}}
27}
28@end
29
30Super foo( // expected-error{{interface type 'Super' cannot be returned by value; did you forget * in 'Super'}}
31          Super parm1) { // expected-error{{interface type 'Super' cannot be passed by value; did you forget * in 'Super'}}
32	Super p1; // expected-error{{interface type cannot be statically allocated}}
33	return p1;
34}
35
36@interface NSMutableSet @end
37
38@interface DVTDummyAnnotationProvider
39  @property(readonly) NSMutableSet annotations;	// expected-error{{interface type cannot be statically allocated}}
40
41@end
42
43