1 // RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
3 void takevoidptr(void*);
13 - (void)instanceMethod;
17 - (void)instanceMethod;
23 - (void)instanceMethod {
24 [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod'}}
26 // Use of super in a block is ok and does codegen to the right thing.
28 [super instanceMethod];
33 [super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
35 id X[] = { [ super superClassMethod] };
37 [ super.superClassMethod iMethod],
38 super.superClassMethod,
39 (id)super.superClassMethod // not a cast of super
53 [super m]; // expected-warning{{receiver type 'int' is not 'id'}}
55 void f1(id puper) { // expected-note {{'puper' declared here}}
56 [super m]; // expected-error{{use of undeclared identifier 'super'}}
73 struct SomeStruct super = { 0 };
79 [(B*)super instanceMethod];
80 int *s1 = (int*)super;
82 id X[] = { [ super superClassMethod] };