mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 22:36:34 +00:00

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).
21 lines
774 B
Objective-C
21 lines
774 B
Objective-C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
struct S; // expected-note{{forward declaration of 'struct S'}}
|
|
typedef int FOO(void);
|
|
|
|
@interface INTF
|
|
{
|
|
struct F {} JJ;
|
|
int arr[]; // expected-error {{flexible array member 'arr' with type 'int[]' is not at the end of class}}
|
|
struct S IC; // expected-error {{field has incomplete type}}
|
|
// expected-note@-1 {{next instance variable declaration is here}}
|
|
struct T { // expected-note {{previous definition is here}}
|
|
struct T {} X; // expected-error {{nested redefinition of 'T'}}
|
|
}YYY;
|
|
FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
|
|
int kaka; // expected-note {{previous declaration is here}}
|
|
int kaka; // expected-error {{duplicate member 'kaka'}}
|
|
char ch[];
|
|
}
|
|
@end
|