
A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the fourth batch of tests being updated (there are a significant number of other tests left to be updated).
14 lines
612 B
Objective-C
14 lines
612 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
@interface Foo // expected-note {{receiver is instance of class declared here}}
|
|
@end
|
|
|
|
void test(void) {
|
|
Foo *fooObj;
|
|
id obj;
|
|
|
|
[[Foo alloc] init]; // expected-warning {{class method '+alloc' not found (return type defaults to 'id')}} expected-warning {{instance method '-init' not found (return type defaults to 'id')}}
|
|
[fooObj notdefined]; // expected-warning {{instance method '-notdefined' not found (return type defaults to 'id')}}
|
|
[obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id')}}
|
|
}
|