aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/missing-method-return-type.m
blob: b62a0466ad3527aab8ad41a7ea7d720a9afe138d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_cc1 -Wmissing-method-return-type -fsyntax-only -verify %s
// rdar://9615045

@interface I
-  initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}}
@end

@implementation I
- initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}}
@end