llvm-project/clang/test/SemaObjC/method-return-void.m

10 lines
235 B
Objective-C

// RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify -Wno-objc-root-class %s
@interface Test
- (int)foo;
@end
@implementation Test
- (int)foo { return; } // expected-error {{non-void method 'foo' should return a value}}
@end