4 changes: 2 additions & 2 deletions clang/test/Rewriter/crash.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ + (id)arrayWithObjects:(id)firstObj, ...;
@interface NSConstantString {}
@end

int main() {
int main(void) {
id foo = [NSArray arrayWithObjects:@"1", @"2", @"3", @"4", @"5", @"6", @"7", @"8", @"9", @"10", @"11", @"12", 0];
return 0;
}
Expand All @@ -19,7 +19,7 @@ @protocol A
@interface Foo
@end

void func() {
void func(void) {
id <A> obj = (id <A>)[Foo bar];
}

6 changes: 3 additions & 3 deletions clang/test/Rewriter/finally.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -fobjc-exceptions -verify %s -o -

int main() {
int main(void) {
@try {
printf("executing try"); // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
// expected-note{{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
Expand All @@ -25,14 +25,14 @@ int main() {
return 0;
}

void test_sync_with_implicit_finally() {
void test_sync_with_implicit_finally(void) {
id foo;
@synchronized (foo) {
return; // The rewriter knows how to generate code for implicit finally
}
}

void test2_try_with_implicit_finally() {
void test2_try_with_implicit_finally(void) {
@try {
return; // The rewriter knows how to generate code for implicit finally
} @catch (id e) {
Expand Down
8 changes: 4 additions & 4 deletions clang/test/Rewriter/objc-synchronized-1.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -

id SYNCH_EXPR();
void SYNCH_BODY();
void SYNCH_BEFORE();
void SYNC_AFTER();
id SYNCH_EXPR(void);
void SYNCH_BODY(void);
void SYNCH_BEFORE(void);
void SYNC_AFTER(void);

void foo(id sem)
{
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Rewriter/rewrite-captured-nested-bvar.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void q(void (^p)(void)) {
p();
}

void f() {
void f(void) {
__block char BYREF_VAR_CHECK = 'a';
__block char d = 'd';
q(^{
Expand All @@ -25,7 +25,7 @@ void f() {
});
}

int main() {
int main(void) {
f();
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Rewriter/rewrite-foreach-1.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @interface MyList (BasicTest)
- (void)compilerTestAgainst;
@end

int LOOP();
int LOOP(void);
@implementation MyList (BasicTest)
- (void)compilerTestAgainst {
id el;
Expand Down
6 changes: 3 additions & 3 deletions clang/test/Rewriter/rewrite-foreach-2.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ @interface MyList (BasicTest)
- (void)compilerTestAgainst;
@end

int LOOP();
int INNERLOOP();
void END_LOOP();
int LOOP(void);
int INNERLOOP(void);
void END_LOOP(void);
@implementation MyList (BasicTest)
- (void)compilerTestAgainst {
id el;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Rewriter/rewrite-foreach-3.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @interface MyList (BasicTest)
- (void)compilerTestAgainst;
@end

int LOOP();
int LOOP(void);
@implementation MyList (BasicTest)
- (void)compilerTestAgainst {
MyList * el;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Rewriter/rewrite-foreach-4.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ @interface MyList (BasicTest)
- (void)compilerTestAgainst;
@end

int LOOP();
int LOOP(void);
@implementation MyList (BasicTest)
- (void)compilerTestAgainst {
MyList * el;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Rewriter/rewrite-foreach-7.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -

@class NSArray;
int main() {
int main(void) {
NSArray *foo;
for (Class c in foo) { }
}
10 changes: 5 additions & 5 deletions clang/test/Rewriter/rewrite-modern-synchronized.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

void *sel_registerName(const char *);

id SYNCH_EXPR();
void SYNCH_BODY();
void SYNCH_BEFORE();
void SYNC_AFTER();
id SYNCH_EXPR(void);
void SYNCH_BODY(void);
void SYNCH_BEFORE(void);
void SYNC_AFTER(void);

void foo(id sem)
{
Expand All @@ -26,7 +26,7 @@ void foo(id sem)
}
}

void test_sync_with_implicit_finally() {
void test_sync_with_implicit_finally(void) {
id foo;
@synchronized (foo) {
return; // The rewriter knows how to generate code for implicit finally
Expand Down
12 changes: 6 additions & 6 deletions clang/test/Rewriter/rewrite-modern-throw.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
void *sel_registerName(const char *);

@interface Foo @end
void TRY();
void SPLATCH();
void MYTRY();
void MYCATCH();
void TRY(void);
void SPLATCH(void);
void MYTRY(void);
void MYCATCH(void);

void foo() {
void foo(void) {
@try { TRY(); }
@catch (...) { SPLATCH(); @throw; }
}

int main()
int main(void)
{

@try {
Expand Down
10 changes: 5 additions & 5 deletions clang/test/Rewriter/rewrite-modern-try-catch-finally.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

extern int printf(const char *, ...);

int main() {
int main(void) {
@try {
}
@finally {
Expand All @@ -30,17 +30,17 @@ int main() {
return 0;
}

void test2_try_with_implicit_finally() {
void test2_try_with_implicit_finally(void) {
@try {
return;
} @catch (id e) {

}
}

void FINALLY();
void TRY();
void CATCH();
void FINALLY(void);
void TRY(void);
void CATCH(void);

@interface NSException
@end
Expand Down
10 changes: 5 additions & 5 deletions clang/test/Rewriter/rewrite-modern-try-finally.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
Class isa;
} *id;

void FINALLY();
void TRY();
void INNER_FINALLY();
void INNER_TRY();
void CHECK();
void FINALLY(void);
void TRY(void);
void INNER_FINALLY(void);
void INNER_TRY(void);
void CHECK(void);

@interface Foo
@end
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Rewriter/rewrite-try-catch.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
@interface Foo @end
@interface GARF @end

void foo() {
void foo(void) {
@try { TRY(); }
@catch (...) { SPLATCH(); @throw; }
}

int main()
int main(void)
{

@try {
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Rewriter/rewrite-weak-attr.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -fblocks -Dnil=0 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
int main() {
int main(void) {
__weak __block id foo = nil;
__block id foo2 = nil;
id foo3 = nil;

void (^myblock)() = ^{
void (^myblock)(void) = ^{
foo = nil;
foo2 = nil;
[foo3 bar];
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Rewriter/undef-field-reference-1.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ @interface MyDerived
@end

MyDerived *pd;
int main() {
int main(void) {
return pd->IVAR;
}

Expand Down
4 changes: 2 additions & 2 deletions clang/test/Rewriter/weak_byref_objects.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin9 -fobjc-gc -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -

#define nil 0
int main() {
int main(void) {
__weak __block id foo = nil;
__block id foo2 = nil;
id foo3 = nil;

void (^myblock)() = ^{
void (^myblock)(void) = ^{
foo = nil;
foo2 = nil;
[foo3 bar];
Expand Down
2 changes: 1 addition & 1 deletion clang/test/VFS/framework-import.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#import <SomeFramework/public_header.h>

void foo() {
void foo(void) {
from_framework();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/implicit-include.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: sed -e "s@INPUT_DIR@%{/S:regex_replacement}/Inputs@g" -e "s@OUT_DIR@%{/t:regex_replacement}@g" %S/Inputs/vfsoverlay.yaml > %t.yaml
// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -include "not_real.h" -fsyntax-only %s

void foo() {
void foo(void) {
bar();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/include-mixed-real-and-virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "not_real.h"
#include "real.h"

void foo() {
void foo(void) {
bar();
baz();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/include-real-from-virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

#include "include_real.h"

void foo() {
void foo(void) {
baz();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/include-virtual-from-real.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

#include "include_not_real.h"

void foo() {
void foo(void) {
bar();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/include.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#include "not_real.h"

void foo() {
void foo(void) {
bar();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/module-import.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@import not_real;

void foo() {
void foo(void) {
bar();
}

Expand Down
2 changes: 1 addition & 1 deletion clang/test/VFS/relative-path.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

#include "not_real.h"

void foo() {
void foo(void) {
bar();
}
2 changes: 1 addition & 1 deletion clang/test/VFS/vfsroot-with-overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

#include "not_real.h"

void foo() {
void foo(void) {
bar();
}
4 changes: 2 additions & 2 deletions clang/test/utils/update_cc_test_checks/Inputs/check-globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// RUN: true
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s

void foo() {
void foo(void) {
static int i, j;
}
void bar() {
void bar(void) {
static int i, j;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ int foo(int arg);

void empty_function(void);

int main() {
int main(void) {
empty_function();
return foo(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void empty_function(void);
// CHECK-NEXT: [[CALL:%.*]] = call i32 @foo(i32 noundef 1)
// CHECK-NEXT: ret i32 [[CALL]]
//
int main() {
int main(void) {
empty_function();
return foo(1);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck %s

void __test_offloading_42_abcdef_bar_l123();
void __test_offloading_42_abcdef_bar_l123(void);
void use(int);

void foo(int a)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --include-generated-funcs --replace-value-regex "__([a-z]+)_offloading_[a-z0-9]+_[a-z0-9]+_(.*)_l[0-9]+" "somevar_[a-z0-9]+_"
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck %s

void __test_offloading_42_abcdef_bar_l123();
void __test_offloading_42_abcdef_bar_l123(void);
void use(int);

void foo(int a)
Expand All @@ -23,7 +23,7 @@ void foo(int a)
// CHECK-NEXT: store i32 [[TMP0]], i32* [[CONV]], align 4
// CHECK-NEXT: [[TMP1:%.*]] = load i64, i64* [[A_CASTED]], align 8
// CHECK-NEXT: call void @{{__omp_offloading_[a-z0-9]+_[a-z0-9]+_foo_l[0-9]+}}(i64 [[TMP1]]) #[[ATTR3:[0-9]+]]
// CHECK-NEXT: call void (...) @{{__test_offloading_[a-z0-9]+_[a-z0-9]+_bar_l[0-9]+}}()
// CHECK-NEXT: call void @{{__test_offloading_[a-z0-9]+_[a-z0-9]+_bar_l[0-9]+}}()
// CHECK-NEXT: ret void
//
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ double A[size];

void foo(void);

int main() {
int main(void) {
int i = 0;

#pragma omp parallel for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ double A[size];

void foo(void);

int main() {
int main(void) {
int i = 0;

#pragma omp parallel for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void foo(void);
// NOOMP-NEXT: call void @foo()
// NOOMP-NEXT: ret i32 0
//
int main() {
int main(void) {
int i = 0;

#pragma omp parallel for
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s

void foo() {
void foo(void) {
static int hex = 0x10;
static int dec = 10;
}
void bar() {
void bar(void) {
static int hex = 0x20;
static int dec = 20;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
// CHECK-NEXT: entry:
// CHECK-NEXT: ret void
//
void foo() {
void foo(void) {
static int hex = 0x10;
static int dec = 10;
}
// CHECK-LABEL: @bar(
// CHECK-NEXT: entry:
// CHECK-NEXT: ret void
//
void bar() {
void bar(void) {
static int hex = 0x20;
static int dec = 20;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s

void foo() {
void foo(void) {
static int i, j;
}
void bar() {
void bar(void) {
static int i, j;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
// CHECK-NEXT: entry:
// CHECK-NEXT: ret void
//
void foo() {
void foo(void) {
static int i, j;
}
// CHECK-LABEL: @bar(
// CHECK-NEXT: entry:
// CHECK-NEXT: ret void
//
void bar() {
void bar(void) {
static int i, j;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s

int checks_please() {
int checks_please(void) {
return 1;
}

// UTC_ARGS: --disable

int no_checks_please() {
int no_checks_please(void) {
// Manual CHECK line should be retained:
// CHECK: manual check line
return -1;
Expand All @@ -15,6 +15,6 @@ int no_checks_please() {
// UTC_ARGS: --enable


int checks_again() {
int checks_again(void) {
return 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
// CHECK-NEXT: entry:
// CHECK-NEXT: ret i32 1
//
int checks_please() {
int checks_please(void) {
return 1;
}

// UTC_ARGS: --disable

int no_checks_please() {
int no_checks_please(void) {
// Manual CHECK line should be retained:
// CHECK: manual check line
return -1;
Expand All @@ -24,6 +24,6 @@ int no_checks_please() {
// CHECK-NEXT: entry:
// CHECK-NEXT: ret i32 2
//
int checks_again() {
int checks_again(void) {
return 2;
}
8 changes: 4 additions & 4 deletions clang/test/utils/update_cc_test_checks/check-globals.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ END.
BOTH-NEXT:// RUN: true
BOTH-NEXT:// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
BOTH-EMPTY:
IGF-NEXT:void foo() {
IGF-NEXT:void foo(void) {
IGF-NEXT: static int i, j;
IGF-NEXT:}
IGF-NEXT:void bar() {
IGF-NEXT:void bar(void) {
IGF-NEXT: static int i, j;
IGF-NEXT:}
BOTH-NEXT://.
Expand All @@ -60,15 +60,15 @@ BOTH-EMPTY:
BOTH-NEXT:// CHECK-NEXT: entry:
BOTH-NEXT:// CHECK-NEXT: ret void
BOTH-NEXT://
NRM-NEXT:void foo() {
NRM-NEXT:void foo(void) {
NRM-NEXT: static int i, j;
NRM-NEXT:}
IGF-NEXT://
BOTH-NEXT:// CHECK-LABEL: @bar(
BOTH-NEXT:// CHECK-NEXT: entry:
BOTH-NEXT:// CHECK-NEXT: ret void
BOTH-NEXT://
NRM-NEXT:void bar() {
NRM-NEXT:void bar(void) {
NRM-NEXT: static int i, j;
NRM-NEXT:}
BOTH-NEXT://.
Expand Down