aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/dealloc.m
blob: 59218d2d0733649b27ba0cba50e3987e1fa32f3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify %s
// RUN: not %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
// rdar://11987838

@protocol NSObject
- dealloc; // expected-error {{return type must be correctly specified as 'void' under ARC, instead of 'id'}}
// CHECK: fix-it:"{{.*}}":{6:3-6:3}:"(void)"
@end

@protocol Foo <NSObject> @end

@interface Root <Foo>
@end

@interface Baz : Root {
}
@end

@implementation Baz
-  (id) dealloc { // expected-error {{return type must be correctly specified as 'void' under ARC, instead of 'id'}}
// CHECK: fix-it:"{{.*}}":{20:5-20:7}:"void"
}

@end