[clang] 46b0d0e - Use functions with prototypes when appropriate; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 16 13:10:45 PST 2022


Author: Aaron Ballman
Date: 2022-02-16T16:10:37-05:00
New Revision: 46b0d0eef9e0a7290851cce0d44002b750584f1b

URL: https://github.com/llvm/llvm-project/commit/46b0d0eef9e0a7290851cce0d44002b750584f1b
DIFF: https://github.com/llvm/llvm-project/commit/46b0d0eef9e0a7290851cce0d44002b750584f1b.diff

LOG: Use functions with prototypes when appropriate; NFC

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 twelfth batch of tests being updated (the end may be in
sight soon though).

Added: 
    

Modified: 
    clang/test/CodeGen/target-builtin-noerror.c
    clang/test/CodeGen/target-features-error.c
    clang/test/CodeGen/target-features-no-error.c
    clang/test/CodeGen/tentative-decls.c
    clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
    clang/test/CodeGen/thinlto-debug-pm.c
    clang/test/CodeGen/thinlto-emit-llvm.c
    clang/test/CodeGen/thinlto-inline-asm.c
    clang/test/CodeGen/thinlto-inline-asm2.c
    clang/test/CodeGen/thinlto-split-dwarf.c
    clang/test/CodeGen/thread-specifier.c
    clang/test/CodeGen/trapv.c
    clang/test/CodeGen/tsan-instrprof-atomic.c
    clang/test/CodeGen/typedef-func.c
    clang/test/CodeGen/types.c
    clang/test/CodeGen/ubsan-asan-noreturn.c
    clang/test/CodeGen/ubsan-conditional.c
    clang/test/CodeGen/ubsan-debuglog-return.c
    clang/test/CodeGen/ubsan-ignorelist-vfs.c
    clang/test/CodeGen/ubsan-ignorelist.c
    clang/test/CodeGen/ubsan-noreturn.c
    clang/test/CodeGen/ucn-identifiers.c
    clang/test/CodeGen/unaligned-expr.c
    clang/test/CodeGen/unaligned-memcpy.c
    clang/test/CodeGen/union.c
    clang/test/CodeGen/unique-internal-linkage-names-dwarf.c
    clang/test/CodeGen/unreachable-ret.c
    clang/test/CodeGen/unreachable.c
    clang/test/CodeGen/unsigned-overflow-minimal.c
    clang/test/CodeGen/unsigned-overflow.c
    clang/test/CodeGen/unsigned-promotion.c
    clang/test/CodeGen/unsigned-trapv.c
    clang/test/CodeGen/unwind-attr.c
    clang/test/CodeGen/utf16-cfstrings.c
    clang/test/CodeGen/uwtable-attr.c
    clang/test/CodeGen/varargs.c
    clang/test/CodeGen/variable-array.c
    clang/test/CodeGen/ve-abi.c
    clang/test/CodeGen/vecshift.c
    clang/test/CodeGen/vector.c
    clang/test/CodeGen/vectorcall.c
    clang/test/CodeGen/vla-4.c
    clang/test/CodeGen/vla.c
    clang/test/CodeGen/vlt_to_pointer.c
    clang/test/CodeGen/volatile-1.c
    clang/test/CodeGen/volatile-2.c
    clang/test/CodeGen/volatile-complex.c
    clang/test/CodeGen/volatile.c
    clang/test/CodeGen/whilestmt.c
    clang/test/CodeGen/win64-i128.c
    clang/test/CodeGen/windows-itanium.c
    clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c
    clang/test/CodeGen/windows-swiftcall.c
    clang/test/CodeGen/writable-strings.c
    clang/test/CodeGen/zero-call-used-regs.c
    clang/test/CodeGenObjC/2008-11-25-Blocks.m
    clang/test/CodeGenObjC/2009-02-05-VolatileProp.m
    clang/test/CodeGenObjC/arc-blocks-exceptions.m
    clang/test/CodeGenObjC/arc-blocks.m
    clang/test/CodeGenObjC/arc-bridged-cast.m
    clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout-2.m
    clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout.m
    clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
    clang/test/CodeGenObjC/arc-captured-block-var-layout.m
    clang/test/CodeGenObjC/arc-literals.m
    clang/test/CodeGenObjC/arc-no-runtime.m
    clang/test/CodeGenObjC/arc-precise-lifetime.m
    clang/test/CodeGenObjC/arc-rv-attr.m
    clang/test/CodeGenObjC/arc-unbridged-cast.m
    clang/test/CodeGenObjC/arc-unoptimized-byref-var.m
    clang/test/CodeGenObjC/arc-unsafeclaim.m
    clang/test/CodeGenObjC/arc-with-atthrow.m
    clang/test/CodeGenObjC/arc.m
    clang/test/CodeGenObjC/attr-noreturn.m
    clang/test/CodeGenObjC/attr-speculative-load-hardening.m
    clang/test/CodeGenObjC/availability-cf-link-guard.m
    clang/test/CodeGenObjC/availability-check-maccatalyst.m
    clang/test/CodeGenObjC/availability-check.m
    clang/test/CodeGenObjC/block-6.m
    clang/test/CodeGenObjC/block-byref-debuginfo.m
    clang/test/CodeGenObjC/block-byref-variable-layout.m
    clang/test/CodeGenObjC/block-ptr-type-crash.m
    clang/test/CodeGenObjC/block-var-layout.m
    clang/test/CodeGenObjC/blocks-1.m
    clang/test/CodeGenObjC/blocks-2.m
    clang/test/CodeGenObjC/blocks-3.m
    clang/test/CodeGenObjC/blocks-4.m
    clang/test/CodeGenObjC/blocks-5.m
    clang/test/CodeGenObjC/boxing.m
    clang/test/CodeGenObjC/catch-lexical-block.m
    clang/test/CodeGenObjC/class-stubs.m
    clang/test/CodeGenObjC/constant-string-class.m
    clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m
    clang/test/CodeGenObjC/debug-info-block-type.m
    clang/test/CodeGenObjC/debug-info-blocks.m
    clang/test/CodeGenObjC/debug-info-getter-name.m
    clang/test/CodeGenObjC/debug-info-id-with-protocol.m
    clang/test/CodeGenObjC/debug-info-ivars-indirect.m
    clang/test/CodeGenObjC/debug-info-property-accessors.m
    clang/test/CodeGenObjC/debug-property-synth.m
    clang/test/CodeGenObjC/dllstorage.m
    clang/test/CodeGenObjC/dot-syntax-1.m
    clang/test/CodeGenObjC/dot-syntax.m
    clang/test/CodeGenObjC/empty-collection-literals.m
    clang/test/CodeGenObjC/encode-test-2.m
    clang/test/CodeGenObjC/encode-test-3.m
    clang/test/CodeGenObjC/encode-test-4.m
    clang/test/CodeGenObjC/encode-test-6.m
    clang/test/CodeGenObjC/encode-test.m
    clang/test/CodeGenObjC/exceptions-asm-attribute.m
    clang/test/CodeGenObjC/exceptions-nonfragile.m
    clang/test/CodeGenObjC/exceptions.m
    clang/test/CodeGenObjC/extended-block-signature-encode.m
    clang/test/CodeGenObjC/externally-retained.m
    clang/test/CodeGenObjC/for-in.m
    clang/test/CodeGenObjC/forward-protocol-metadata-symbols.m
    clang/test/CodeGenObjC/fp2ret.m
    clang/test/CodeGenObjC/fpret.m
    clang/test/CodeGenObjC/fragile-arc.m
    clang/test/CodeGenObjC/gnu-deterministic-selectors.m
    clang/test/CodeGenObjC/gnu-exceptions.m
    clang/test/CodeGenObjC/gnustep2-proto.m
    clang/test/CodeGenObjC/hidden-visibility.m
    clang/test/CodeGenObjC/id-isa-codegen.m
    clang/test/CodeGenObjC/initialize-function-static.m
    clang/test/CodeGenObjC/ivar-type-encoding.m
    clang/test/CodeGenObjC/link-errors.m
    clang/test/CodeGenObjC/local-static-block.m
    clang/test/CodeGenObjC/metadata-symbols-32.m
    clang/test/CodeGenObjC/metadata_symbols.m
    clang/test/CodeGenObjC/mrc-weak.m
    clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
    clang/test/CodeGenObjC/nested-rethrow.m
    clang/test/CodeGenObjC/no-sanitize.m
    clang/test/CodeGenObjC/noescape.m
    clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m
    clang/test/CodeGenObjC/ns-constant-strings.m
    clang/test/CodeGenObjC/objc-alloc-init.m
    clang/test/CodeGenObjC/objc-arc-container-subscripting.m
    clang/test/CodeGenObjC/objc-asm-attribute-test.m
    clang/test/CodeGenObjC/objc-assign-ivar.m
    clang/test/CodeGenObjC/objc-container-subscripting-1.m
    clang/test/CodeGenObjC/objc-container-subscripting.m
    clang/test/CodeGenObjC/objc-dictionary-literal.m
    clang/test/CodeGenObjC/objc-fixed-enum.m
    clang/test/CodeGenObjC/objc-literal-debugger-test.m
    clang/test/CodeGenObjC/objc-literal-tests.m
    clang/test/CodeGenObjC/objc-read-weak-byref.m
    clang/test/CodeGenObjC/objc2-assign-global.m
    clang/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
    clang/test/CodeGenObjC/objc2-strong-cast-block-import.m
    clang/test/CodeGenObjC/objc2-weak-assign.m
    clang/test/CodeGenObjC/objc2-weak-compare.m
    clang/test/CodeGenObjC/objc2-weak-import-attribute.m
    clang/test/CodeGenObjC/objc2-write-barrier.m
    clang/test/CodeGenObjC/object-incr-decr-1.m
    clang/test/CodeGenObjC/os_log.m
    clang/test/CodeGenObjC/property-agrr-getter.m
    clang/test/CodeGenObjC/property-getter-dot-syntax.m
    clang/test/CodeGenObjC/property-incr-decr-1.m
    clang/test/CodeGenObjC/property-ref-cast-to-void.m
    clang/test/CodeGenObjC/property.m
    clang/test/CodeGenObjC/protocols-lazy.m
    clang/test/CodeGenObjC/protocols.m
    clang/test/CodeGenObjC/related-result-type.m
    clang/test/CodeGenObjC/stret.m
    clang/test/CodeGenObjC/strong-in-c-struct.m
    clang/test/CodeGenObjC/super-dotsyntax-property.m
    clang/test/CodeGenObjC/tentative-cfconstantstring.m
    clang/test/CodeGenObjC/ubsan-bool.m
    clang/test/CodeGenObjC/ubsan-nonnull-and-nullability.m
    clang/test/CodeGenObjC/ubsan-nullability.m
    clang/test/CodeGenObjC/unqual-copy-restore.m
    clang/test/CodeGenObjC/weak-metaclass-visibility.m

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/target-builtin-noerror.c b/clang/test/CodeGen/target-builtin-noerror.c
index 12d23aedbe533..b1159aeacf90b 100644
--- a/clang/test/CodeGen/target-builtin-noerror.c
+++ b/clang/test/CodeGen/target-builtin-noerror.c
@@ -6,24 +6,24 @@
 
 // No warnings.
 extern __m256i a;
-int __attribute__((target("avx"))) bar() {
+int __attribute__((target("avx"))) bar(void) {
   return _mm256_extract_epi32(a, 3);
 }
 
-int baz() {
+int baz(void) {
   return bar();
 }
 
-int __attribute__((target("avx"))) qq_avx() {
+int __attribute__((target("avx"))) qq_avx(void) {
   return _mm256_extract_epi32(a, 3);
 }
 
-int qq_noavx() {
+int qq_noavx(void) {
   return 0;
 }
 
 extern __m256i a;
-int qq() {
+int qq(void) {
   if (__builtin_cpu_supports("avx"))
     return qq_avx();
   else
@@ -43,7 +43,7 @@ __m128 __attribute__((target("fma,fma4"))) fma_3(__m128 a, __m128 b, __m128 c) {
   return __builtin_ia32_vfmaddps(a, b, c);
 }
 
-void verifyfeaturestrings() {
+void verifyfeaturestrings(void) {
   (void)__builtin_cpu_supports("cmov");
   (void)__builtin_cpu_supports("mmx");
   (void)__builtin_cpu_supports("popcnt");
@@ -84,7 +84,7 @@ void verifyfeaturestrings() {
   (void)__builtin_cpu_supports("avx512vp2intersect");
 }
 
-void verifycpustrings() {
+void verifycpustrings(void) {
   (void)__builtin_cpu_is("alderlake");
   (void)__builtin_cpu_is("amd");
   (void)__builtin_cpu_is("amdfam10h");

diff  --git a/clang/test/CodeGen/target-features-error.c b/clang/test/CodeGen/target-features-error.c
index a55163a95d43f..97f217ff85652 100644
--- a/clang/test/CodeGen/target-features-error.c
+++ b/clang/test/CodeGen/target-features-error.c
@@ -2,6 +2,6 @@
 int __attribute__((target("avx"), always_inline)) foo(int a) {
   return a + 4;
 }
-int bar() {
+int bar(void) {
   return foo(4); // expected-error {{always_inline function 'foo' requires target feature 'avx', but would be inlined into function 'bar' that is compiled without support for 'avx'}}
 }

diff  --git a/clang/test/CodeGen/target-features-no-error.c b/clang/test/CodeGen/target-features-no-error.c
index b6283b65ec5ac..7eb39f34cbacd 100644
--- a/clang/test/CodeGen/target-features-no-error.c
+++ b/clang/test/CodeGen/target-features-no-error.c
@@ -4,6 +4,6 @@
 int __attribute__((target("sse"), always_inline)) foo(int a) {
   return a + 4;
 }
-int bar() {
+int bar(void) {
   return foo(4); // expected-no-diagnostics
 }

diff  --git a/clang/test/CodeGen/tentative-decls.c b/clang/test/CodeGen/tentative-decls.c
index e24c3fcee740e..9453f15dbc619 100644
--- a/clang/test/CodeGen/tentative-decls.c
+++ b/clang/test/CodeGen/tentative-decls.c
@@ -11,7 +11,7 @@ struct s0 x;
 
 struct s0 y;
 // CHECK-DAG: @y = {{(dso_local )?}}global %struct.s0 zeroinitializer
-struct s0 *f0() {
+struct s0 *f0(void) {
   return &y;
 }
 
@@ -21,7 +21,7 @@ struct s0 {
 
 // CHECK-DAG: @b = {{(dso_local )?}}global [1 x {{.*}}] zeroinitializer
 int b[];
-int *f1() {
+int *f1(void) {
   return b;
 }
 
@@ -33,6 +33,6 @@ int c[4];
 // Check that we emit static tentative definitions
 // CHECK-DAG: @c5 = internal global [1 x {{.*}}] zeroinitializer
 static int c5[];
-static int func() { return c5[0]; }
-int callfunc() { return func(); }
+static int func(void) { return c5[0]; }
+int callfunc(void) { return func(); }
 

diff  --git a/clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c b/clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
index 1223cd9a5411b..35bb7da664a62 100644
--- a/clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
+++ b/clang/test/CodeGen/thinlto-clang-diagnostic-handler-in-be.c
@@ -10,7 +10,7 @@
 // RUN: %clang -cc1 -triple x86_64-linux-gnu -O2 -fexperimental-new-pass-manager -x ir %t1.bo -fthinlto-index=%t.thinlto.bc -fprofile-instrument-use-path=%t2.profdata -emit-obj 2>&1 | FileCheck %s -allow-empty -check-prefix=CHECK-NOWARNING
 
 int sum;
-__attribute__((noinline)) void bar() {
+__attribute__((noinline)) void bar(void) {
   sum = 1234;
 }
 

diff  --git a/clang/test/CodeGen/thinlto-debug-pm.c b/clang/test/CodeGen/thinlto-debug-pm.c
index b3a26acc290ab..6474c0e1243c6 100644
--- a/clang/test/CodeGen/thinlto-debug-pm.c
+++ b/clang/test/CodeGen/thinlto-debug-pm.c
@@ -13,5 +13,5 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O0 -o %t2.o -x ir %t.o -fthinlto-index=%t.thinlto.bc -fdebug-pass-manager 2>&1 | FileCheck %s --check-prefix=O0
 // O0-NOT: Running pass: LoopVectorizePass
 
-void foo() {
+void foo(void) {
 }

diff  --git a/clang/test/CodeGen/thinlto-emit-llvm.c b/clang/test/CodeGen/thinlto-emit-llvm.c
index dc46ae78e9b81..5bac703e397be 100644
--- a/clang/test/CodeGen/thinlto-emit-llvm.c
+++ b/clang/test/CodeGen/thinlto-emit-llvm.c
@@ -8,5 +8,5 @@
 // RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm-bc -o - | llvm-dis -o - | FileCheck %s
 
 // CHECK: define{{.*}} void @foo()
-void foo() {
+void foo(void) {
 }

diff  --git a/clang/test/CodeGen/thinlto-inline-asm.c b/clang/test/CodeGen/thinlto-inline-asm.c
index a41cba6fadc1c..dbf90e76b1ff3 100644
--- a/clang/test/CodeGen/thinlto-inline-asm.c
+++ b/clang/test/CodeGen/thinlto-inline-asm.c
@@ -13,7 +13,7 @@
 // SYMTAB: D------X foo
 // SYMTAB: D------X bar
 
-void foo() {}
+void foo(void) {}
 
 asm(".globl bar      \n"
     "bar:            \n"

diff  --git a/clang/test/CodeGen/thinlto-inline-asm2.c b/clang/test/CodeGen/thinlto-inline-asm2.c
index 30d8bfb04c5b4..5d7bbc097de7c 100644
--- a/clang/test/CodeGen/thinlto-inline-asm2.c
+++ b/clang/test/CodeGen/thinlto-inline-asm2.c
@@ -14,7 +14,7 @@
 // NM-NOT: {{.}}
 // NM:     ---------------- T ref
 // NM-NOT: {{.}}
-const char *ref() {
+const char *ref(void) {
   const char *ret;
   asm("lea ff_h264_cabac_tables(%%rip), %0" : "=r"(ret));
   return ret;

diff  --git a/clang/test/CodeGen/thinlto-split-dwarf.c b/clang/test/CodeGen/thinlto-split-dwarf.c
index 419bd1320bb23..b1db0298456b1 100644
--- a/clang/test/CodeGen/thinlto-split-dwarf.c
+++ b/clang/test/CodeGen/thinlto-split-dwarf.c
@@ -40,4 +40,4 @@
 // DWARFv5-O-NOT: DW_TAG_subprogram
 // DWARFv5-DWO: DW_TAG_subprogram
 
-int main() {}
+int main(void) {}

diff  --git a/clang/test/CodeGen/thread-specifier.c b/clang/test/CodeGen/thread-specifier.c
index 713ed37e8271c..18a14f912aba4 100644
--- a/clang/test/CodeGen/thread-specifier.c
+++ b/clang/test/CodeGen/thread-specifier.c
@@ -17,8 +17,8 @@
 
 __thread int a;
 extern __thread int b;
-int c() { return *&b; }
-int d() {
+int c(void) { return *&b; }
+int d(void) {
   __thread static int e;
   __thread static union {float a; int b;} f = {.b = 1};
   return 0;
@@ -29,7 +29,7 @@ __thread int h __attribute__((tls_model("local-dynamic")));
 __thread int i __attribute__((tls_model("initial-exec")));
 __thread int j __attribute__((tls_model("local-exec")));
 
-int f() {
+int f(void) {
   __thread static int a __attribute__((tls_model("initial-exec")));
   return a++;
 }

diff  --git a/clang/test/CodeGen/trapv.c b/clang/test/CodeGen/trapv.c
index c01cafc07ab0a..79a52188bd87e 100644
--- a/clang/test/CodeGen/trapv.c
+++ b/clang/test/CodeGen/trapv.c
@@ -4,7 +4,7 @@ unsigned int ui, uj, uk;
 int i, j, k;
 
 // CHECK-LABEL: define{{.*}} void @test0()
-void test0() {
+void test0(void) {
   // -ftrapv doesn't affect unsigned arithmetic.
   // CHECK:      [[T1:%.*]] = load i32, i32* @uj
   // CHECK-NEXT: [[T2:%.*]] = load i32, i32* @uk
@@ -24,7 +24,7 @@ void test0() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test1()
-void test1() {
+void test1(void) {
   extern void opaque(int);
   opaque(i++);
 
@@ -38,7 +38,7 @@ void test1() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test2()
-void test2() {
+void test2(void) {
   extern void opaque(int);
   opaque(++i);
 

diff  --git a/clang/test/CodeGen/tsan-instrprof-atomic.c b/clang/test/CodeGen/tsan-instrprof-atomic.c
index 48d39424e73c7..23402cffa46d8 100644
--- a/clang/test/CodeGen/tsan-instrprof-atomic.c
+++ b/clang/test/CodeGen/tsan-instrprof-atomic.c
@@ -3,4 +3,4 @@
 // CHECK: define {{.*}}@foo
 // CHECK-NOT: load {{.*}}foo
 // CHECK: ret void
-void foo() {}
+void foo(void) {}

diff  --git a/clang/test/CodeGen/typedef-func.c b/clang/test/CodeGen/typedef-func.c
index 1467e8b1f74a9..0ceb968fa753e 100644
--- a/clang/test/CodeGen/typedef-func.c
+++ b/clang/test/CodeGen/typedef-func.c
@@ -10,7 +10,7 @@ filter_func_t mono_filter;
 
 void addfilter2(filter_func_t *func){}
 
-void setup_filters()
+void setup_filters(void)
 {
   addfilter2( mono_filter);
 }

diff  --git a/clang/test/CodeGen/types.c b/clang/test/CodeGen/types.c
index 55b806c93a253..a43e452dfe8dc 100644
--- a/clang/test/CodeGen/types.c
+++ b/clang/test/CodeGen/types.c
@@ -10,7 +10,7 @@ struct ieeeExternal {
 } *exthead;
 
 
-void test1()
+void test1(void)
 {
     struct ieeeExternal *exttmp = exthead;
 }

diff  --git a/clang/test/CodeGen/ubsan-asan-noreturn.c b/clang/test/CodeGen/ubsan-asan-noreturn.c
index 7013328d01743..2dd1bbf62911e 100644
--- a/clang/test/CodeGen/ubsan-asan-noreturn.c
+++ b/clang/test/CodeGen/ubsan-asan-noreturn.c
@@ -6,7 +6,7 @@
 void my_longjmp(void) __attribute__((noreturn));
 
 // CHECK-LABEL: define{{.*}} void @calls_noreturn()
-void calls_noreturn() {
+void calls_noreturn(void) {
   my_longjmp();
   // CHECK:      @__asan_handle_no_return{{.*}} !nosanitize
   // CHECK-NEXT: @my_longjmp(){{[^#]*}}

diff  --git a/clang/test/CodeGen/ubsan-conditional.c b/clang/test/CodeGen/ubsan-conditional.c
index 7f63b39a23075..55c1bd6fad72e 100644
--- a/clang/test/CodeGen/ubsan-conditional.c
+++ b/clang/test/CodeGen/ubsan-conditional.c
@@ -2,7 +2,7 @@
 
 _Bool b;
 // CHECK: @f(
-double f() {
+double f(void) {
   // CHECK: %[[B:.*]] = load {{.*}} @b
   // CHECK: %[[COND:.*]] = trunc {{.*}} %[[B]] to i1
   // CHECK: br i1 %[[COND]]

diff  --git a/clang/test/CodeGen/ubsan-debuglog-return.c b/clang/test/CodeGen/ubsan-debuglog-return.c
index 23a1326934dec..7099650824a9b 100644
--- a/clang/test/CodeGen/ubsan-debuglog-return.c
+++ b/clang/test/CodeGen/ubsan-debuglog-return.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -x c -debug-info-kind=line-tables-only -emit-llvm -fsanitize=returns-nonnull-attribute -o - %s | FileCheck %s
 // The UBSAN function call in the epilogue needs to have a debug location.
 
-__attribute__((returns_nonnull)) void *allocate() {}
+__attribute__((returns_nonnull)) void *allocate(void) {}
 
 // CHECK: define {{.*}}nonnull i8* @allocate(){{.*}} !dbg
 // CHECK: call void @__ubsan_handle_nonnull_return_v1_abort

diff  --git a/clang/test/CodeGen/ubsan-ignorelist-vfs.c b/clang/test/CodeGen/ubsan-ignorelist-vfs.c
index 00450a79b55d0..b7ed577fdad36 100644
--- a/clang/test/CodeGen/ubsan-ignorelist-vfs.c
+++ b/clang/test/CodeGen/ubsan-ignorelist-vfs.c
@@ -18,7 +18,7 @@ unsigned i;
 // DEFAULT: @hash
 // FUNC: @hash
 // FILE: @hash
-unsigned hash() {
+unsigned hash(void) {
 // DEFAULT: call {{.*}}void @__ubsan
 // FUNC-NOT: call {{.*}}void @__ubsan
 // FILE-NOT: call {{.*}}void @__ubsan
@@ -28,7 +28,7 @@ unsigned hash() {
 // DEFAULT: @add
 // FUNC: @add
 // FILE: @add
-unsigned add() {
+unsigned add(void) {
 // DEFAULT: call {{.*}}void @__ubsan
 // FUNC: call {{.*}}void @__ubsan
 // FILE-NOT: call {{.*}}void @__ubsan

diff  --git a/clang/test/CodeGen/ubsan-ignorelist.c b/clang/test/CodeGen/ubsan-ignorelist.c
index 4fe84f884898d..409cb18a3179d 100644
--- a/clang/test/CodeGen/ubsan-ignorelist.c
+++ b/clang/test/CodeGen/ubsan-ignorelist.c
@@ -10,7 +10,7 @@ unsigned i;
 // DEFAULT: @hash
 // FUNC: @hash
 // FILE: @hash
-unsigned hash() {
+unsigned hash(void) {
 // DEFAULT: call {{.*}}void @__ubsan
 // FUNC-NOT: call {{.*}}void @__ubsan
 // FILE-NOT: call {{.*}}void @__ubsan
@@ -20,7 +20,7 @@ unsigned hash() {
 // DEFAULT: @add
 // FUNC: @add
 // FILE: @add
-unsigned add() {
+unsigned add(void) {
 // DEFAULT: call {{.*}}void @__ubsan
 // FUNC: call {{.*}}void @__ubsan
 // FILE-NOT: call {{.*}}void @__ubsan

diff  --git a/clang/test/CodeGen/ubsan-noreturn.c b/clang/test/CodeGen/ubsan-noreturn.c
index 7de24e0169204..fa88e553e9163 100644
--- a/clang/test/CodeGen/ubsan-noreturn.c
+++ b/clang/test/CodeGen/ubsan-noreturn.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -fsanitize=unreachable -o - | FileCheck %s
 
 // CHECK-LABEL: @f(
-void __attribute__((noreturn)) f() {
+void __attribute__((noreturn)) f(void) {
   // CHECK: __ubsan_handle_builtin_unreachable
   // CHECK: unreachable
 }

diff  --git a/clang/test/CodeGen/ucn-identifiers.c b/clang/test/CodeGen/ucn-identifiers.c
index 56e3aa5ad84ee..d33eab81ffaaa 100644
--- a/clang/test/CodeGen/ucn-identifiers.c
+++ b/clang/test/CodeGen/ucn-identifiers.c
@@ -6,7 +6,7 @@
 extern void \u00FCber(int);
 extern void \U000000FCber(int); // redeclaration, no warning
 
-void goodCalls() {
+void goodCalls(void) {
   \u00FCber(0);
   \u00fcber(1);
   über(2);

diff  --git a/clang/test/CodeGen/unaligned-expr.c b/clang/test/CodeGen/unaligned-expr.c
index 6e23cbc729fbd..975dab2b40d08 100644
--- a/clang/test/CodeGen/unaligned-expr.c
+++ b/clang/test/CodeGen/unaligned-expr.c
@@ -109,7 +109,7 @@ void test10(void) {
 // --------
 
 typedef __unaligned int UnalignedInt;
-void test13() {
+void test13(void) {
   // CHECK: %i = alloca i32, align 1
   // CHECK: {{%.*}} = load i32, i32* %i, align 1
   // CHECK: store i32 {{%.*}}, i32* %i, align 1
@@ -119,7 +119,7 @@ void test13() {
 
 typedef int Aligned;
 typedef __unaligned Aligned UnalignedInt2;
-void test14() {
+void test14(void) {
   // CHECK: %i = alloca i32, align 1
   // CHECK: {{%.*}} = load i32, i32* %i, align 1
   // CHECK: store i32 {{%.*}}, i32* %i, align 1
@@ -128,7 +128,7 @@ void test14() {
 }
 
 typedef UnalignedInt UnalignedInt3;
-void test15() {
+void test15(void) {
   // CHECK: %i = alloca i32, align 1
   // CHECK: {{%.*}} = load i32, i32* %i, align 1
   // CHECK: store i32 {{%.*}}, i32* %i, align 1

diff  --git a/clang/test/CodeGen/unaligned-memcpy.c b/clang/test/CodeGen/unaligned-memcpy.c
index 0373b5617e05b..d1857480f2063 100644
--- a/clang/test/CodeGen/unaligned-memcpy.c
+++ b/clang/test/CodeGen/unaligned-memcpy.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 %s -emit-llvm -o -
 
-void bork() {
+void bork(void) {
   char Qux[33] = {0};
 }

diff  --git a/clang/test/CodeGen/union.c b/clang/test/CodeGen/union.c
index 730218210213d..60e9e2d771ff1 100644
--- a/clang/test/CodeGen/union.c
+++ b/clang/test/CodeGen/union.c
@@ -5,7 +5,7 @@ union u_tag {
   float b;
 } u;
 
-void f() {
+void f(void) {
   u.b = 11;
 }
 
@@ -29,12 +29,12 @@ int f3(value v) {
 
 enum E9 { one, two };
 union S65 { enum E9 a; } ; union S65 s65;
-void fS65() { enum E9 e = s65.a; } 
+void fS65(void) { enum E9 e = s65.a; } 
 
 typedef union{
   unsigned char x[65536];
 } q;
-int qfunc() {q buf; unsigned char* x = buf.x;}
+int qfunc(void) {q buf; unsigned char* x = buf.x;}
 
 union RR {_Bool a : 1;} RRU;
 int RRF(void) {return RRU.a;}

diff  --git a/clang/test/CodeGen/unique-internal-linkage-names-dwarf.c b/clang/test/CodeGen/unique-internal-linkage-names-dwarf.c
index 8ab3dcd7b82a8..4b7093a0713ad 100644
--- a/clang/test/CodeGen/unique-internal-linkage-names-dwarf.c
+++ b/clang/test/CodeGen/unique-internal-linkage-names-dwarf.c
@@ -19,7 +19,7 @@ static int bar(a) int a;
   return glob + a;
 }
 
-void baz() {
+void baz(void) {
   foo();
   bar(1);
 }

diff  --git a/clang/test/CodeGen/unreachable-ret.c b/clang/test/CodeGen/unreachable-ret.c
index 386b83e9ef6bb..1ddb40a73788d 100644
--- a/clang/test/CodeGen/unreachable-ret.c
+++ b/clang/test/CodeGen/unreachable-ret.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
 
-extern void abort() __attribute__((noreturn));
+extern void abort(void) __attribute__((noreturn));
 
-void f1() {
+void f1(void) {
   abort();
 }
 // CHECK-LABEL: define {{.*}}void @f1()
@@ -11,7 +11,7 @@ void f1() {
 // CHECK-NEXT:   unreachable
 // CHECK-NEXT: }
 
-void *f2() {
+void *f2(void) {
   abort();
   return 0;
 }

diff  --git a/clang/test/CodeGen/unreachable.c b/clang/test/CodeGen/unreachable.c
index 898f64e68ee8a..66a5dbbe2a9af 100644
--- a/clang/test/CodeGen/unreachable.c
+++ b/clang/test/CodeGen/unreachable.c
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
 // CHECK-NOT: @unreachable
 
-extern void abort() __attribute__((noreturn));
-extern int unreachable();
+extern void abort(void) __attribute__((noreturn));
+extern int unreachable(void);
 
-int f0() {
+int f0(void) {
   return 0;
   unreachable();
 }

diff  --git a/clang/test/CodeGen/unsigned-overflow-minimal.c b/clang/test/CodeGen/unsigned-overflow-minimal.c
index 19988461acc63..401f0322e12ec 100644
--- a/clang/test/CodeGen/unsigned-overflow-minimal.c
+++ b/clang/test/CodeGen/unsigned-overflow-minimal.c
@@ -3,19 +3,19 @@
 unsigned long li, lj, lk;
 
 // CHECK-LABEL: define{{.*}} void @testlongadd()
-void testlongadd() {
+void testlongadd(void) {
   // CHECK: call void @__ubsan_handle_add_overflow_minimal_abort()
   li = lj + lk;
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongsub()
-void testlongsub() {
+void testlongsub(void) {
   // CHECK: call void @__ubsan_handle_sub_overflow_minimal_abort()
   li = lj - lk;
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongmul()
-void testlongmul() {
+void testlongmul(void) {
   // CHECK: call void @__ubsan_handle_mul_overflow_minimal_abort()
   li = lj * lk;
 }

diff  --git a/clang/test/CodeGen/unsigned-overflow.c b/clang/test/CodeGen/unsigned-overflow.c
index 88449cf93fc6e..ff9ad5d30bd60 100644
--- a/clang/test/CodeGen/unsigned-overflow.c
+++ b/clang/test/CodeGen/unsigned-overflow.c
@@ -9,7 +9,7 @@ extern void opaquelong(unsigned long);
 extern void opaqueint(unsigned int);
 
 // CHECK-LABEL: define{{.*}} void @testlongadd()
-void testlongadd() {
+void testlongadd(void) {
 
   // CHECK:      [[T1:%.*]] = load i64, i64* @lj
   // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
@@ -21,7 +21,7 @@ void testlongadd() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongsub()
-void testlongsub() {
+void testlongsub(void) {
 
   // CHECK:      [[T1:%.*]] = load i64, i64* @lj
   // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
@@ -33,7 +33,7 @@ void testlongsub() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongmul()
-void testlongmul() {
+void testlongmul(void) {
 
   // CHECK:      [[T1:%.*]] = load i64, i64* @lj
   // CHECK-NEXT: [[T2:%.*]] = load i64, i64* @lk
@@ -45,7 +45,7 @@ void testlongmul() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongpostinc()
-void testlongpostinc() {
+void testlongpostinc(void) {
   opaquelong(li++);
 
   // CHECK:      [[T1:%.*]] = load i64, i64* @li
@@ -56,7 +56,7 @@ void testlongpostinc() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongpreinc()
-void testlongpreinc() {
+void testlongpreinc(void) {
   opaquelong(++li);
 
   // CHECK:      [[T1:%.*]] = load i64, i64* @li
@@ -67,7 +67,7 @@ void testlongpreinc() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testintadd()
-void testintadd() {
+void testintadd(void) {
 
   // CHECK:      [[T1:%.*]] = load i32, i32* @ij
   // CHECK-NEXT: [[T2:%.*]] = load i32, i32* @ik
@@ -79,7 +79,7 @@ void testintadd() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testintsub()
-void testintsub() {
+void testintsub(void) {
 
   // CHECK:      [[T1:%.*]] = load i32, i32* @ij
   // CHECK-NEXT: [[T2:%.*]] = load i32, i32* @ik
@@ -91,7 +91,7 @@ void testintsub() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testintmul()
-void testintmul() {
+void testintmul(void) {
 
   // CHECK:      [[T1:%.*]] = load i32, i32* @ij
   // CHECK-NEXT: [[T2:%.*]] = load i32, i32* @ik
@@ -103,7 +103,7 @@ void testintmul() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testintpostinc()
-void testintpostinc() {
+void testintpostinc(void) {
   opaqueint(ii++);
 
   // CHECK:      [[T1:%.*]] = load i32, i32* @ii
@@ -114,7 +114,7 @@ void testintpostinc() {
 }
 
 // CHECK-LABEL: define{{.*}} void @testintpreinc()
-void testintpreinc() {
+void testintpreinc(void) {
   opaqueint(++ii);
 
   // CHECK:      [[T1:%.*]] = load i32, i32* @ii

diff  --git a/clang/test/CodeGen/unsigned-promotion.c b/clang/test/CodeGen/unsigned-promotion.c
index eca0895416656..d58cad4b6bc27 100644
--- a/clang/test/CodeGen/unsigned-promotion.c
+++ b/clang/test/CodeGen/unsigned-promotion.c
@@ -10,7 +10,7 @@ unsigned short si, sj, sk;
 
 // CHECKS-LABEL:   define{{.*}} void @testshortmul()
 // CHECKU-LABEL: define{{.*}} void @testshortmul()
-void testshortmul() {
+void testshortmul(void) {
 
   // CHECKS:        load i16, i16* @sj
   // CHECKS:        load i16, i16* @sk

diff  --git a/clang/test/CodeGen/unsigned-trapv.c b/clang/test/CodeGen/unsigned-trapv.c
index e129a12253836..62d547109418f 100644
--- a/clang/test/CodeGen/unsigned-trapv.c
+++ b/clang/test/CodeGen/unsigned-trapv.c
@@ -8,7 +8,7 @@
 // UNSIGNED: @test_signed
 // TRAPV: @test_signed
 // BOTH: @test_signed
-void test_signed() {
+void test_signed(void) {
   extern volatile int a, b, c;
   // UNSIGNED: add nsw i32
   // UNSIGNED-NOT: overflow
@@ -24,7 +24,7 @@ void test_signed() {
 // UNSIGNED: @test_unsigned
 // TRAPV: @test_unsigned
 // BOTH: @test_unsigned
-void test_unsigned() {
+void test_unsigned(void) {
   extern volatile unsigned x, y, z;
   // UNSIGNED: uadd.with.overflow.i32
   // UNSIGNED-NOT: llvm.trap

diff  --git a/clang/test/CodeGen/unwind-attr.c b/clang/test/CodeGen/unwind-attr.c
index 5a7ec1b2bfce1..50cbd6df77184 100644
--- a/clang/test/CodeGen/unwind-attr.c
+++ b/clang/test/CodeGen/unwind-attr.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple i386-unknown-unknown -fexceptions -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix CHECK-NOEXC %s
 
-int opaque();
+int opaque(void);
 
 // CHECK:       define{{.*}} [[INT:i.*]] @test0() [[TF:#[0-9]+]] {
 // CHECK-NOEXC: define{{.*}} [[INT:i.*]] @test0() [[NUW:#[0-9]+]] {

diff  --git a/clang/test/CodeGen/utf16-cfstrings.c b/clang/test/CodeGen/utf16-cfstrings.c
index dbe9bdad3e7f5..4ed1d070e83c8 100644
--- a/clang/test/CodeGen/utf16-cfstrings.c
+++ b/clang/test/CodeGen/utf16-cfstrings.c
@@ -5,6 +5,6 @@
 
 #define CFSTR __builtin___CFStringMakeConstantString
 
-void foo() {
+void foo(void) {
   CFSTR("überhund");
 }

diff  --git a/clang/test/CodeGen/uwtable-attr.c b/clang/test/CodeGen/uwtable-attr.c
index e1b0c92f9794f..12ec158272ae8 100644
--- a/clang/test/CodeGen/uwtable-attr.c
+++ b/clang/test/CodeGen/uwtable-attr.c
@@ -17,7 +17,7 @@ struct S { ~S(); };
 extern "C" int f() { S s; g(); return 0;};
 #else
 void g(void);
-int f() { g(); return 0; };
+int f(void) { g(); return 0; };
 #endif
 
 // CHECK: define {{.*}} @f() #[[#F:]]

diff  --git a/clang/test/CodeGen/varargs.c b/clang/test/CodeGen/varargs.c
index 3e2cce0793819..625399b87f7ad 100644
--- a/clang/test/CodeGen/varargs.c
+++ b/clang/test/CodeGen/varargs.c
@@ -2,14 +2,14 @@
 
 // PR6433 - Don't crash on va_arg(typedef).
 typedef double gdouble;
-void focus_changed_cb () {
+void focus_changed_cb (void) {
     __builtin_va_list pa;
     double mfloat;
     mfloat = __builtin_va_arg((pa), gdouble);
 }
 
 void vararg(int, ...);
-void function_as_vararg() {
+void function_as_vararg(void) {
   // CHECK: define {{.*}}function_as_vararg
   // CHECK-NOT: llvm.trap
   vararg(0, focus_changed_cb);

diff  --git a/clang/test/CodeGen/variable-array.c b/clang/test/CodeGen/variable-array.c
index 80ca78d5cf5f1..d0787d3dca02d 100644
--- a/clang/test/CodeGen/variable-array.c
+++ b/clang/test/CodeGen/variable-array.c
@@ -8,12 +8,12 @@ int a(int x)
 }
 
 // PR3247
-int b() {
+int b(void) {
   return sizeof(*(char(*)[puts("asdf")])0);
 }
 
 // PR3247
-int c() {
+int c(void) {
   static int (*y)[puts("asdf")];
   return sizeof(*y);
 }

diff  --git a/clang/test/CodeGen/ve-abi.c b/clang/test/CodeGen/ve-abi.c
index 74248c1ce049d..d9a415f72da7f 100644
--- a/clang/test/CodeGen/ve-abi.c
+++ b/clang/test/CodeGen/ve-abi.c
@@ -90,7 +90,7 @@ long double __complex__ fun_qcomplex(long double __complex__ a, long double __co
 }
 
 extern int hoge();
-void func() {
+void func(void) {
   // CHECK: %call = call signext i32 (i32, i32, i32, i32, i32, i32, i32, ...) bitcast (i32 (...)* @hoge to i32 (i32, i32, i32, i32, i32, i32, i32, ...)*)(i32 noundef signext 1, i32 noundef signext 2, i32 noundef signext 3, i32 noundef signext 4, i32 noundef signext 5, i32 noundef signext 6, i32 noundef signext 7)
   hoge(1, 2, 3, 4, 5, 6, 7);
 }

diff  --git a/clang/test/CodeGen/vecshift.c b/clang/test/CodeGen/vecshift.c
index 9884975c3c53f..bab0d6eb63a43 100644
--- a/clang/test/CodeGen/vecshift.c
+++ b/clang/test/CodeGen/vecshift.c
@@ -48,7 +48,7 @@ vector_uchar4 vuc4;
 vector_ushort4 vus4;
 vector_uint4 vui4;
 
-void foo() {
+void foo(void) {
   vc8 = 1 << vc8;
 // CHECK: [[t0:%.+]] = load <8 x i8>, <8 x i8>* {{@.+}},
 // CHECK: shl <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>, [[t0]]

diff  --git a/clang/test/CodeGen/vector.c b/clang/test/CodeGen/vector.c
index dfd75b6095ea7..9b9a35649abe1 100644
--- a/clang/test/CodeGen/vector.c
+++ b/clang/test/CodeGen/vector.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -ffreestanding -triple i386-apple-darwin9 -O1 -target-cpu corei7 -debug-info-kind=limited -emit-llvm %s -o - | FileCheck %s
 typedef short __v4hi __attribute__ ((__vector_size__ (8)));
 
-void test1() {
+void test1(void) {
   __v4hi A = (__v4hi)0LL;
 }
 
@@ -9,7 +9,7 @@ __v4hi x = {1,2,3};
 __v4hi y = {1,2,3,4};
 
 typedef int vty __attribute((vector_size(16)));
-int test2() { vty b; return b[2LL]; }
+int test2(void) { vty b; return b[2LL]; }
 
 // PR4339
 typedef float vec4 __attribute__((vector_size(16)));
@@ -54,7 +54,7 @@ unsigned long test_epi16(__m128i x) { return _mm_extract_epi16(x, 3); }
 // CHECK: extractelement <8 x i16> {{.*}}, {{i32|i64}} 3
 // CHECK: zext i16 {{.*}} to i32
 
-void extractinttypes() {
+void extractinttypes(void) {
   extern int check_extract_result_int;
   extern __typeof(_mm_extract_epi8(_mm_setzero_si128(), 3)) check_result_int;
   extern __typeof(_mm_extract_epi16(_mm_setzero_si128(), 3)) check_result_int;

diff  --git a/clang/test/CodeGen/vectorcall.c b/clang/test/CodeGen/vectorcall.c
index a1f781fee5df0..9cbbbb1562910 100644
--- a/clang/test/CodeGen/vectorcall.c
+++ b/clang/test/CodeGen/vectorcall.c
@@ -85,7 +85,7 @@ struct HVA4 __vectorcall hva6(struct HVA4 a, struct HVA4 b) { return b;}
 // X32: define dso_local x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* inreg noundef %b)
 // X64: define dso_local x86_vectorcallcc %struct.HVA4 @"\01hva6@@128"(%struct.HVA4 inreg %a.coerce, %struct.HVA4* noundef %b)
 
-struct HVA5 __vectorcall hva7() {struct HVA5 a = {}; return a;}
+struct HVA5 __vectorcall hva7(void) {struct HVA5 a = {}; return a;}
 // X32: define dso_local x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* inreg noalias sret(%struct.HVA5) align 16 %agg.result)
 // X64: define dso_local x86_vectorcallcc void @"\01hva7@@0"(%struct.HVA5* noalias sret(%struct.HVA5) align 16 %agg.result)
 

diff  --git a/clang/test/CodeGen/vla-4.c b/clang/test/CodeGen/vla-4.c
index 6e4ca985a6acc..a705213c7c53a 100644
--- a/clang/test/CodeGen/vla-4.c
+++ b/clang/test/CodeGen/vla-4.c
@@ -1,24 +1,24 @@
 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
 
-int f();
-int h();
+int f(void);
+int h(void);
 
-void t1() {
+void t1(void) {
   _Atomic(typeof((int (*)[f()]) h())) v;
   // CHECK:      [[N:%.*]] = alloca i32*, align 4
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
+  // CHECK-NEXT: [[P:%.*]] = call i32 @f
+  // CHECK-NEXT: [[P:%.*]] = call i32 @h
 }
 
-void t2() {
+void t2(void) {
   typeof(typeof((int (*)[f()]) h())) v;
   // CHECK:      [[N:%.*]] = alloca i32*, align 4
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
+  // CHECK-NEXT: [[P:%.*]] = call i32 @f
+  // CHECK-NEXT: [[P:%.*]] = call i32 @h
 }
 
 void t3(typeof((int (*)[f()]) h()) v) {
   // CHECK:      store i32* %v, i32** %{{[.0-9A-Za-z]+}}, align 4
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @f to i32 ()*)()
-  // CHECK-NEXT: [[P:%.*]] = call i32 bitcast (i32 (...)* @h to i32 ()*)()
+  // CHECK-NEXT: [[P:%.*]] = call i32 @f
+  // CHECK-NEXT: [[P:%.*]] = call i32 @h
 }

diff  --git a/clang/test/CodeGen/vla.c b/clang/test/CodeGen/vla.c
index 7ea9988536cbf..813811738ff6d 100644
--- a/clang/test/CodeGen/vla.c
+++ b/clang/test/CodeGen/vla.c
@@ -55,7 +55,7 @@ void f_8403108(unsigned x) {
 // pr7827
 void function(short width, int data[][width]) {} // expected-note {{passing argument to parameter 'data' here}}
 
-void test() {
+void test(void) {
      int bork[4][13];
      // CHECK: call void @function(i16 noundef signext 1, i32* noundef null)
      function(1, 0);
@@ -66,7 +66,7 @@ void test() {
 }
 
 void function1(short width, int data[][width][width]) {}
-void test1() {
+void test1(void) {
      int bork[4][13][15];
      // CHECK: call void @function1(i16 noundef signext 1, i32* noundef {{.*}})
      function1(1, bork);
@@ -213,7 +213,7 @@ void test10(int a[static 0]) {}
 
 const int constant = 32;
 // CHECK: define {{.*}}pr44406(
-int pr44406() {
+int pr44406(void) {
   int n = 0;
   // Do not fold this VLA to an array of constant bound; that would miscompile
   // this testcase.

diff  --git a/clang/test/CodeGen/vlt_to_pointer.c b/clang/test/CodeGen/vlt_to_pointer.c
index d46d7275ac773..f06a1607ef469 100644
--- a/clang/test/CodeGen/vlt_to_pointer.c
+++ b/clang/test/CodeGen/vlt_to_pointer.c
@@ -17,7 +17,7 @@ int test(int n, int (*(*fn)(void))[n]) {
 }
 
 // CHECK-LABEL: @main
-int main()
+int main(void)
 {
     int m = 3;
     int (*d)[3*2] = c;

diff  --git a/clang/test/CodeGen/volatile-1.c b/clang/test/CodeGen/volatile-1.c
index a0c7093363d70..cb1beab209e3c 100644
--- a/clang/test/CodeGen/volatile-1.c
+++ b/clang/test/CodeGen/volatile-1.c
@@ -23,7 +23,7 @@ int printf(const char *, ...);
 // reduced.
 
 // CHECK-LABEL: define {{.*}}void @test()
-void test() {
+void test(void) {
   // CHECK: load volatile [[INT]], [[INT]]* @i
   i;
   // CHECK-NEXT: load volatile [[INT]], [[INT]]* getelementptr inbounds ([[CINT]], [[CINT]]* @ci, i32 0, i32 0), align 4
@@ -304,7 +304,7 @@ void test() {
 
 extern volatile enum X x;
 // CHECK-LABEL: define {{.*}}void @test1()
-void test1() {
+void test1(void) {
   extern void test1_helper(void);
   test1_helper();
   // CHECK: call {{.*}}void @test1_helper()
@@ -315,7 +315,7 @@ void test1() {
 }
 
 // CHECK: define {{.*}} @test2()
-int test2() {
+int test2(void) {
   // CHECK: load volatile i32, i32*
   // CHECK-NEXT: load volatile i32, i32*
   // CHECK-NEXT: load volatile i32, i32*

diff  --git a/clang/test/CodeGen/volatile-2.c b/clang/test/CodeGen/volatile-2.c
index 4cd21af527a96..ea76b5b7c4492 100644
--- a/clang/test/CodeGen/volatile-2.c
+++ b/clang/test/CodeGen/volatile-2.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
 
-void test0() {
+void test0(void) {
   // CHECK-LABEL: define{{.*}} void @test0()
   // CHECK:      [[F:%.*]] = alloca float
   // CHECK-NEXT: [[REAL:%.*]] = load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @test0_v, i32 0, i32 0), align 4
@@ -11,7 +11,7 @@ void test0() {
   float f = (float) test0_v;
 }
 
-void test1() {
+void test1(void) {
   // CHECK-LABEL: define{{.*}} void @test1()
   // CHECK:      [[REAL:%.*]] = load volatile float, float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4
   // CHECK-NEXT: [[IMAG:%.*]] = load volatile float, float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4

diff  --git a/clang/test/CodeGen/volatile-complex.c b/clang/test/CodeGen/volatile-complex.c
index 4ecc3b1e7adcd..4ebae5457e9f8 100644
--- a/clang/test/CodeGen/volatile-complex.c
+++ b/clang/test/CodeGen/volatile-complex.c
@@ -13,7 +13,7 @@ volatile _Complex float cf32 __attribute__((aligned(32)));
 volatile _Complex double cd32 __attribute__((aligned(32)));
 
 // CHECK-LABEL: define{{.*}} void @test_cf()
-void test_cf() {
+void test_cf(void) {
   // CHECK:      load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 0), align 4
   // CHECK-NEXT: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 1), align 4
   (void)(cf);
@@ -26,7 +26,7 @@ void test_cf() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test_cd()
-void test_cd() {
+void test_cd(void) {
   // CHECK:      load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd, i32 0, i32 0), align 8
   // CHECK-NEXT: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd, i32 0, i32 1), align 8
   (void)(cd);
@@ -39,7 +39,7 @@ void test_cd() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test_cf32()
-void test_cf32() {
+void test_cf32(void) {
   // CHECK:      load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf32, i32 0, i32 0), align 32
   // CHECK-NEXT: load volatile float, float* getelementptr inbounds ({ float, float }, { float, float }* @cf32, i32 0, i32 1), align 4
   (void)(cf32);
@@ -52,7 +52,7 @@ void test_cf32() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test_cd32()
-void test_cd32() {
+void test_cd32(void) {
   // CHECK:      load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd32, i32 0, i32 0), align 32
   // CHECK-NEXT: load volatile double, double* getelementptr inbounds ({ double, double }, { double, double }* @cd32, i32 0, i32 1), align 8
   (void)(cd32);

diff  --git a/clang/test/CodeGen/volatile.c b/clang/test/CodeGen/volatile.c
index 93772b8f8e0e8..d901673bfefb3 100644
--- a/clang/test/CodeGen/volatile.c
+++ b/clang/test/CodeGen/volatile.c
@@ -37,7 +37,7 @@ volatile struct {int x;} aggFct(void);
 typedef volatile int volatile_int;
 volatile_int vtS;
 
-int main() {
+int main(void) {
   int i;
 // CHECK: [[I:%[a-zA-Z0-9_.]+]] = alloca i32
   // load

diff  --git a/clang/test/CodeGen/whilestmt.c b/clang/test/CodeGen/whilestmt.c
index 3973b2860db98..3910406ac88cb 100644
--- a/clang/test/CodeGen/whilestmt.c
+++ b/clang/test/CodeGen/whilestmt.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o -
 
-int bar();
-int foo() {
+int bar(void);
+int foo(void) {
   int i;
   i = 1 + 2;
   while(1) {
@@ -12,7 +12,7 @@ int foo() {
 }
 
 
-int foo1() {
+int foo1(void) {
   int i;
   i = 1 + 2;
   while(1) {
@@ -25,7 +25,7 @@ int foo1() {
 }
 
 
-int foo2() {
+int foo2(void) {
   int i;
   i = 1 + 2;
   while(1) {
@@ -38,7 +38,7 @@ int foo2() {
 }
 
 
-int foo3() {
+int foo3(void) {
   int i;
   i = 1 + 2;
   while(1) {
@@ -50,7 +50,7 @@ int foo3() {
 }
 
 
-int foo4() {
+int foo4(void) {
   int i;
   i = 1 + 2;
   while(1) {

diff  --git a/clang/test/CodeGen/win64-i128.c b/clang/test/CodeGen/win64-i128.c
index 0adf617f9da1d..32595cb6abf62 100644
--- a/clang/test/CodeGen/win64-i128.c
+++ b/clang/test/CodeGen/win64-i128.c
@@ -5,7 +5,7 @@
 
 typedef int int128_t __attribute__((mode(TI)));
 
-int128_t foo() { return 0; }
+int128_t foo(void) { return 0; }
 
 // GNU64: define dso_local <2 x i64> @foo()
 // MSC64: define dso_local <2 x i64> @foo()

diff  --git a/clang/test/CodeGen/windows-itanium.c b/clang/test/CodeGen/windows-itanium.c
index 09613e19c125e..ad2e8a78e719a 100644
--- a/clang/test/CodeGen/windows-itanium.c
+++ b/clang/test/CodeGen/windows-itanium.c
@@ -4,7 +4,7 @@
 // RUN: %clang_cc1 -triple i686-windows-itanium -emit-llvm -x c++ %s -o - \
 // RUN:    | FileCheck %s -check-prefix CHECK-CXX -check-prefix CHECK
 
-int function() {
+int function(void) {
   return 32;
 }
 

diff  --git a/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c b/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c
index 47f7f99063450..bec5b2f9851c1 100644
--- a/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c
+++ b/clang/test/CodeGen/windows-on-arm-dllimport-dllexport.c
@@ -4,14 +4,14 @@ __declspec(dllexport) int export_int;
 
 __declspec(dllimport) int import_int;
 
-__declspec(dllexport) void export_declared_function();
+__declspec(dllexport) void export_declared_function(void);
 
-__declspec(dllexport) void export_implemented_function() {
+__declspec(dllexport) void export_implemented_function(void) {
 }
 
 __declspec(dllimport) void import_function(int);
 
-void call_imported_function() {
+void call_imported_function(void) {
   export_declared_function();
   return import_function(import_int);
 }

diff  --git a/clang/test/CodeGen/windows-swiftcall.c b/clang/test/CodeGen/windows-swiftcall.c
index ce563676c7352..265650b9d6109 100644
--- a/clang/test/CodeGen/windows-swiftcall.c
+++ b/clang/test/CodeGen/windows-swiftcall.c
@@ -35,7 +35,7 @@ SWIFTCALL void context_error_1(CONTEXT int *self, ERROR float **error) {}
 // CHECK:       store float* [[T0]], float** [[TEMP]], align 8
 // CHECK:       [[T0:%.*]] = load float*, float** [[TEMP]], align 8
 // CHECK:       store float* [[T0]], float** [[ERRORARG]], align 8
-void test_context_error_1() {
+void test_context_error_1(void) {
   int x;
   float *error;
   context_error_1(&x, &error);
@@ -73,7 +73,7 @@ typedef int int8 __attribute__((ext_vector_type(8)));
   }                                      \
   SWIFTCALL void take_##TYPE(TYPE v) {   \
   }                                      \
-  void test_##TYPE() {                   \
+  void test_##TYPE(void) {               \
     take_##TYPE(return_##TYPE());        \
   }
 

diff  --git a/clang/test/CodeGen/writable-strings.c b/clang/test/CodeGen/writable-strings.c
index 693fa5ea24baa..92d971fd412b2 100644
--- a/clang/test/CodeGen/writable-strings.c
+++ b/clang/test/CodeGen/writable-strings.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -emit-llvm -o - -fwritable-strings %s
 
-int main() {
+int main(void) {
     char *str = "abc";
     str[0] = '1';
     printf("%s", str);

diff  --git a/clang/test/CodeGen/zero-call-used-regs.c b/clang/test/CodeGen/zero-call-used-regs.c
index 35ce5e2a17806..4437751ba7b31 100644
--- a/clang/test/CodeGen/zero-call-used-regs.c
+++ b/clang/test/CodeGen/zero-call-used-regs.c
@@ -218,32 +218,32 @@
 
 #define __zero_call_used_regs(kind) __attribute__((zero_call_used_regs(kind)))
 
-void no_attribute() {
+void no_attribute(void) {
 }
 
-void __zero_call_used_regs("skip") skip_test() {
+void __zero_call_used_regs("skip") skip_test(void) {
 }
 
-void __zero_call_used_regs("used-gpr-arg") used_gpr_arg_test() {
+void __zero_call_used_regs("used-gpr-arg") used_gpr_arg_test(void) {
 }
 
-void __zero_call_used_regs("used-gpr") used_gpr_test() {
+void __zero_call_used_regs("used-gpr") used_gpr_test(void) {
 }
 
-void __zero_call_used_regs("used-arg") used_arg_test() {
+void __zero_call_used_regs("used-arg") used_arg_test(void) {
 }
 
-void __zero_call_used_regs("used") used_test() {
+void __zero_call_used_regs("used") used_test(void) {
 }
 
-void __zero_call_used_regs("all-gpr-arg") all_gpr_arg_test() {
+void __zero_call_used_regs("all-gpr-arg") all_gpr_arg_test(void) {
 }
 
-void __zero_call_used_regs("all-gpr") all_gpr_test() {
+void __zero_call_used_regs("all-gpr") all_gpr_test(void) {
 }
 
-void __zero_call_used_regs("all-arg") all_arg_test() {
+void __zero_call_used_regs("all-arg") all_arg_test(void) {
 }
 
-void __zero_call_used_regs("all") all_test() {
+void __zero_call_used_regs("all") all_test(void) {
 }

diff  --git a/clang/test/CodeGenObjC/2008-11-25-Blocks.m b/clang/test/CodeGenObjC/2008-11-25-Blocks.m
index 39364d5de00a2..80f45b532371c 100644
--- a/clang/test/CodeGenObjC/2008-11-25-Blocks.m
+++ b/clang/test/CodeGenObjC/2008-11-25-Blocks.m
@@ -2,16 +2,16 @@
 // rdar://6394879
 
 @interface bork
-- (id)B:(void (^)())blk;
+- (id)B:(void (^)(void))blk;
 - (void)C;
 @end
 @implementation bork
-- (id)B:(void (^)())blk {
+- (id)B:(void (^)(void))blk {
   __attribute__((__blocks__(byref))) bork* new = ((void *)0);
   blk();
 }
 - (void)C {
   __attribute__((__blocks__(byref))) id var;
-  [self B:^() {}];
+  [self B:^(void) {}];
 }
 @end

diff  --git a/clang/test/CodeGenObjC/2009-02-05-VolatileProp.m b/clang/test/CodeGenObjC/2009-02-05-VolatileProp.m
index 1f696ac7c2d00..01aecfd9fe4d2 100644
--- a/clang/test/CodeGenObjC/2009-02-05-VolatileProp.m
+++ b/clang/test/CodeGenObjC/2009-02-05-VolatileProp.m
@@ -2,7 +2,7 @@
 // rdar://6551276
 
 void foo(const unsigned short *);
-void bar() {
+void bar(void) {
   unsigned short *s[3];
   int i;
   @try { } @catch (id anException) { }

diff  --git a/clang/test/CodeGenObjC/arc-blocks-exceptions.m b/clang/test/CodeGenObjC/arc-blocks-exceptions.m
index ae67d5a32b2c4..b54061af7d3f3 100644
--- a/clang/test/CodeGenObjC/arc-blocks-exceptions.m
+++ b/clang/test/CodeGenObjC/arc-blocks-exceptions.m
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -fobjc-runtime-has-weak -fexceptions -disable-llvm-passes -o - %s | FileCheck %s
 
 void test1(_Bool c) {
-  void test1_fn(void (^blk)());
+  void test1_fn(void (^blk)(void));
   __weak id weakId = 0;
   test1_fn(c ? ^{ (void)weakId; } : 0);
 

diff  --git a/clang/test/CodeGenObjC/arc-blocks.m b/clang/test/CodeGenObjC/arc-blocks.m
index fb492e14e73ed..81ea33a0b7e74 100644
--- a/clang/test/CodeGenObjC/arc-blocks.m
+++ b/clang/test/CodeGenObjC/arc-blocks.m
@@ -555,7 +555,7 @@ void test13(id x) {
 }
 
 // <rdar://problem/10907510>
-void test14() {
+void test14(void) {
   void (^const x[1])(void) = { ^{} };
 }
 
@@ -567,7 +567,7 @@ void test15(int a) {
 }
 
 // rdar://11016025
-void test16() {
+void test16(void) {
   void (^BLKVAR)(void) = ^{ BLKVAR(); };
 
   // CHECK-LABEL: define{{.*}} void @test16(

diff  --git a/clang/test/CodeGenObjC/arc-bridged-cast.m b/clang/test/CodeGenObjC/arc-bridged-cast.m
index da8f0e5e81acc..2d44dd1fca06f 100644
--- a/clang/test/CodeGenObjC/arc-bridged-cast.m
+++ b/clang/test/CodeGenObjC/arc-bridged-cast.m
@@ -95,7 +95,7 @@ void bridge_of_cf(int *i) {
 }
 
 // CHECK-LABEL: define{{.*}} %struct.__CFString* @bridge_of_paren_expr()
-CFStringRef bridge_of_paren_expr() {
+CFStringRef bridge_of_paren_expr(void) {
   // CHECK-NOT: "@llvm.objc"
   CFStringRef r = (__bridge CFStringRef)(CreateNSString());
   r = (__bridge CFStringRef)((NSString *)(CreateNSString()));

diff  --git a/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout-2.m b/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout-2.m
index e944e35ed1074..1375fe91c8f88 100644
--- a/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout-2.m
+++ b/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout-2.m
@@ -7,36 +7,36 @@
 extern void NSLog(NSString *format, ...);
 extern int printf(const char *, ...);
 
-int main() {
+int main(void) {
   NSString *strong;
   unsigned long long eightByte = 0x8001800181818181ull;
   // Test1
   // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-  void (^block1)() = ^{ printf("%#llx", eightByte); NSLog(@"%@", strong); };
+  void (^block1)(void) = ^{ printf("%#llx", eightByte); NSLog(@"%@", strong); };
 
   // Test2
   int i = 1;
   // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-  void (^block2)() = ^{ printf("%#llx, %d", eightByte, i); NSLog(@"%@", strong); };
+  void (^block2)(void) = ^{ printf("%#llx, %d", eightByte, i); NSLog(@"%@", strong); };
 
   //  Test3
   char ch = 'a';
   // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-  void (^block3)() = ^{ printf("%c %#llx", ch, eightByte); NSLog(@"%@", strong); };
+  void (^block3)(void) = ^{ printf("%c %#llx", ch, eightByte); NSLog(@"%@", strong); };
 
   // Test4
   unsigned long fourByte = 0x8001ul;
   // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-  void (^block4)() = ^{ printf("%c %#lx", ch, fourByte); NSLog(@"%@", strong); };
+  void (^block4)(void) = ^{ printf("%c %#lx", ch, fourByte); NSLog(@"%@", strong); };
 
   // Test5
   // Nothing gets printed here since the descriptor of this block is merged with
   // the descriptor of Test3's block.
-  void (^block5)() = ^{ NSLog(@"%@", strong); printf("%c %#llx", ch, eightByte); };
+  void (^block5)(void) = ^{ NSLog(@"%@", strong); printf("%c %#llx", ch, eightByte); };
 
   // Test6
   // CHECK: Block variable layout: BL_OPERATOR:0
-  void (^block6)() = ^{ printf("%#llx", eightByte); };
+  void (^block6)(void) = ^{ printf("%#llx", eightByte); };
 }
 
 /**

diff  --git a/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout.m b/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout.m
index d1b5783427032..838346cfc265a 100644
--- a/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout.m
+++ b/clang/test/CodeGenObjC/arc-captured-32bit-block-var-layout.m
@@ -6,9 +6,9 @@
 void x(id y) {}
 void y(int a) {}
 
-extern id opaque_id();
+extern id opaque_id(void);
 
-void f() {
+void f(void) {
     __weak id wid;
     __block int byref_int = 0;
     char ch = 'a';
@@ -34,7 +34,7 @@ void f() {
 
 // Test 1
 // CHECK: Inline block variable layout: 0x0320, BL_STRONG:3, BL_BYREF:2, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -45,7 +45,7 @@ void f() {
 
 // Test 2
 // CHECK: Inline block variable layout: 0x0331, BL_STRONG:3, BL_BYREF:3, BL_WEAK:1, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -57,7 +57,7 @@ void f() {
 }
 
 @class NSString, NSNumber;
-void g() {
+void g(void) {
   NSString *foo;
    NSNumber *bar;
    unsigned int bletch;
@@ -66,7 +66,7 @@ void g() {
   NSString *y;
   NSString *z;
 // CHECK: Inline block variable layout: 0x0401, BL_STRONG:4, BL_WEAK:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
    int j = i + bletch;
    x(foo);
    x(bar);
@@ -78,7 +78,7 @@ void g() {
 }
 
 // Test 5 (unions/structs and their nesting):
-void h() {
+void h(void) {
   struct S5 {
     int i1;
     __unsafe_unretained id o1;
@@ -111,7 +111,7 @@ void h() {
                        BL_UNRETAINE:1, BL_NON_OBJECT_WORD:3, BL_BYREF:1, BL_OPERATOR:0
 */
 // CHECK: Block variable layout: BL_BYREF:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
     x(s2.ui.o1);
     x(u2.o1);
     block_id = 0;
@@ -120,13 +120,13 @@ void h() {
 }
 
 // Test for array of stuff.
-void arr1() {
+void arr1(void) {
   struct S {
     __unsafe_unretained id unsafe_unretained_var[4];
  } imported_s;
 
 // CHECK: Block variable layout: BL_UNRETAINED:4, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(imported_s.unsafe_unretained_var[2]);
     };    
 
@@ -134,14 +134,14 @@ void arr1() {
 }
 
 // Test2 for array of stuff.
-void arr2() {
+void arr2(void) {
   struct S {
    int a;
     __unsafe_unretained id unsafe_unretained_var[4];
  } imported_s;
 
 // CHECK: Block variable layout: BL_NON_OBJECT_WORD:1, BL_UNRETAINED:4, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(imported_s.unsafe_unretained_var[2]);
     };    
 
@@ -149,14 +149,14 @@ void arr2() {
 }
 
 // Test3 for array of stuff.
-void arr3() {
+void arr3(void) {
   struct S {
    int a;
     __unsafe_unretained id unsafe_unretained_var[0];
  } imported_s;
 
 // CHECK: Block variable layout: BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
       int i = imported_s.a;
     };    
 
@@ -166,7 +166,7 @@ void arr3() {
 
 // Test4 for array of stuff.
 @class B;
-void arr4() {
+void arr4(void) {
   struct S {
     struct s0 {
       __unsafe_unretained id s_f0;
@@ -182,7 +182,7 @@ void arr4() {
   } captured_s;
 
 // CHECK: Block variable layout: BL_UNRETAINED:3, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
       id i = captured_s.f0.s_f1;
   };
 
@@ -190,7 +190,7 @@ void arr4() {
 }
 
 // Test1 bitfield in cpatured aggregate.
-void bf1() {
+void bf1(void) {
   struct S {
     int flag : 25;
     int flag1: 7;
@@ -200,27 +200,27 @@ void bf1() {
   } s;
 
 // CHECK:  Block variable layout: BL_OPERATOR:0
-  int (^c)() = ^{
+  int (^c)(void) = ^{
       return s.flag;
   };
   c();
 }
 
 // Test2 bitfield in cpatured aggregate.
-void bf2() {
+void bf2(void) {
   struct S {
     int flag : 1;
   } s;
 
 // CHECK: Block variable layout: BL_OPERATOR:0
-  int (^c)() = ^{
+  int (^c)(void) = ^{
       return s.flag;
   };
   c();
 }
 
 // Test3 bitfield in cpatured aggregate.
-void bf3() {
+void bf3(void) {
 
      struct {
         unsigned short _reserved : 16;
@@ -244,7 +244,7 @@ void bf3() {
     } _flags;
 
 // CHECK: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags._draggedNodesAreDeletable;
   };
 
@@ -252,7 +252,7 @@ unsigned char (^c)() = ^{
 }
 
 // Test4 unnamed bitfield
-void bf4() {
+void bf4(void) {
 
      struct {
         unsigned short _reserved : 16;
@@ -279,7 +279,7 @@ void bf4() {
     } _flags;
 
 // CHECK:  Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags._draggedNodesAreDeletable;
   };
 
@@ -289,7 +289,7 @@ unsigned char (^c)() = ^{
 
 
 // Test5 unnamed bitfield.
-void bf5() {
+void bf5(void) {
      struct {
         unsigned char flag : 1;
         unsigned int  : 32;
@@ -297,7 +297,7 @@ void bf5() {
     } _flags;
 
 // CHECK:  Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags.flag;
   };
 
@@ -306,7 +306,7 @@ unsigned char (^c)() = ^{
 
 
 // Test6 0 length bitfield.
-void bf6() {
+void bf6(void) {
      struct {
         unsigned char flag : 1;
         unsigned int  : 0;
@@ -314,7 +314,7 @@ void bf6() {
     } _flags;
 
 // CHECK: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags.flag;
   };
 
@@ -322,7 +322,7 @@ unsigned char (^c)() = ^{
 }
 
 // Test7 large number of captured variables.
-void Test7() {
+void Test7(void) {
     __weak id wid;
     __weak id wid1, wid2, wid3, wid4;
     __weak id wid5, wid6, wid7, wid8;
@@ -330,7 +330,7 @@ void Test7() {
     __weak id wid13, wid14, wid15, wid16;
     const id bar = (id) opaque_id();
 // CHECK: Block variable layout: BL_STRONG:1, BL_WEAK:16, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
       x(bar);
       x(wid1);
       x(wid2);
@@ -353,7 +353,7 @@ void Test7() {
 
 
 // Test 8 very large number of captured variables.
-void Test8() {
+void Test8(void) {
 __weak id wid;
     __weak id wid1, wid2, wid3, wid4;
     __weak id wid5, wid6, wid7, wid8;
@@ -365,7 +365,7 @@ void Test8() {
     __weak id w13, w14, w15, w16;
     const id bar = (id) opaque_id();
 // CHECK: Block variable layout: BL_STRONG:1, BL_WEAK:16, BL_WEAK:16, BL_WEAK:1, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
       x(bar);
       x(wid1);
       x(wid2);

diff  --git a/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m b/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
index 022b0969a7eb0..24e1beaf1824f 100644
--- a/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
+++ b/clang/test/CodeGenObjC/arc-captured-block-var-inlined-layout.m
@@ -7,9 +7,9 @@
 void x(id y) {}
 void y(int a) {}
 
-extern id opaque_id();
+extern id opaque_id(void);
 
-void f() {
+void f(void) {
     __block int byref_int = 0;
     const id bar = (id) opaque_id();
     id baz = 0;
@@ -18,19 +18,19 @@ void f() {
     __block id bl_var1;
 
 // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
         x(bar);
     };    
 
 // CHECK: Inline block variable layout: 0x0210, BL_STRONG:2, BL_BYREF:1, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
     };    
 
 // CHECK: Inline block variable layout: 0x0230, BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
-    void (^d)() = ^{
+    void (^d)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -40,7 +40,7 @@ void f() {
 
 // CHECK: Inline block variable layout: 0x0231, BL_STRONG:2, BL_BYREF:3, BL_WEAK:1, BL_OPERATOR:0
     __weak id wid;
-    id (^e)() = ^{
+    id (^e)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -51,7 +51,7 @@ void f() {
 
 // CHECK: Inline block variable layout: 0x0235, BL_STRONG:2, BL_BYREF:3, BL_WEAK:5, BL_OPERATOR:0
     __weak id wid1, wid2, wid3, wid4;
-    id (^f)() = ^{
+    id (^f)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -65,7 +65,7 @@ void f() {
     };
 
 // CHECK: Inline block variable layout: 0x035, BL_BYREF:3, BL_WEAK:5, BL_OPERATOR:0
-    id (^g)() = ^{
+    id (^g)(void) = ^{
         byref_int = 1;
         bl_var1 = 0;
         byref_bab = 0;
@@ -77,18 +77,18 @@ void f() {
     };
 
 // CHECK: Inline block variable layout: 0x01, BL_WEAK:1, BL_OPERATOR:0
-    id (^h)() = ^{
+    id (^h)(void) = ^{
         return wid;
     };
 
 // CHECK: Inline block variable layout: 0x020, BL_BYREF:2, BL_OPERATOR:0
-    void (^ii)() = ^{
+    void (^ii)(void) = ^{
        byref_int = 1;
        byref_bab = 0;
     };
 
 // CHECK: Inline block variable layout: 0x0102, BL_STRONG:1, BL_WEAK:2, BL_OPERATOR:0
-    void (^jj)() = ^{
+    void (^jj)(void) = ^{
       x(bar);
       x(wid1);
       x(wid2);
@@ -99,7 +99,7 @@ void f() {
 @class NSString;
 extern void NSLog(NSString *format, ...);
 typedef void (^dispatch_block_t)(void);
-int main() {
+int main(void) {
         __strong NSString *s1 = 0;
         __strong NSString *s2 = 0;
         __weak NSString *w1 = 0;

diff  --git a/clang/test/CodeGenObjC/arc-captured-block-var-layout.m b/clang/test/CodeGenObjC/arc-captured-block-var-layout.m
index f8518d1c44b88..5713517196149 100644
--- a/clang/test/CodeGenObjC/arc-captured-block-var-layout.m
+++ b/clang/test/CodeGenObjC/arc-captured-block-var-layout.m
@@ -6,9 +6,9 @@
 void x(id y) {}
 void y(int a) {}
 
-extern id opaque_id();
+extern id opaque_id(void);
 
-void f() {
+void f(void) {
     __weak id wid;
     __block int byref_int = 0;
     char ch = 'a';
@@ -35,7 +35,7 @@ void f() {
 // Test 1
 // Inline instruction for block variable layout: 0x0320 (3 strong 2 byref)
 // CHECK-LP64: Inline block variable layout: 0x0320, BL_STRONG:3, BL_BYREF:2, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -47,7 +47,7 @@ void f() {
 // Test 2
 // Inline instruction for block variable layout: 0x0331 (3 strong 3 byref 1 weak)
 // CHECK-LP64: Inline block variable layout: 0x0331, BL_STRONG:3, BL_BYREF:3, BL_WEAK:1, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -59,7 +59,7 @@ void f() {
 }
 
 @class NSString, NSNumber;
-void g() {
+void g(void) {
   NSString *foo;
    NSNumber *bar;
    unsigned int bletch;
@@ -69,7 +69,7 @@ void g() {
   NSString *z;
 // Inline instruction for block variable layout: 0x0401 (4 strong 0 byref 1 weak)
 // CHECK-LP64: Inline block variable layout: 0x0401, BL_STRONG:4, BL_WEAK:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
    int j = i + bletch;
    x(foo);
    x(bar);
@@ -81,7 +81,7 @@ void g() {
 }
 
 // Test 5 (unions/structs and their nesting):
-void h() {
+void h(void) {
   struct S5 {
     int i1;
     __unsafe_unretained id o1;
@@ -110,7 +110,7 @@ void h() {
   __block id block_id;
 
 // CHECK-LP64: Block variable layout: BL_BYREF:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
     x(s2.ui.o1);
     x(u2.o1);
     block_id = 0;
@@ -119,13 +119,13 @@ void h() {
 }
 
 // Test for array of stuff.
-void arr1() {
+void arr1(void) {
   struct S {
     __unsafe_unretained id unsafe_unretained_var[4];
  } imported_s;
 
 // CHECK-LP64: Block variable layout: BL_UNRETAINED:4, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(imported_s.unsafe_unretained_var[2]);
     };    
 
@@ -133,14 +133,14 @@ void arr1() {
 }
 
 // Test2 for array of stuff.
-void arr2() {
+void arr2(void) {
   struct S {
    int a;
     __unsafe_unretained id unsafe_unretained_var[4];
  } imported_s;
 
 // CHECK-LP64: Block variable layout: BL_NON_OBJECT_WORD:1, BL_UNRETAINED:4, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(imported_s.unsafe_unretained_var[2]);
     };    
 
@@ -148,14 +148,14 @@ void arr2() {
 }
 
 // Test3 for array of stuff.
-void arr3() {
+void arr3(void) {
   struct S {
    int a;
     __unsafe_unretained id unsafe_unretained_var[0];
  } imported_s;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
       int i = imported_s.a;
     };    
 
@@ -165,7 +165,7 @@ void arr3() {
 
 // Test4 for array of stuff.
 @class B;
-void arr4() {
+void arr4(void) {
   struct S {
     struct s0 {
       __unsafe_unretained id s_f0;
@@ -181,7 +181,7 @@ void arr4() {
   } captured_s;
 
 // CHECK-LP64: Block variable layout: BL_UNRETAINED:3, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_NON_OBJECT_WORD:1, BL_UNRETAINED:1, BL_OPERATOR:0
-  void (^c)() = ^{
+  void (^c)(void) = ^{
       id i = captured_s.f0.s_f1;
   };
 
@@ -189,7 +189,7 @@ void arr4() {
 }
 
 // Test1 bitfield in cpatured aggregate.
-void bf1() {
+void bf1(void) {
   struct S {
     int flag : 25;
     int flag1: 7;
@@ -199,27 +199,27 @@ void bf1() {
   } s;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  int (^c)() = ^{
+  int (^c)(void) = ^{
       return s.flag;
   };
   c();
 }
 
 // Test2 bitfield in cpatured aggregate.
-void bf2() {
+void bf2(void) {
   struct S {
     int flag : 1;
   } s;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  int (^c)() = ^{
+  int (^c)(void) = ^{
       return s.flag;
   };
   c();
 }
 
 // Test3 bitfield in cpatured aggregate.
-void bf3() {
+void bf3(void) {
 
      struct {
         unsigned short _reserved : 16;
@@ -243,7 +243,7 @@ void bf3() {
     } _flags;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags._draggedNodesAreDeletable;
   };
 
@@ -251,7 +251,7 @@ unsigned char (^c)() = ^{
 }
 
 // Test4 unnamed bitfield
-void bf4() {
+void bf4(void) {
 
      struct {
         unsigned short _reserved : 16;
@@ -278,7 +278,7 @@ void bf4() {
     } _flags;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags._draggedNodesAreDeletable;
   };
 
@@ -288,7 +288,7 @@ unsigned char (^c)() = ^{
 
 
 // Test5 unnamed bitfield.
-void bf5() {
+void bf5(void) {
      struct {
         unsigned char flag : 1;
         unsigned int  : 32;
@@ -296,7 +296,7 @@ void bf5() {
     } _flags;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags.flag;
   };
 
@@ -305,7 +305,7 @@ unsigned char (^c)() = ^{
 
 
 // Test6 0 length bitfield.
-void bf6() {
+void bf6(void) {
      struct {
         unsigned char flag : 1;
         unsigned int  : 0;
@@ -313,7 +313,7 @@ void bf6() {
     } _flags;
 
 // CHECK-LP64: Block variable layout: BL_OPERATOR:0
-  unsigned char (^c)() = ^{
+  unsigned char (^c)(void) = ^{
       return _flags.flag;
   };
 
@@ -321,7 +321,7 @@ unsigned char (^c)() = ^{
 }
 
 // Test7 large number of captured variables.
-void Test7() {
+void Test7(void) {
     __weak id wid;
     __weak id wid1, wid2, wid3, wid4;
     __weak id wid5, wid6, wid7, wid8;
@@ -329,7 +329,7 @@ void Test7() {
     __weak id wid13, wid14, wid15, wid16;
     const id bar = (id) opaque_id();
 // CHECK-LP64: Block variable layout: BL_STRONG:1, BL_WEAK:16, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
       x(bar);
       x(wid1);
       x(wid2);
@@ -352,7 +352,7 @@ void Test7() {
 
 
 // Test 8 very large number of captured variables.
-void Test8() {
+void Test8(void) {
 __weak id wid;
     __weak id wid1, wid2, wid3, wid4;
     __weak id wid5, wid6, wid7, wid8;
@@ -364,7 +364,7 @@ void Test8() {
     __weak id w13, w14, w15, w16;
     const id bar = (id) opaque_id();
 // CHECK-LP64: Block variable layout: BL_STRONG:1, BL_WEAK:16, BL_WEAK:16, BL_WEAK:1, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
       x(bar);
       x(wid1);
       x(wid2);

diff  --git a/clang/test/CodeGenObjC/arc-literals.m b/clang/test/CodeGenObjC/arc-literals.m
index 257c330b9c5ff..e7c03d563598b 100644
--- a/clang/test/CodeGenObjC/arc-literals.m
+++ b/clang/test/CodeGenObjC/arc-literals.m
@@ -13,7 +13,7 @@
 // CHECK: c"prop\00"
 
 // CHECK-LABEL: define{{.*}} void @test_numeric()
-void test_numeric() {
+void test_numeric(void) {
   // CHECK: {{call.*objc_msgSend.*i32 17.* [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]}}
   id ilit = @17;
   // CHECK: {{call.*objc_msgSend.*i32 25.* [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]}}

diff  --git a/clang/test/CodeGenObjC/arc-no-runtime.m b/clang/test/CodeGenObjC/arc-no-runtime.m
index 31f0ed8714cef..408c4f22f97d1 100644
--- a/clang/test/CodeGenObjC/arc-no-runtime.m
+++ b/clang/test/CodeGenObjC/arc-no-runtime.m
@@ -2,7 +2,7 @@
 
 // rdar://problem/9224855
 id make(void) __attribute__((ns_returns_retained));
-void test0() {
+void test0(void) {
   make();
   id x = 0;
   // CHECK: call void @llvm.objc.release(

diff  --git a/clang/test/CodeGenObjC/arc-precise-lifetime.m b/clang/test/CodeGenObjC/arc-precise-lifetime.m
index 5d0efb0914e81..f81c44bf5345a 100644
--- a/clang/test/CodeGenObjC/arc-precise-lifetime.m
+++ b/clang/test/CodeGenObjC/arc-precise-lifetime.m
@@ -3,7 +3,7 @@
 #define PRECISE_LIFETIME __attribute__((objc_precise_lifetime))
 
 id test0_helper(void) __attribute__((ns_returns_retained));
-void test0() {
+void test0(void) {
   PRECISE_LIFETIME id x = test0_helper();
   x = 0;
   // CHECK:      [[X:%.*]] = alloca i8*

diff  --git a/clang/test/CodeGenObjC/arc-rv-attr.m b/clang/test/CodeGenObjC/arc-rv-attr.m
index 7dc535c868400..2af360e9bb169 100644
--- a/clang/test/CodeGenObjC/arc-rv-attr.m
+++ b/clang/test/CodeGenObjC/arc-rv-attr.m
@@ -5,7 +5,7 @@
 
 A *makeA(void);
 
-void test_assign() {
+void test_assign(void) {
   __unsafe_unretained id x;
   x = makeA();
 }
@@ -19,7 +19,7 @@ void test_assign() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_assign_assign() {
+void test_assign_assign(void) {
   __unsafe_unretained id x, y;
   x = y = makeA();
 }
@@ -37,7 +37,7 @@ void test_assign_assign() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_strong_assign_assign() {
+void test_strong_assign_assign(void) {
   __strong id x;
   __unsafe_unretained id y;
   x = y = makeA();
@@ -60,7 +60,7 @@ void test_strong_assign_assign() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_assign_strong_assign() {
+void test_assign_strong_assign(void) {
   __unsafe_unretained id x;
   __strong id y;
   x = y = makeA();
@@ -83,7 +83,7 @@ void test_assign_strong_assign() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_init() {
+void test_init(void) {
   __unsafe_unretained id x = makeA();
 }
 // CHECK-LABEL: define{{.*}} void @test_init()
@@ -96,7 +96,7 @@ void test_init() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_init_assignment() {
+void test_init_assignment(void) {
   __unsafe_unretained id x;
   __unsafe_unretained id y = x = makeA();
 }
@@ -114,7 +114,7 @@ void test_init_assignment() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_strong_init_assignment() {
+void test_strong_init_assignment(void) {
   __unsafe_unretained id x;
   __strong id y = x = makeA();
 }
@@ -134,7 +134,7 @@ void test_strong_init_assignment() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_init_strong_assignment() {
+void test_init_strong_assignment(void) {
   __strong id x;
   __unsafe_unretained id y = x = makeA();
 }
@@ -156,7 +156,7 @@ void test_init_strong_assignment() {
 // CHECK-NEXT:    lifetime.end
 // CHECK-NEXT:    ret void
 
-void test_ignored() {
+void test_ignored(void) {
   makeA();
 }
 // CHECK-LABEL: define{{.*}} void @test_ignored()
@@ -164,7 +164,7 @@ void test_ignored() {
 // CHECK-NEXT:    call void (...) @llvm.objc.clang.arc.noop.use({{.*}} [[T0]])
 // CHECK-NEXT:    ret void
 
-void test_cast_to_void() {
+void test_cast_to_void(void) {
   (void) makeA();
 }
 // CHECK-LABEL: define{{.*}} void @test_cast_to_void()

diff  --git a/clang/test/CodeGenObjC/arc-unbridged-cast.m b/clang/test/CodeGenObjC/arc-unbridged-cast.m
index 72b7b01bb7ed0..f0f32b4c2b6d1 100644
--- a/clang/test/CodeGenObjC/arc-unbridged-cast.m
+++ b/clang/test/CodeGenObjC/arc-unbridged-cast.m
@@ -25,8 +25,8 @@ - (void) setP : (CFStringRef)arg {}
 @end
 
 // rdar://9544832
-CFStringRef SomeOtherFunc() __attribute__((cf_returns_retained));
-id MMM()
+CFStringRef SomeOtherFunc(void) __attribute__((cf_returns_retained));
+id MMM(void)
 {
   id obj = (id)((CFStringRef) __builtin___CFStringMakeConstantString ("" "Some CF String" ""));
   return 0;

diff  --git a/clang/test/CodeGenObjC/arc-unoptimized-byref-var.m b/clang/test/CodeGenObjC/arc-unoptimized-byref-var.m
index bd57335d6e55a..c794e37f562da 100644
--- a/clang/test/CodeGenObjC/arc-unoptimized-byref-var.m
+++ b/clang/test/CodeGenObjC/arc-unoptimized-byref-var.m
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -fobjc-runtime-has-weak -o - %s | FileCheck -check-prefix=CHECK-UNOPT %s
 // rdar://12530881
 
-void test19() {
+void test19(void) {
    __block id x;
    ^{ (void)x; };
 // CHECK-UNOPT-LABEL: define internal void @__Block_byref_object_copy

diff  --git a/clang/test/CodeGenObjC/arc-unsafeclaim.m b/clang/test/CodeGenObjC/arc-unsafeclaim.m
index ca82bbe946bc3..dc353a5afea71 100644
--- a/clang/test/CodeGenObjC/arc-unsafeclaim.m
+++ b/clang/test/CodeGenObjC/arc-unsafeclaim.m
@@ -21,7 +21,7 @@
 
 A *makeA(void);
 
-void test_assign() {
+void test_assign(void) {
   __unsafe_unretained id x;
   x = makeA();
 }
@@ -49,7 +49,7 @@ void test_assign() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_assign_assign() {
+void test_assign_assign(void) {
   __unsafe_unretained id x, y;
   x = y = makeA();
 }
@@ -75,7 +75,7 @@ void test_assign_assign() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_strong_assign_assign() {
+void test_strong_assign_assign(void) {
   __strong id x;
   __unsafe_unretained id y;
   x = y = makeA();
@@ -106,7 +106,7 @@ void test_strong_assign_assign() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_assign_strong_assign() {
+void test_assign_strong_assign(void) {
   __unsafe_unretained id x;
   __strong id y;
   x = y = makeA();
@@ -137,7 +137,7 @@ void test_assign_strong_assign() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_init() {
+void test_init(void) {
   __unsafe_unretained id x = makeA();
 }
 // CHECK-LABEL:        define{{.*}} void @test_init()
@@ -158,7 +158,7 @@ void test_init() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_init_assignment() {
+void test_init_assignment(void) {
   __unsafe_unretained id x;
   __unsafe_unretained id y = x = makeA();
 }
@@ -184,7 +184,7 @@ void test_init_assignment() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_strong_init_assignment() {
+void test_strong_init_assignment(void) {
   __unsafe_unretained id x;
   __strong id y = x = makeA();
 }
@@ -212,7 +212,7 @@ void test_strong_init_assignment() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_init_strong_assignment() {
+void test_init_strong_assignment(void) {
   __strong id x;
   __unsafe_unretained id y = x = makeA();
 }
@@ -242,7 +242,7 @@ void test_init_strong_assignment() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_ignored() {
+void test_ignored(void) {
   makeA();
 }
 // CHECK-LABEL:     define{{.*}} void @test_ignored()
@@ -258,7 +258,7 @@ void test_ignored() {
 // ATTACHED-CALL:              [[T0:%.*]] = call [[A:.*]]* @makeA() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.unsafeClaimAutoreleasedReturnValue) ],
 // ATTACHED-CALL:              call void (...) @llvm.objc.clang.arc.noop.use([[A]]* [[T0]])
 
-void test_cast_to_void() {
+void test_cast_to_void(void) {
   (void) makeA();
 }
 // CHECK-LABEL:     define{{.*}} void @test_cast_to_void()

diff  --git a/clang/test/CodeGenObjC/arc-with-atthrow.m b/clang/test/CodeGenObjC/arc-with-atthrow.m
index 86ed401778013..f61d72af0a7e7 100644
--- a/clang/test/CodeGenObjC/arc-with-atthrow.m
+++ b/clang/test/CodeGenObjC/arc-with-atthrow.m
@@ -3,7 +3,7 @@
 // rdar://10042689
 
 id make(void);
-void test() { 
+void test(void) { 
   @throw make();
 }
 

diff  --git a/clang/test/CodeGenObjC/arc.m b/clang/test/CodeGenObjC/arc.m
index 150f87bc9c0c2..60ef515a3922d 100644
--- a/clang/test/CodeGenObjC/arc.m
+++ b/clang/test/CodeGenObjC/arc.m
@@ -97,7 +97,7 @@ - (id) copy;
 @end
 
 // CHECK-LABEL: define{{.*}} void @test3_unelided()
-void test3_unelided() {
+void test3_unelided(void) {
   extern void test3_helper(void);
 
   // CHECK:      [[X:%.*]] = alloca [[TEST3:%.*]]*
@@ -132,7 +132,7 @@ void test3_unelided() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test3()
-void test3() {
+void test3(void) {
   // CHECK:      [[X:%.*]] = alloca i8*
   // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
@@ -176,7 +176,7 @@ void test3() {
 }
 
 // CHECK-LABEL: define{{.*}} i8* @test4()
-id test4() {
+id test4(void) {
   // Call to +alloc.
   // CHECK:      load {{.*}}, {{.*}}* @"OBJC_CLASSLIST_REFERENCES_
   // CHECK-NEXT: bitcast
@@ -251,7 +251,7 @@ void test5(Test5 *x, id y) {
 
 id test6_helper(void) __attribute__((ns_returns_retained));
 // CHECK-LABEL: define{{.*}} void @test6()
-void test6() {
+void test6(void) {
   // CHECK:      [[X:%.*]] = alloca i8*
   // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
@@ -267,7 +267,7 @@ void test6() {
 
 void test7_helper(id __attribute__((ns_consumed)));
 // CHECK-LABEL: define{{.*}} void @test7()
-void test7() {
+void test7(void) {
   // CHECK:      [[X:%.*]] = alloca i8*
   // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
   // CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 8, i8* [[XPTR1]])
@@ -285,7 +285,7 @@ void test7() {
 }
 
 id test8_helper(void) __attribute__((ns_returns_retained));
-void test8() {
+void test8(void) {
   __unsafe_unretained id x = test8_helper();
   // CHECK:      [[X:%.*]] = alloca i8*
   // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
@@ -301,7 +301,7 @@ void test8() {
 @interface Test10
 @property (retain) Test10 *me;
 @end
-void test10() {
+void test10(void) {
   Test10 *x;
   id y = x.me.me;
 
@@ -498,7 +498,7 @@ @implementation Test17B
 - (int) x { return super.x + 1; }
 @end
 
-void test19() {
+void test19(void) {
   // CHECK-LABEL: define{{.*}} void @test19()
   // CHECK:      [[X:%.*]] = alloca [5 x i8*], align 16
   // CHECK: call void @llvm.lifetime.start
@@ -1146,7 +1146,7 @@ void test49(void) {
 }
 
 // rdar://9380136
-id x();
+id x(void);
 void test50(id y) {
   ({x();});
 // CHECK: [[T0:%.*]] = call i8* @llvm.objc.retain

diff  --git a/clang/test/CodeGenObjC/attr-noreturn.m b/clang/test/CodeGenObjC/attr-noreturn.m
index c413d0557ad21..c7618aa802988 100644
--- a/clang/test/CodeGenObjC/attr-noreturn.m
+++ b/clang/test/CodeGenObjC/attr-noreturn.m
@@ -25,7 +25,7 @@ void testInstanceMethod(Derived *x) {
 // CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*)*)(i8* {{.*}}, i8* {{.*}}){{$}}
 
 // A direct call of a class method will normally never have a null receiver.
-void testClassMethod() {
+void testClassMethod(void) {
   [Derived abort];
 }
 // CHECK-LABEL: @testClassMethod
@@ -40,7 +40,7 @@ + (void) abort __attribute__((noreturn));
 @end
 
 // The class pointer of a weakly-imported class may be null.
-void testWeakImport() {
+void testWeakImport(void) {
   [WeakDerived abort];
 }
 // CHECK-LABEL: @testWeakImport

diff  --git a/clang/test/CodeGenObjC/attr-speculative-load-hardening.m b/clang/test/CodeGenObjC/attr-speculative-load-hardening.m
index 3b4929d935681..e0a4e6a1ee92b 100644
--- a/clang/test/CodeGenObjC/attr-speculative-load-hardening.m
+++ b/clang/test/CodeGenObjC/attr-speculative-load-hardening.m
@@ -1,10 +1,10 @@
 // RUN: %clang -emit-llvm %s -o - -S | FileCheck %s -check-prefix=SLH
 
-int main() __attribute__((speculative_load_hardening)) {
+int main(void) __attribute__((speculative_load_hardening)) {
   return 0;
 }
 
-int test() __attribute__((no_speculative_load_hardening)) {
+int test(void) __attribute__((no_speculative_load_hardening)) {
   return 0;
 }
 

diff  --git a/clang/test/CodeGenObjC/availability-cf-link-guard.m b/clang/test/CodeGenObjC/availability-cf-link-guard.m
index dd599df30397c..fcf532b86799f 100644
--- a/clang/test/CodeGenObjC/availability-cf-link-guard.m
+++ b/clang/test/CodeGenObjC/availability-cf-link-guard.m
@@ -24,7 +24,7 @@
 #define CHECK_OS macos 10.12
 #endif
 
-void use_at_available() {
+void use_at_available(void) {
 #ifdef DEF_CF
   CFBundleGetVersionNumber(0);
 #endif

diff  --git a/clang/test/CodeGenObjC/availability-check-maccatalyst.m b/clang/test/CodeGenObjC/availability-check-maccatalyst.m
index 03ec8edb634f2..b7e3dee72fc52 100644
--- a/clang/test/CodeGenObjC/availability-check-maccatalyst.m
+++ b/clang/test/CodeGenObjC/availability-check-maccatalyst.m
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple x86_64-apple-ios13.1-macabi -emit-llvm -o - %s | FileCheck %s
 
-void use_at_available() {
+void use_at_available(void) {
   // CHECK: call i32 @__isPlatformVersionAtLeast(i32 2, i32 14, i32 0, i32 0)
   // CHECK-NEXT: icmp ne i32
   if (__builtin_available(ios 14, *))

diff  --git a/clang/test/CodeGenObjC/availability-check.m b/clang/test/CodeGenObjC/availability-check.m
index 518afc4d33450..eceaf973119fb 100644
--- a/clang/test/CodeGenObjC/availability-check.m
+++ b/clang/test/CodeGenObjC/availability-check.m
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.11 -emit-llvm -o - %s | FileCheck %s
 
-void use_at_available() {
+void use_at_available(void) {
   // CHECK: call i32 @__isPlatformVersionAtLeast(i32 1, i32 10, i32 12, i32 0)
   // CHECK-NEXT: icmp ne
   if (__builtin_available(macos 10.12, *))

diff  --git a/clang/test/CodeGenObjC/block-6.m b/clang/test/CodeGenObjC/block-6.m
index 8e8e4f9b6f308..6d6ea7df737fb 100644
--- a/clang/test/CodeGenObjC/block-6.m
+++ b/clang/test/CodeGenObjC/block-6.m
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 | FileCheck %s
 // rdar://8893785
 
-void MYFUNC() {
+void MYFUNC(void) {
 // CHECK-LABEL:    define{{.*}} void @MYFUNC()
 // CHECK:      [[OBSERVER_SLOT:%.*]] = alloca [[OBSERVER_T:%.*]], align 8
 

diff  --git a/clang/test/CodeGenObjC/block-byref-debuginfo.m b/clang/test/CodeGenObjC/block-byref-debuginfo.m
index 15ff53e0635ff..d815d8d9d56b1 100644
--- a/clang/test/CodeGenObjC/block-byref-debuginfo.m
+++ b/clang/test/CodeGenObjC/block-byref-debuginfo.m
@@ -40,7 +40,7 @@
 
 void (^bptr)(void);
 
-int func() {
+int func(void) {
   __attribute__((__blocks__(byref))) struct Foo foo;
   ^{ foo.data = 0; }();
   __block struct Foo2 foo2;

diff  --git a/clang/test/CodeGenObjC/block-byref-variable-layout.m b/clang/test/CodeGenObjC/block-byref-variable-layout.m
index a03617bce2938..3fa07dba756ca 100644
--- a/clang/test/CodeGenObjC/block-byref-variable-layout.m
+++ b/clang/test/CodeGenObjC/block-byref-variable-layout.m
@@ -3,13 +3,13 @@
 // rdar://12759433
 @class NSString;
 
-void Test12759433() {
+void Test12759433(void) {
  __block __unsafe_unretained NSString *uuByref = (__bridge NSString *)(void*)0x102030405060708;
- void (^block)() = ^{ uuByref = 0; };
+ void (^block)(void) = ^{ uuByref = 0; };
  block();
 }
 // CHECK: %struct.__block_byref_uuByref = type { i8*, %struct.__block_byref_uuByref*, i32, i32, [[ZERO:%.*]]* }
-int main() {
+int main(void) {
   __block __weak id wid;
   __block long XXX;
   __block id ID;
@@ -19,7 +19,7 @@ int main() {
      void *pv;
      __unsafe_unretained id unsunr;
   } import;
-  void (^c)() = ^{
+  void (^c)(void) = ^{
 // Inline flag for BYREF variable layout (1107296256): BLOCK_BYREF_HAS_COPY_DISPOSE BLOCK_BYREF_LAYOUT_WEAK
 // CHECK: store i32 1107296256, i32* [[T0:%.*]]
   wid = 0;
@@ -43,7 +43,7 @@ int main() {
 
 // rdar://12787751
 typedef char mds_path_t[1024];
-void directVolumePerfWaitForStoreState()
+void directVolumePerfWaitForStoreState(void)
 {
  __block mds_path_t path;
 }

diff  --git a/clang/test/CodeGenObjC/block-ptr-type-crash.m b/clang/test/CodeGenObjC/block-ptr-type-crash.m
index 385d645858973..07f226780cf60 100644
--- a/clang/test/CodeGenObjC/block-ptr-type-crash.m
+++ b/clang/test/CodeGenObjC/block-ptr-type-crash.m
@@ -10,7 +10,7 @@
     AnEnumA
 };
 
-typedef void (^BlockType)();
+typedef void (^BlockType)(void);
 @interface MyClass
 @end
 @implementation MyClass

diff  --git a/clang/test/CodeGenObjC/block-var-layout.m b/clang/test/CodeGenObjC/block-var-layout.m
index 00409f3891b93..27fbcb3af5fe0 100644
--- a/clang/test/CodeGenObjC/block-var-layout.m
+++ b/clang/test/CodeGenObjC/block-var-layout.m
@@ -17,9 +17,9 @@
 void x(id y) {}
 void y(int a) {}
 
-extern id opaque_id();
+extern id opaque_id(void);
 
-void f() {
+void f(void) {
     __block int byref_int = 0;
     char ch = 'a';
     char ch1 = 'b';
@@ -48,7 +48,7 @@ void f() {
 // Test 1
 // byref int, short, char, char, char, id, id, strong void*, byref id
 // CHECK-LP64: block variable layout for block: 0x01, 0x35, 0x10, 0x00
-    void (^b)() = ^{
+    void (^b)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -61,7 +61,7 @@ void f() {
 // byref int, short, char, char, char, id, id, strong void*, byref void*, byref id
 // 01 36 10 00
 // CHECK-LP64: block variable layout for block: 0x01, 0x36, 0x10, 0x00
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -77,7 +77,7 @@ void f() {
 // 01 34 11 30 00
 // FIXME: we'd get a better format here if we sorted by scannability, not just alignment
 // CHECK-LP64: block variable layout for block: 0x01, 0x35, 0x30, 0x00
-    void (^d)() = ^{
+    void (^d)(void) = ^{
         byref_int = sh + ch+ch1+ch2 ;
         x(bar);
         x(baz);
@@ -93,14 +93,14 @@ void f() {
 // 01 41 11 11 00
 // CHECK-LP64: block variable layout for block: 0x01, 0x41, 0x11, 0x11, 0x00
     struct S s2;
-    void (^e)() = ^{
+    void (^e)(void) = ^{
         x(s2.o1);
     };    
     e();
 }
 
 // Test 5 (unions/structs and their nesting):
-void Test5() {
+void Test5(void) {
   struct S5 {
     int i1;
     id o1;
@@ -130,7 +130,7 @@ void Test5() {
 // struct s2 (int, id, int, id, int, id?), union u2 (id?)
 // 01 41 11 12 00
 // CHECK-LP64: block variable layout for block: 0x01, 0x41, 0x11, 0x12, 0x00
-  void (^c)() = ^{
+  void (^c)(void) = ^{
     x(s2.ui.o1);
     x(u2.o1);
   };
@@ -142,12 +142,12 @@ void Test5() {
 void notifyBlock(id dependentBlock) {
  id singleObservationToken;
  id token;
- void (^b)();
+ void (^b)(void);
 
-// id, id, void(^)()
+// id, id, void(^)(void)
 // 01 33 00
 // CHECK-LP64: block variable layout for block: 0x01, 0x33, 0x00
- void (^wrapperBlock)() = ^() {
+ void (^wrapperBlock)(void) = ^(void) {
      CFRelease(singleObservationToken);
      CFRelease(singleObservationToken);
      CFRelease(token);
@@ -157,10 +157,10 @@ void notifyBlock(id dependentBlock) {
  wrapperBlock();
 }
 
-void test_empty_block() {
+void test_empty_block(void) {
 // 01 00
 // CHECK-LP64: block variable layout for block: 0x01, 0x30, 0x00
-  void (^wrapperBlock)() = ^() {
+  void (^wrapperBlock)(void) = ^(void) {
   };
  wrapperBlock();
 }
@@ -168,7 +168,7 @@ void test_empty_block() {
 // rdar://16111839
 typedef union { char ch[8];  } SS;
 typedef struct { SS s[4]; } CS;
-void test_union_in_layout() {
+void test_union_in_layout(void) {
   CS cs;
   ^{ cs; };
 }

diff  --git a/clang/test/CodeGenObjC/blocks-1.m b/clang/test/CodeGenObjC/blocks-1.m
index 6278756f61ba8..4974abda16c59 100644
--- a/clang/test/CodeGenObjC/blocks-1.m
+++ b/clang/test/CodeGenObjC/blocks-1.m
@@ -36,7 +36,7 @@ void test1(NSDictionary * dict) {
 @interface D
 @end
 
-void foo() {
+void foo(void) {
   __block __weak D *weakSelf;
   ^{ (void)weakSelf; };
   D *l;
@@ -46,7 +46,7 @@ void foo() {
 
 void (^__weak b)(void);
 
-void test2() {
+void test2(void) {
   __block int i = 0;
   b = ^ {  ++i; };
 }

diff  --git a/clang/test/CodeGenObjC/blocks-2.m b/clang/test/CodeGenObjC/blocks-2.m
index 512c8d861e16c..9d2e4111cf4ff 100644
--- a/clang/test/CodeGenObjC/blocks-2.m
+++ b/clang/test/CodeGenObjC/blocks-2.m
@@ -15,7 +15,7 @@ id test0(id x) {
 
 // <rdar://problem/8224178>: cleanup __block variables on EH path
 // CHECK: define{{.*}} void @{{.*}}test1
-void test1() {
+void test1(void) {
   extern void test1_help(void (^x)(void));
 
   // CHECK:      [[N:%.*]] = alloca [[N_T:%.*]], align 8

diff  --git a/clang/test/CodeGenObjC/blocks-3.m b/clang/test/CodeGenObjC/blocks-3.m
index a7edc1243cf51..001f371010782 100644
--- a/clang/test/CodeGenObjC/blocks-3.m
+++ b/clang/test/CodeGenObjC/blocks-3.m
@@ -8,14 +8,14 @@
 
 // RUN: grep 'object_dispose' %t | count 29
 
-int main() {
+int main(void) {
   typedef id aid __attribute__((aligned(1)));
   __block aid a1;
   __block id a2 __attribute__((aligned(2)));
   __block id a3 __attribute__((aligned(4)));
   __block id a4 __attribute__((aligned(8)));
   __block id a5, a6, a7;
-  __block void (^b)();
+  __block void (^b)(void);
   ^{ a1=a2=a3=a4=a5=a6=a7=0; b = 0; }();
   return 0;
 }

diff  --git a/clang/test/CodeGenObjC/blocks-4.m b/clang/test/CodeGenObjC/blocks-4.m
index f5af9bc39eb87..cf08467a2382c 100644
--- a/clang/test/CodeGenObjC/blocks-4.m
+++ b/clang/test/CodeGenObjC/blocks-4.m
@@ -8,7 +8,7 @@ @interface NSBlockOperation {
 +(id)blockOperationWithBlock:(void (^)(void))block ;
 @end
 
-void FUNC() {
+void FUNC(void) {
         [NSBlockOperation blockOperationWithBlock:^{
             @try {
 

diff  --git a/clang/test/CodeGenObjC/blocks-5.m b/clang/test/CodeGenObjC/blocks-5.m
index 18adb0fed9b14..d7d0ffe7fb2b3 100644
--- a/clang/test/CodeGenObjC/blocks-5.m
+++ b/clang/test/CodeGenObjC/blocks-5.m
@@ -11,7 +11,7 @@ - (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, unsigned cha
 
 
 
-int foo();
+int foo(void);
 extern void DVT (volatile const void * object, volatile const void * selector, const char * functionName); 
 @implementation IDEWorkspaceDocument
 

diff  --git a/clang/test/CodeGenObjC/boxing.m b/clang/test/CodeGenObjC/boxing.m
index 7e0d4ef3cfd4f..42e8ddbadd485 100644
--- a/clang/test/CodeGenObjC/boxing.m
+++ b/clang/test/CodeGenObjC/boxing.m
@@ -71,7 +71,7 @@ + (id)stringWithUTF8String:(const char *)nullTerminatedCString;
 // CHECK: [[STR0:.*]] = private unnamed_addr constant [4 x i8] c"abc\00", section "__TEXT,__cstring,cstring_literals", align 1
 // CHECK: [[UNNAMED_CFSTRING:.*]] = private global [[STRUCT_NSCONSTANT_STRING_TAG]] { i32* getelementptr inbounds ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 1992, i8* getelementptr inbounds ([4 x i8], [4 x i8]* [[STR0]], i32 0, i32 0), i64 3 }, section "__DATA,__cfstring", align 8
 
-int main() {
+int main(void) {
   // CHECK: [[T:%.*]] = alloca [[V0]]*, align 8
 
   // CHECK: load i8*, i8** [[WithIntSEL]]

diff  --git a/clang/test/CodeGenObjC/catch-lexical-block.m b/clang/test/CodeGenObjC/catch-lexical-block.m
index a06aa83fe323e..a7f5b3630a40c 100644
--- a/clang/test/CodeGenObjC/catch-lexical-block.m
+++ b/clang/test/CodeGenObjC/catch-lexical-block.m
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -debug-info-kind=limited -fobjc-exceptions -emit-llvm %s -o - | FileCheck %s
 @interface Foo @end
-void f0() {
+void f0(void) {
   @try {
     @throw @"a";
   } @catch(Foo *e) {

diff  --git a/clang/test/CodeGenObjC/class-stubs.m b/clang/test/CodeGenObjC/class-stubs.m
index 31f423f36edad..4e1be45f12edb 100644
--- a/clang/test/CodeGenObjC/class-stubs.m
+++ b/clang/test/CodeGenObjC/class-stubs.m
@@ -36,7 +36,7 @@ - (void) instanceMethod;
 @interface Derived : Base
 @end
 
-int main() {
+int main(void) {
   [Base classMethod];
 }
 // CHECK-LABEL: define{{.*}} i32 @main()

diff  --git a/clang/test/CodeGenObjC/constant-string-class.m b/clang/test/CodeGenObjC/constant-string-class.m
index 63f7f67edab9c..6b55ad71cc738 100644
--- a/clang/test/CodeGenObjC/constant-string-class.m
+++ b/clang/test/CodeGenObjC/constant-string-class.m
@@ -25,7 +25,7 @@ @implementation Foo
 - (char *)customString { return cString ; }
 @end
 
-int main () {
+int main (void) {
   Foo *string = @"bla";
   return 0;
 }

diff  --git a/clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m b/clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m
index 4a415be21cb0e..b7dc53682ccd1 100644
--- a/clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m
+++ b/clang/test/CodeGenObjC/convert-messages-to-runtime-calls.m
@@ -39,7 +39,7 @@ void test1(id x) {
 }
 
 // CHECK-LABEL: define {{.*}}void @check_invoke
-void check_invoke() {
+void check_invoke(void) {
   // MSGS: {{invoke.*@objc_msgSend}}
   // MSGS: {{invoke.*@objc_msgSend}}
   // CALLS: {{invoke.*@objc_alloc}}
@@ -77,7 +77,7 @@ - (A*) autorelease;
 // Make sure we get a bitcast on the return type as the
 // call will return i8* which we have to cast to A*
 // CHECK-LABEL: define {{.*}}void @test_alloc_class_ptr
-A* test_alloc_class_ptr() {
+A* test_alloc_class_ptr(void) {
   // CALLS: {{call.*@objc_alloc}}
   // CALLS-NEXT: bitcast i8*
   // CALLS-NEXT: ret
@@ -87,7 +87,7 @@ - (A*) autorelease;
 // Make sure we get a bitcast on the return type as the
 // call will return i8* which we have to cast to A*
 // CHECK-LABEL: define {{.*}}void @test_alloc_class_ptr
-A* test_allocWithZone_class_ptr() {
+A* test_allocWithZone_class_ptr(void) {
   // CALLS: {{call.*@objc_allocWithZone}}
   // CALLS-NEXT: bitcast i8*
   // CALLS-NEXT: ret
@@ -135,7 +135,7 @@ - (float) retain;
 
 // Make sure we only accept pointer types
 // CHECK-LABEL: define {{.*}}void @test_allocWithZone_int
-C* test_allocWithZone_int() {
+C* test_allocWithZone_int(void) {
   // MSGS: {{call.*@objc_msgSend}}
   // CALLS: {{call.*@objc_msgSend}}
   return [C allocWithZone:3];
@@ -237,7 +237,7 @@ void testException_retain(NSObject *a) {
 
 
 // CHECK-LABEL: define {{.*}}void @testException_alloc(
-void testException_alloc() {
+void testException_alloc(void) {
   @try {
     // MSGS: {{invoke.*@objc_msgSend}}
     // CALLS: invoke{{.*}}@objc_alloc(i8* %
@@ -247,7 +247,7 @@ void testException_alloc() {
 }
 
 // CHECK-LABEL: define {{.*}}void @testException_allocWithZone
-void testException_allocWithZone() {
+void testException_allocWithZone(void) {
   @try {
     // MSGS: {{invoke.*@objc_msgSend}}
     // CALLS: invoke{{.*}}@objc_allocWithZone(i8* %

diff  --git a/clang/test/CodeGenObjC/debug-info-block-type.m b/clang/test/CodeGenObjC/debug-info-block-type.m
index 4bdd18035ee0d..943dfd5310b4b 100644
--- a/clang/test/CodeGenObjC/debug-info-block-type.m
+++ b/clang/test/CodeGenObjC/debug-info-block-type.m
@@ -12,7 +12,7 @@
 // CHECK: ![[ID]] = !DIDerivedType(tag: DW_TAG_typedef, name: "id"
 
 typedef BOOL (^SomeKindOfPredicate)(id obj);
-int main()
+int main(void)
 {
   SomeKindOfPredicate p = ^BOOL(id obj) { return obj != nil; };
   // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "__FuncPtr",

diff  --git a/clang/test/CodeGenObjC/debug-info-blocks.m b/clang/test/CodeGenObjC/debug-info-blocks.m
index 5694862ac6edf..70fcfdb18bd2e 100644
--- a/clang/test/CodeGenObjC/debug-info-blocks.m
+++ b/clang/test/CodeGenObjC/debug-info-blocks.m
@@ -76,7 +76,7 @@ - (id)init
 
 @end
 
-int main()
+int main(void)
 {
 	A *a = [[A alloc] init];
 	return 0;

diff  --git a/clang/test/CodeGenObjC/debug-info-getter-name.m b/clang/test/CodeGenObjC/debug-info-getter-name.m
index 7915a2fdd259a..3e0f52be86462 100644
--- a/clang/test/CodeGenObjC/debug-info-getter-name.m
+++ b/clang/test/CodeGenObjC/debug-info-getter-name.m
@@ -48,7 +48,7 @@ @implementation AutomaticSynthesis
 }
 @end
 
-int main()
+int main(void)
 {
   return 0;
 }

diff  --git a/clang/test/CodeGenObjC/debug-info-id-with-protocol.m b/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
index 8974e27647835..38f69ef389015 100644
--- a/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
+++ b/clang/test/CodeGenObjC/debug-info-id-with-protocol.m
@@ -26,7 +26,7 @@ @interface MyClass : NSObject {
 @implementation MyClass
 @end
 
-int main()
+int main(void)
 {
     @autoreleasepool
     {

diff  --git a/clang/test/CodeGenObjC/debug-info-ivars-indirect.m b/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
index b227bc6486448..6b13fbf278528 100644
--- a/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
+++ b/clang/test/CodeGenObjC/debug-info-ivars-indirect.m
@@ -38,7 +38,7 @@ void gorf (struct S* s) {
 }
 
 
-I *source();
+I *source(void);
 
 @interface I()
 {
@@ -46,7 +46,7 @@ @interface I()
 }
 @end
 
-void use() {
+void use(void) {
     int _c = source()->c;
 }
 
@@ -56,4 +56,4 @@ @interface I()
 }
 @end
 
-I *x();
+I *x(void);

diff  --git a/clang/test/CodeGenObjC/debug-info-property-accessors.m b/clang/test/CodeGenObjC/debug-info-property-accessors.m
index d05010095d295..1a12224fde6d1 100644
--- a/clang/test/CodeGenObjC/debug-info-property-accessors.m
+++ b/clang/test/CodeGenObjC/debug-info-property-accessors.m
@@ -44,7 +44,7 @@ - (void) setBlah: (BOOL) newBlah
 @end
 
 int
-main ()
+main (void)
 {
   Bar *my_bar = [[Bar alloc] init];
 

diff  --git a/clang/test/CodeGenObjC/debug-property-synth.m b/clang/test/CodeGenObjC/debug-property-synth.m
index ddcf4d998c5cd..b76fd8af5cc44 100644
--- a/clang/test/CodeGenObjC/debug-property-synth.m
+++ b/clang/test/CodeGenObjC/debug-property-synth.m
@@ -29,7 +29,7 @@ @implementation I
 @synthesize p1 = _p1;
 @end
 
-int main() {
+int main(void) {
   I *myi;
   myi.p1 = 2;
   return myi.p1;

diff  --git a/clang/test/CodeGenObjC/dllstorage.m b/clang/test/CodeGenObjC/dllstorage.m
index da90824a829ad..64ba21f9769ae 100644
--- a/clang/test/CodeGenObjC/dllstorage.m
+++ b/clang/test/CodeGenObjC/dllstorage.m
@@ -124,7 +124,7 @@ id f(Q *q) {
 
 // CHECK-IR-DAG: @"OBJC_IVAR_$_M._ivar" = external dllimport global i32
 
-int g() {
+int g(void) {
   @autoreleasepool {
     M *mi = [M new];
     @try {

diff  --git a/clang/test/CodeGenObjC/dot-syntax-1.m b/clang/test/CodeGenObjC/dot-syntax-1.m
index 417bcb4b9dfe1..537d8ecc442f0 100644
--- a/clang/test/CodeGenObjC/dot-syntax-1.m
+++ b/clang/test/CodeGenObjC/dot-syntax-1.m
@@ -244,7 +244,7 @@ -(int) x {
 // FIXME: Two more (thats it?) interesting cases. Method access on
 // getter w/o setter and method access on setter w/o getter.
 
-int main() {
+int main(void) {
 #define test(N) { \
   Bot##N *ob = [[Bot##N alloc] init]; \
   int x = ob.x; \

diff  --git a/clang/test/CodeGenObjC/dot-syntax.m b/clang/test/CodeGenObjC/dot-syntax.m
index 6282ea491f503..411b0955aed41 100644
--- a/clang/test/CodeGenObjC/dot-syntax.m
+++ b/clang/test/CodeGenObjC/dot-syntax.m
@@ -57,7 +57,7 @@ -(void) setZ: (S) arg {
 
 @end
 
-int main() {
+int main(void) {
 #define SWAP(T,a,b) { T a_tmp = a; a = b; b = a_tmp; }
   A *a = [[A alloc] init];
   A *b = [[A alloc] init];

diff  --git a/clang/test/CodeGenObjC/empty-collection-literals.m b/clang/test/CodeGenObjC/empty-collection-literals.m
index 44775bcff0c1e..dec4ffa9b883a 100644
--- a/clang/test/CodeGenObjC/empty-collection-literals.m
+++ b/clang/test/CodeGenObjC/empty-collection-literals.m
@@ -12,7 +12,7 @@
 
 #include "literal-support.h"
 
-void test_empty_array() {
+void test_empty_array(void) {
   // CHECK-WITHOUT-EMPTY-COLLECTIONS-LABEL: define{{.*}} void @test_empty_array
   // CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
   // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_msgSend}}
@@ -31,7 +31,7 @@ void test_empty_array() {
   NSArray *arr = @[];
 }
 
-void test_empty_dictionary() {
+void test_empty_dictionary(void) {
   // CHECK-WITHOUT-EMPTY-COLLECTIONS-LABEL: define{{.*}} void @test_empty_dictionary
   // CHECK-WITHOUT-EMPTY-COLLECTIONS-NOT: ret void
   // CHECK-WITHOUT-EMPTY-COLLECTIONS: {{call.*objc_msgSend}}

diff  --git a/clang/test/CodeGenObjC/encode-test-2.m b/clang/test/CodeGenObjC/encode-test-2.m
index 2d9593d65b0ca..eea8ad4693167 100644
--- a/clang/test/CodeGenObjC/encode-test-2.m
+++ b/clang/test/CodeGenObjC/encode-test-2.m
@@ -28,7 +28,7 @@ @interface Intf <Proto>
 @implementation Intf 
 @end
 
-int main()
+int main(void)
 {
 	const char * en = @encode(Intf);
 }

diff  --git a/clang/test/CodeGenObjC/encode-test-3.m b/clang/test/CodeGenObjC/encode-test-3.m
index b76063ffd3d86..0856b770d65a5 100644
--- a/clang/test/CodeGenObjC/encode-test-3.m
+++ b/clang/test/CodeGenObjC/encode-test-3.m
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
 
-int main() {
+int main(void) {
   int n;
   
   const char * inc = @encode(int[]);

diff  --git a/clang/test/CodeGenObjC/encode-test-4.m b/clang/test/CodeGenObjC/encode-test-4.m
index 2624bc71fce25..ac58fc3c9f87e 100644
--- a/clang/test/CodeGenObjC/encode-test-4.m
+++ b/clang/test/CodeGenObjC/encode-test-4.m
@@ -3,7 +3,7 @@
 typedef enum : Integer { Red, Green, Blue} Color;
 typedef enum { Cyan, Magenta, Yellow, Key } PrintColor;
 
-int a() {
+int a(void) {
   return @encode(int) == @encode(int) &&
     @encode(Color) == @encode(long) &&
     @encode(PrintColor) == @encode(int);

diff  --git a/clang/test/CodeGenObjC/encode-test-6.m b/clang/test/CodeGenObjC/encode-test-6.m
index ff7016ca47ecf..0668e9f77508e 100644
--- a/clang/test/CodeGenObjC/encode-test-6.m
+++ b/clang/test/CodeGenObjC/encode-test-6.m
@@ -57,7 +57,7 @@ @implementation SCNCamera
 // rdar://16655340
 int i;
 typeof(@encode(typeof(i))) e = @encode(typeof(i));
-const char * Test()
+const char * Test(void)
 {
     return e;
 }

diff  --git a/clang/test/CodeGenObjC/encode-test.m b/clang/test/CodeGenObjC/encode-test.m
index c86a5ab1669d9..4ac0c5809bb2e 100644
--- a/clang/test/CodeGenObjC/encode-test.m
+++ b/clang/test/CodeGenObjC/encode-test.m
@@ -83,7 +83,7 @@ @interface Object
 @end
 typedef Object MyObj;
 
-int main()
+int main(void)
 {
 	const char *en = @encode(Derived);
 	const char *eb = @encode(B1);
@@ -188,7 +188,7 @@ @implementation Derived1X @end
 // CHECK: %[[i:.*]] = alloca i32
 // CHECK: %[[call:.*]] = call i32 @strlen
 // CHECK: store i32 %[[call]], i32* %[[i]]
-void test_strlen() {
+void test_strlen(void) {
   const char array[] = @encode(int);
   int i = strlen(array);
 }

diff  --git a/clang/test/CodeGenObjC/exceptions-asm-attribute.m b/clang/test/CodeGenObjC/exceptions-asm-attribute.m
index b4679ef02f352..3344c4701a9ba 100644
--- a/clang/test/CodeGenObjC/exceptions-asm-attribute.m
+++ b/clang/test/CodeGenObjC/exceptions-asm-attribute.m
@@ -71,7 +71,7 @@ @interface EH2
 @interface EH3
 @end
 
-void f1();
+void f1(void);
 
 void f0(id x) {
   @try {

diff  --git a/clang/test/CodeGenObjC/exceptions-nonfragile.m b/clang/test/CodeGenObjC/exceptions-nonfragile.m
index bc4c809ffa14c..ce718bf9c7ca7 100644
--- a/clang/test/CodeGenObjC/exceptions-nonfragile.m
+++ b/clang/test/CodeGenObjC/exceptions-nonfragile.m
@@ -3,8 +3,8 @@
 // rdar://problem/8535238
 // CHECK: declare void @objc_exception_rethrow()
 
-void protos() {
-  extern void foo();
+void protos(void) {
+  extern void foo(void);
   @try {
     foo();
   } @catch (id e) {
@@ -12,7 +12,7 @@ void protos() {
   }
 }
 
-void throwing() {
+void throwing(void) {
   @throw(@"error!");
 }
 

diff  --git a/clang/test/CodeGenObjC/exceptions.m b/clang/test/CodeGenObjC/exceptions.m
index f3505f8606b98..e02014b2254b0 100644
--- a/clang/test/CodeGenObjC/exceptions.m
+++ b/clang/test/CodeGenObjC/exceptions.m
@@ -4,7 +4,7 @@
 
 // Just check that we don't emit any dead blocks.
 @interface NSArray @end
-void f0() {
+void f0(void) {
   @try {
     @try {
       @throw @"a";
@@ -15,7 +15,7 @@ void f0() {
 }
 
 // CHECK-LABEL: define{{.*}} void @f1()
-void f1() {
+void f1(void) {
   extern void foo(void);
 
   while (1) {
@@ -41,7 +41,7 @@ void f1() {
 // optimization.  rdar://problem/8160285
 
 // CHECK-LABEL: define{{.*}} i32 @f2()
-int f2() {
+int f2(void) {
   extern void foo(void);
 
   // CHECK:        [[X:%.*]] = alloca i32
@@ -76,7 +76,7 @@ int f2() {
 // Test that the cleanup destination is saved when entering a finally
 // block.  rdar://problem/8293901
 // CHECK-LABEL: define{{.*}} void @f3()
-void f3() {
+void f3(void) {
   extern void f3_helper(int, int*);
 
   // CHECK:      [[X:%.*]] = alloca i32
@@ -128,7 +128,7 @@ void f3() {
 }
 
 // rdar://problem/8440970
-void f4() {
+void f4(void) {
   extern void f4_help(int);
 
   // CHECK-LABEL: define{{.*}} void @f4()

diff  --git a/clang/test/CodeGenObjC/extended-block-signature-encode.m b/clang/test/CodeGenObjC/extended-block-signature-encode.m
index 3db31fafc0803..0f9b0d450f721 100644
--- a/clang/test/CodeGenObjC/extended-block-signature-encode.m
+++ b/clang/test/CodeGenObjC/extended-block-signature-encode.m
@@ -6,7 +6,7 @@
 
 typedef NSString*(^BBB)(NSArray*);
 
-int main ()
+int main (void)
 {
   BBB b1;
   ^(BBB arg1, double arg2){ return b1; }(0, 3.14);

diff  --git a/clang/test/CodeGenObjC/externally-retained.m b/clang/test/CodeGenObjC/externally-retained.m
index 2d6cb10c7dc74..cf2c6fc593471 100644
--- a/clang/test/CodeGenObjC/externally-retained.m
+++ b/clang/test/CodeGenObjC/externally-retained.m
@@ -25,14 +25,14 @@ void param(ObjTy *p) EXT_RET {
   // CHECK: ret
 }
 
-void local() {
+void local(void) {
   EXT_RET ObjTy *local = global;
   // CHECK-LABEL: define{{.*}} void @local
   // CHECK-NOT: llvm.objc.
   // CHECK: ret
 }
 
-void in_init() {
+void in_init(void) {
   // Test that we do the right thing when a variable appears in it's own
   // initializer. Here, we release the value stored in 'wat' after overwriting
   // it, in case it was somehow set to point to a non-null object while it's
@@ -52,7 +52,7 @@ void in_init() {
   // CHECK: ret
 }
 
-void esc(void (^)());
+void esc(void (^)(void));
 
 void block_capture(ObjTy *obj) EXT_RET {
   esc(^{ (void)obj; });
@@ -82,7 +82,7 @@ void block_capture(ObjTy *obj) EXT_RET {
 
 void escp(void (^)(ObjTy *));
 
-void block_param() {
+void block_param(void) {
   escp(^(ObjTy *p) EXT_RET {});
 
   // CHECK-LABEL: define internal void @__block_param_block_invoke

diff  --git a/clang/test/CodeGenObjC/for-in.m b/clang/test/CodeGenObjC/for-in.m
index ed618e09dd5b4..e765426cc989a 100644
--- a/clang/test/CodeGenObjC/for-in.m
+++ b/clang/test/CodeGenObjC/for-in.m
@@ -20,7 +20,7 @@ -(const char*) cString;
 #define L6(n) L5(n+0),L5(n+32)
 
 // CHECK-LABEL: define{{.*}} void @t0
-void t0() {
+void t0(void) {
   NSArray *array = [NSArray arrayWithObjects: L1(0), (void*)0];
 
   p("array.length: %d\n", [array count]);
@@ -43,7 +43,7 @@ void t0() {
   }
 }
 
-void t1() {
+void t1(void) {
   NSArray *array = [NSArray arrayWithObjects: L6(0), (void*)0];
 
   p("array.length: %d\n", [array count]);

diff  --git a/clang/test/CodeGenObjC/forward-protocol-metadata-symbols.m b/clang/test/CodeGenObjC/forward-protocol-metadata-symbols.m
index 4d81b9e44db07..0ec8c2fcc1aca 100644
--- a/clang/test/CodeGenObjC/forward-protocol-metadata-symbols.m
+++ b/clang/test/CodeGenObjC/forward-protocol-metadata-symbols.m
@@ -13,7 +13,7 @@ @implementation A
 +(Class) getClass { return self; }
 @end
 
-int main() {
+int main(void) {
   Protocol *P0 = @protocol(P0);
   return 0;
 }

diff  --git a/clang/test/CodeGenObjC/fp2ret.m b/clang/test/CodeGenObjC/fp2ret.m
index 93f8992a97343..58fb278266a91 100644
--- a/clang/test/CodeGenObjC/fp2ret.m
+++ b/clang/test/CodeGenObjC/fp2ret.m
@@ -23,6 +23,6 @@ -(_Complex long double) complexLongDoubleValue;
 // CHECK-ARMV7-LABEL: define{{.*}} void @t0()
 // CHECK-ARMV7: call i128 bitcast {{.*}} @objc_msgSend to
 // CHECK-ARMV7: }
-void t0() {
+void t0(void) {
   [(A*)0 complexLongDoubleValue];
 }

diff  --git a/clang/test/CodeGenObjC/fpret.m b/clang/test/CodeGenObjC/fpret.m
index 07841c524a792..a7e89f75db0bc 100644
--- a/clang/test/CodeGenObjC/fpret.m
+++ b/clang/test/CodeGenObjC/fpret.m
@@ -31,7 +31,7 @@ -(long double) longDoubleValue;
 // CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
 // CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
 // CHECK-ARMV7: }
-void t0() {
+void t0(void) {
   [(A*)0 floatValue];
   [(A*)0 doubleValue];
   [(A*)0 longDoubleValue];

diff  --git a/clang/test/CodeGenObjC/fragile-arc.m b/clang/test/CodeGenObjC/fragile-arc.m
index 8a46292480bac..82b801320b75d 100644
--- a/clang/test/CodeGenObjC/fragile-arc.m
+++ b/clang/test/CodeGenObjC/fragile-arc.m
@@ -163,7 +163,7 @@ void testBlockLayoutWeak(__weak id x) {
 // CHECK: call void @checkpoint(i32 noundef 2)
 // CHECK: call void @llvm.objc.storeStrong(i8** [[Y]], i8* null)
 extern void checkpoint(int n);
-void testCatch() {
+void testCatch(void) {
   @try {
     checkpoint(0);
   } @catch (A *x) {

diff  --git a/clang/test/CodeGenObjC/gnu-deterministic-selectors.m b/clang/test/CodeGenObjC/gnu-deterministic-selectors.m
index 5f8d2e5378a50..5201915cc39bc 100644
--- a/clang/test/CodeGenObjC/gnu-deterministic-selectors.m
+++ b/clang/test/CodeGenObjC/gnu-deterministic-selectors.m
@@ -7,7 +7,7 @@
 // CHECK: @.objc_selector_list = internal global [6 x { i8*, i8* }] [{ i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_sel_namea, i64 0, i64 0), i8* null }, { i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_sel_nameg, i64 0, i64 0), i8* null }, { i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_sel_namej, i64 0, i64 0), i8* null }, { i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_sel_namel, i64 0, i64 0), i8* null }, { i8*, i8* } { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.objc_sel_namez, i64 0, i64 0), i8* null }, { i8*, i8* } zeroinitializer], align 8
 
 
-void f() {
+void f(void) {
 	SEL a = @selector(z);
 	SEL b = @selector(a);
 	SEL c = @selector(g);

diff  --git a/clang/test/CodeGenObjC/gnu-exceptions.m b/clang/test/CodeGenObjC/gnu-exceptions.m
index d441e984968ec..71250c9c61a0e 100644
--- a/clang/test/CodeGenObjC/gnu-exceptions.m
+++ b/clang/test/CodeGenObjC/gnu-exceptions.m
@@ -8,7 +8,7 @@
 
 // CHECK: define{{.*}} void @test0() [[TF:#[0-9]+]]
 // CHECK-SAME: personality i8* bitcast (i32 (...)* @__gnu_objc_personality_v0 to i8*)
-void test0() {
+void test0(void) {
   @try {
     // CHECK: invoke void @opaque()
     opaque();

diff  --git a/clang/test/CodeGenObjC/gnustep2-proto.m b/clang/test/CodeGenObjC/gnustep2-proto.m
index 4804327bc2468..21ff027d5df21 100644
--- a/clang/test/CodeGenObjC/gnustep2-proto.m
+++ b/clang/test/CodeGenObjC/gnustep2-proto.m
@@ -33,7 +33,7 @@ + (void*)y;
 // CHECK: define{{.*}} i8* @x()
 // CHECK:   = load 
 // CHECK-SAME: @._OBJC_REF_PROTOCOL_X, align 8
-void *x()
+void *x(void)
 {
 	return @protocol(X);
 }

diff  --git a/clang/test/CodeGenObjC/hidden-visibility.m b/clang/test/CodeGenObjC/hidden-visibility.m
index 4969f5c72c16e..52ca2bcbe49e0 100644
--- a/clang/test/CodeGenObjC/hidden-visibility.m
+++ b/clang/test/CodeGenObjC/hidden-visibility.m
@@ -18,7 +18,7 @@ @implementation I
 
 @protocol Prot0 @end
 
-id f0() {
+id f0(void) {
   return @protocol(Prot0);
 }
 

diff  --git a/clang/test/CodeGenObjC/id-isa-codegen.m b/clang/test/CodeGenObjC/id-isa-codegen.m
index 20f344c5396c9..ac6d9b733f79f 100644
--- a/clang/test/CodeGenObjC/id-isa-codegen.m
+++ b/clang/test/CodeGenObjC/id-isa-codegen.m
@@ -44,7 +44,7 @@ @interface Foo {
 +(id)method;
 @end
 
-id Test2() {
+id Test2(void) {
     if([Foo method]->isa)
       return (*[Foo method]).isa;
     return [Foo method]->isa;

diff  --git a/clang/test/CodeGenObjC/initialize-function-static.m b/clang/test/CodeGenObjC/initialize-function-static.m
index 21ad320f7820d..d6836db2a94ce 100644
--- a/clang/test/CodeGenObjC/initialize-function-static.m
+++ b/clang/test/CodeGenObjC/initialize-function-static.m
@@ -3,7 +3,7 @@
 @interface I
 @end
 
-I *i() {
+I *i(void) {
   static I *i = ((void *)0);
   return i;
 }

diff  --git a/clang/test/CodeGenObjC/ivar-type-encoding.m b/clang/test/CodeGenObjC/ivar-type-encoding.m
index a7ad55c6715cf..3d9cf2549a771 100644
--- a/clang/test/CodeGenObjC/ivar-type-encoding.m
+++ b/clang/test/CodeGenObjC/ivar-type-encoding.m
@@ -24,7 +24,7 @@ @implementation TestClass
 
 @end
 
-int main() {
+int main(void) {
   TestClass *c = [TestClass new];
   return 0;
 }

diff  --git a/clang/test/CodeGenObjC/link-errors.m b/clang/test/CodeGenObjC/link-errors.m
index 44797d9e8d1dc..08225627835f2 100644
--- a/clang/test/CodeGenObjC/link-errors.m
+++ b/clang/test/CodeGenObjC/link-errors.m
@@ -29,7 +29,7 @@ @interface Unknown
 @end
 
 
-int main() {
+int main(void) {
   id x = @protocol(P);
   [ A alloc ];
   [ A foo ];

diff  --git a/clang/test/CodeGenObjC/local-static-block.m b/clang/test/CodeGenObjC/local-static-block.m
index d656962fd471b..a86c663297c2e 100644
--- a/clang/test/CodeGenObjC/local-static-block.m
+++ b/clang/test/CodeGenObjC/local-static-block.m
@@ -21,7 +21,7 @@
 extern NSArray *address;
 extern unsigned long level;
 
-void FUNC()
+void FUNC(void)
 {
  ArrayRecurs(address, level);
 
@@ -50,7 +50,7 @@ void FUNC()
  }
 }
 
-void FUNC2() {
+void FUNC2(void) {
   static void (^const block1)(int) = ^(int a){
     if (a--)
       block1(a);
@@ -61,7 +61,7 @@ static void (^const block1)(int) = ^(int a){
 // CHECK: define internal void @_block_invoke{{.*}}(
 // CHECK: call void %{{.*}}(i8* noundef bitcast ({ i8**, i32, i32, i8*, %struct.__block_descriptor* }* @__block_literal_global{{.*}} to i8*), i32 noundef %{{.*}})
 
-void FUNC1()
+void FUNC1(void)
 {
  static  NSArray *(^ArrayRecurs)(NSArray *addresses, unsigned long level) = ^(NSArray *addresses, unsigned long level) {
 

diff  --git a/clang/test/CodeGenObjC/metadata-symbols-32.m b/clang/test/CodeGenObjC/metadata-symbols-32.m
index 9f728ef195db7..825b2c61c55df 100644
--- a/clang/test/CodeGenObjC/metadata-symbols-32.m
+++ b/clang/test/CodeGenObjC/metadata-symbols-32.m
@@ -80,7 +80,7 @@ @interface J0
 
 @implementation J0(Category) @end
 
-void *f0() {
+void *f0(void) {
    [B im0];
    [C im1];
 }

diff  --git a/clang/test/CodeGenObjC/metadata_symbols.m b/clang/test/CodeGenObjC/metadata_symbols.m
index 697fa9a048cdf..6ff5294c0ca98 100644
--- a/clang/test/CodeGenObjC/metadata_symbols.m
+++ b/clang/test/CodeGenObjC/metadata_symbols.m
@@ -66,7 +66,7 @@ @interface EH2
 @interface EH3
 @end
 
-void f1();
+void f1(void);
 
 void f0(id x) {
   @try {

diff  --git a/clang/test/CodeGenObjC/mrc-weak.m b/clang/test/CodeGenObjC/mrc-weak.m
index 4c2e64c87a7e1..95811d9e73aa8 100644
--- a/clang/test/CodeGenObjC/mrc-weak.m
+++ b/clang/test/CodeGenObjC/mrc-weak.m
@@ -177,7 +177,7 @@ void test9(void) {
   __unsafe_unretained Foo *p = get_object();
   use_block(^{ [p run]; });
 }
-void test9_fin() {}
+void test9_fin(void) {}
 
 // CHECK-LABEL: define{{.*}} void @test10()
 // CHECK-NOT:   define linkonce_odr hidden void @__copy_helper
@@ -188,4 +188,4 @@ void test10(void) {
   UnsafeFooPtr p = get_object();
   use_block(^{ [p run]; });
 }
-void test10_fin() {}
+void test10_fin(void) {}

diff  --git a/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m b/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
index c196e5d3531a9..9ea2e192758b7 100644
--- a/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
+++ b/clang/test/CodeGenObjC/mrr-captured-block-var-inlined-layout.m
@@ -8,10 +8,10 @@
 void x(id y) {}
 void y(int a) {}
 
-extern id opaque_id();
+extern id opaque_id(void);
 __weak id wid;
 
-void f() {
+void f(void) {
     __block int byref_int = 0;
     const id bar = (id) opaque_id();
     id baz = 0;
@@ -21,13 +21,13 @@ void f() {
 
 // block variable layout: BL_STRONG:1, BL_OPERATOR:0
 // CHECK: Inline block variable layout: 0x0100, BL_STRONG:1, BL_OPERATOR:0
-    void (^b)() = ^{
+    void (^b)(void) = ^{
         x(bar);
     };    
 
 // block variable layout: BL_STRONG:2, BL_BYREF:1, BL_OPERATOR:0
 // CHECK: Inline block variable layout: 0x0210, BL_STRONG:2, BL_BYREF:1, BL_OPERATOR:0
-    void (^c)() = ^{
+    void (^c)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -35,7 +35,7 @@ void f() {
 
 // block variable layout: BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
 // CHECK: Inline block variable layout: 0x0230, BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
-    void (^d)() = ^{
+    void (^d)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -45,7 +45,7 @@ void f() {
 
 // block variable layout: BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
 // CHECK: Inline block variable layout: 0x0230, BL_STRONG:2, BL_BYREF:3, BL_OPERATOR:0
-    id (^e)() = ^{
+    id (^e)(void) = ^{
         x(bar);
         x(baz);
         byref_int = 1;
@@ -55,7 +55,7 @@ void f() {
     };
 
 // CHECK: Inline block variable layout: 0x020, BL_BYREF:2, BL_OPERATOR:0
-    void (^ii)() = ^{
+    void (^ii)(void) = ^{
        byref_int = 1;
        byref_bab = 0;
     };

diff  --git a/clang/test/CodeGenObjC/nested-rethrow.m b/clang/test/CodeGenObjC/nested-rethrow.m
index bff52c3b2494a..e25793c5019b7 100644
--- a/clang/test/CodeGenObjC/nested-rethrow.m
+++ b/clang/test/CodeGenObjC/nested-rethrow.m
@@ -3,7 +3,7 @@
 
 extern int printf(const char*, ...);
 
-int main()
+int main(void)
 {
     @try {
         @throw @"foo";

diff  --git a/clang/test/CodeGenObjC/no-sanitize.m b/clang/test/CodeGenObjC/no-sanitize.m
index 07a196b6419dc..abaf6fab26ab6 100644
--- a/clang/test/CodeGenObjC/no-sanitize.m
+++ b/clang/test/CodeGenObjC/no-sanitize.m
@@ -4,6 +4,6 @@ @interface I0 @end
 @implementation I0
 // CHECK-NOT: sanitize_address
 - (void) im0: (int) a0 __attribute__((no_sanitize("address"))) {
-  int (^blockName)() = ^int() { return 0; };
+  int (^blockName)(void) = ^int(void) { return 0; };
 }
 @end

diff  --git a/clang/test/CodeGenObjC/noescape.m b/clang/test/CodeGenObjC/noescape.m
index e3a11605bb1df..3186ebc740411 100644
--- a/clang/test/CodeGenObjC/noescape.m
+++ b/clang/test/CodeGenObjC/noescape.m
@@ -135,7 +135,7 @@ void test6(id a, id b) {
 // CHECK-ARC-NOT: define internal void @__Block_byref_object_copy_
 // CHECK-ARC-NOT: define internal void @__Block_byref_object_dispose_
 
-void test7() {
+void test7(void) {
   id a;
   __block id b0;
   noescapeFunc0(a, ^{ (void)b0; });
@@ -161,7 +161,7 @@ void test7() {
   id a, b;
 };
 
-void test8() {
+void test8(void) {
   id a;
   __block struct S0 b0;
   noescapeFunc0(a, ^{ (void)b0; });

diff  --git a/clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m b/clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m
index dac8686f1833a..e67e67486e21a 100644
--- a/clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m
+++ b/clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.m
@@ -14,9 +14,9 @@
   Bar bar;
 } Baz;
 
-I *getI();
+I *getI(void);
 
-void f() {
+void f(void) {
   Foo foo = {getI()};
   Bar bar = {foo};
   Baz baz = {bar};

diff  --git a/clang/test/CodeGenObjC/ns-constant-strings.m b/clang/test/CodeGenObjC/ns-constant-strings.m
index 4cbbb9a6b995d..236adff0a79ca 100644
--- a/clang/test/CodeGenObjC/ns-constant-strings.m
+++ b/clang/test/CodeGenObjC/ns-constant-strings.m
@@ -24,7 +24,7 @@ @interface NSConstantString : NSSimpleCString
 
 const NSConstantString *appKey =  @"MyApp";
 
-int main() {
+int main(void) {
   const NSConstantString *appKey =  @"MyApp";
   const NSConstantString *appKey1 =  @"MyApp1";
 }

diff  --git a/clang/test/CodeGenObjC/objc-alloc-init.m b/clang/test/CodeGenObjC/objc-alloc-init.m
index 8370202748e6f..2ae6d0017030b 100644
--- a/clang/test/CodeGenObjC/objc-alloc-init.m
+++ b/clang/test/CodeGenObjC/objc-alloc-init.m
@@ -8,7 +8,7 @@ +(X *)alloc;
 -(X *)init;
 @end
 
-void f() {
+void f(void) {
   [[X alloc] init];
   // OPTIMIZED: call i8* @objc_alloc_init(
   // NOT_OPTIMIZED: call i8* @objc_alloc(

diff  --git a/clang/test/CodeGenObjC/objc-arc-container-subscripting.m b/clang/test/CodeGenObjC/objc-arc-container-subscripting.m
index 2f6062d7ce6d1..1e6d9806379a6 100644
--- a/clang/test/CodeGenObjC/objc-arc-container-subscripting.m
+++ b/clang/test/CodeGenObjC/objc-arc-container-subscripting.m
@@ -5,7 +5,7 @@ - (id)objectAtIndexedSubscript:(int)index;
 - (void)setObject:(id)object atIndexedSubscript:(int)index;
 @end
 
-id func() {
+id func(void) {
   NSMutableArray *array;
   array[3] = 0;
   return array[3];

diff  --git a/clang/test/CodeGenObjC/objc-asm-attribute-test.m b/clang/test/CodeGenObjC/objc-asm-attribute-test.m
index 51a8aa01f7eaf..1771fbd3cc5c4 100644
--- a/clang/test/CodeGenObjC/objc-asm-attribute-test.m
+++ b/clang/test/CodeGenObjC/objc-asm-attribute-test.m
@@ -51,7 +51,7 @@ - (instancetype)init;
 + (instancetype)alloc;
 @end
 
-id Test16877359() {
+id Test16877359(void) {
     return [SLREarth alloc];
 }
 

diff  --git a/clang/test/CodeGenObjC/objc-assign-ivar.m b/clang/test/CodeGenObjC/objc-assign-ivar.m
index 0dc9ec292d710..4589c8c2bca37 100644
--- a/clang/test/CodeGenObjC/objc-assign-ivar.m
+++ b/clang/test/CodeGenObjC/objc-assign-ivar.m
@@ -32,7 +32,7 @@ @interface Foo  {
 void *rhs = 0;
 #define ASSIGNTEST(expr, global) expr = rhs
 
-void testIvars() {
+void testIvars(void) {
   Foo *foo;
   ASSIGNTEST(foo->ivar, IvarAssigns);                                   // objc_assign_ivar
   ASSIGNTEST(foo->dict, IvarAssigns);                                   // objc_assign_ivar

diff  --git a/clang/test/CodeGenObjC/objc-container-subscripting-1.m b/clang/test/CodeGenObjC/objc-container-subscripting-1.m
index 7b198d4f0973b..c827bf1ef8eff 100644
--- a/clang/test/CodeGenObjC/objc-container-subscripting-1.m
+++ b/clang/test/CodeGenObjC/objc-container-subscripting-1.m
@@ -13,7 +13,7 @@ - (id)objectForKeyedSubscript:(id)key;
 - (void)setObject:(id)object forKeyedSubscript:(id)key;
 @end
 
-int main() {
+int main(void) {
   NSMutableArray *array;
   id val;
 

diff  --git a/clang/test/CodeGenObjC/objc-container-subscripting.m b/clang/test/CodeGenObjC/objc-container-subscripting.m
index fd8f8effac6d0..6ec8d9ca668af 100644
--- a/clang/test/CodeGenObjC/objc-container-subscripting.m
+++ b/clang/test/CodeGenObjC/objc-container-subscripting.m
@@ -24,7 +24,7 @@ - (void)setObject:(id)object forKeyedSubscript:(id)key;
 
 @class NSString;
 
-int main() {
+int main(void) {
   NSMutableArray<P> * array;
   id oldObject = array[10];
  

diff  --git a/clang/test/CodeGenObjC/objc-dictionary-literal.m b/clang/test/CodeGenObjC/objc-dictionary-literal.m
index b335582ed2be8..5d505ae1b4490 100644
--- a/clang/test/CodeGenObjC/objc-dictionary-literal.m
+++ b/clang/test/CodeGenObjC/objc-dictionary-literal.m
@@ -17,7 +17,7 @@ + (id)dictionaryWithObjects:(const id [])objects forKeys:(const id <NSCopying> [
 @interface NSString<NSCopying>
 @end
 
-int main() {
+int main(void) {
 	NSDictionary *dict = @{ @"name":@666 };
 	NSDictionary *dict1 = @{ @"name":@666 };
 	NSDictionary *dict2 = @{ @"name":@666 };

diff  --git a/clang/test/CodeGenObjC/objc-fixed-enum.m b/clang/test/CodeGenObjC/objc-fixed-enum.m
index 7555a8dca826f..0c123ce6f69d8 100644
--- a/clang/test/CodeGenObjC/objc-fixed-enum.m
+++ b/clang/test/CodeGenObjC/objc-fixed-enum.m
@@ -32,7 +32,7 @@ typedef NS_ENUM(NSInteger, Enum1) {
 };
 typedef NSInteger Enum3;
 
-int main() {
+int main(void) {
   Enum0 e0 = Enum0One;
   // CHECK: call void @llvm.dbg.declare(metadata {{.*}}, metadata ![[ENUM0:[0-9]+]], metadata !{{.*}})
   Enum1 e1 = Enum1One;

diff  --git a/clang/test/CodeGenObjC/objc-literal-debugger-test.m b/clang/test/CodeGenObjC/objc-literal-debugger-test.m
index d4043aa53c1c7..300fd42075c2c 100644
--- a/clang/test/CodeGenObjC/objc-literal-debugger-test.m
+++ b/clang/test/CodeGenObjC/objc-literal-debugger-test.m
@@ -21,7 +21,7 @@ @interface NSString : NSObject
 @end
 #endif
 
-int main() {
+int main(void) {
   // object literals.
   id l;
   l = @'a';

diff  --git a/clang/test/CodeGenObjC/objc-literal-tests.m b/clang/test/CodeGenObjC/objc-literal-tests.m
index 09561f9fe2d36..71225ae3f8797 100644
--- a/clang/test/CodeGenObjC/objc-literal-tests.m
+++ b/clang/test/CodeGenObjC/objc-literal-tests.m
@@ -51,10 +51,10 @@ + (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count
 @end
 #endif
 
-id NSUserName();
+id NSUserName(void);
 
 // CHECK: define{{.*}} i32 @main() [[NUW:#[0-9]+]]
-int main() {
+int main(void) {
   // CHECK: call{{.*}}@objc_msgSend{{.*}}i8 noundef signext 97
   NSNumber *aNumber = @'a';
   // CHECK: call{{.*}}@objc_msgSend{{.*}}i32 noundef 42

diff  --git a/clang/test/CodeGenObjC/objc-read-weak-byref.m b/clang/test/CodeGenObjC/objc-read-weak-byref.m
index 228f4770892f2..057700d38704b 100644
--- a/clang/test/CodeGenObjC/objc-read-weak-byref.m
+++ b/clang/test/CodeGenObjC/objc-read-weak-byref.m
@@ -7,7 +7,7 @@ @interface NSObject
 - copy;
 @end
 
-int main() {
+int main(void) {
     NSObject *object = 0;
     __weak __block NSObject* weak_object = object;
     void (^callback) (void) = [^{

diff  --git a/clang/test/CodeGenObjC/objc2-assign-global.m b/clang/test/CodeGenObjC/objc2-assign-global.m
index 147aa3d3e3f22..cec428dc6d4ed 100644
--- a/clang/test/CodeGenObjC/objc2-assign-global.m
+++ b/clang/test/CodeGenObjC/objc2-assign-global.m
@@ -35,7 +35,7 @@ @interface A
 #define ASSIGNTEST(expr, global) expr = rhs
 void *rhs = 0;
 
-int main() {
+int main(void) {
   static id staticGlobalId;
   static id staticGlobalArray[20];
   static NSObject *staticGlobalObject;

diff  --git a/clang/test/CodeGenObjC/objc2-new-gc-api-strongcast.m b/clang/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
index 5619ab3d3d499..de81ee069da89 100644
--- a/clang/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
+++ b/clang/test/CodeGenObjC/objc2-new-gc-api-strongcast.m
@@ -14,7 +14,7 @@ void foo (int _nextId)
 typedef struct {
     unsigned long state;
     id *itemsPtr;
-    void (^bp)();
+    void (^bp)(void);
     unsigned long *mutationsPtr;
     unsigned long extra[5];
 } NSFastEnumerationState;

diff  --git a/clang/test/CodeGenObjC/objc2-strong-cast-block-import.m b/clang/test/CodeGenObjC/objc2-strong-cast-block-import.m
index adec3762012bb..b30dcd88ec02c 100644
--- a/clang/test/CodeGenObjC/objc2-strong-cast-block-import.m
+++ b/clang/test/CodeGenObjC/objc2-strong-cast-block-import.m
@@ -7,7 +7,7 @@ @interface Test {
 }
 @end
 
-id newObject();
+id newObject(void);
 void runWithBlock(void(^)(int i));
 
 @implementation Test

diff  --git a/clang/test/CodeGenObjC/objc2-weak-assign.m b/clang/test/CodeGenObjC/objc2-weak-assign.m
index 13ce3386c034c..6b529d7b50a24 100644
--- a/clang/test/CodeGenObjC/objc2-weak-assign.m
+++ b/clang/test/CodeGenObjC/objc2-weak-assign.m
@@ -15,7 +15,7 @@ void foo (__weak id *param) {
  *param = 0;
 }
 
-int main()
+int main(void)
 {
 	*x = 0;
 	*y = 0;

diff  --git a/clang/test/CodeGenObjC/objc2-weak-compare.m b/clang/test/CodeGenObjC/objc2-weak-compare.m
index d8d5459aee239..093a78abc4892 100644
--- a/clang/test/CodeGenObjC/objc2-weak-compare.m
+++ b/clang/test/CodeGenObjC/objc2-weak-compare.m
@@ -11,7 +11,7 @@ @interface PBXTarget
 - Meth;
 @end
 
-extern void foo();
+extern void foo(void);
 @implementation PBXTarget
 - Meth {
 	if (_lastKnownTarget != result)

diff  --git a/clang/test/CodeGenObjC/objc2-weak-import-attribute.m b/clang/test/CodeGenObjC/objc2-weak-import-attribute.m
index 6ee57467b2279..5ed54f7882a71 100644
--- a/clang/test/CodeGenObjC/objc2-weak-import-attribute.m
+++ b/clang/test/CodeGenObjC/objc2-weak-import-attribute.m
@@ -24,7 +24,7 @@ @interface WeakClass3
 + message;
 @end
 
-int main() {
+int main(void) {
      [WeakClass3 message];
 }
 

diff  --git a/clang/test/CodeGenObjC/objc2-write-barrier.m b/clang/test/CodeGenObjC/objc2-write-barrier.m
index 7634dc97412ad..b8d0ccb628a4c 100644
--- a/clang/test/CodeGenObjC/objc2-write-barrier.m
+++ b/clang/test/CodeGenObjC/objc2-write-barrier.m
@@ -56,7 +56,7 @@ @interface Foo  {
 
 #define ASSIGNTEST(expr, global) expr = (typeof(expr))rhs
 
-int testGlobals() {
+int testGlobals(void) {
   // Everything in this function generates assign_global intercepts
   int counter = 0;
 
@@ -97,7 +97,7 @@ int testGlobals() {
 }
 
 
-int testIvars() {
+int testIvars(void) {
   Foo *foo;
   int counter = 0;
 

diff  --git a/clang/test/CodeGenObjC/object-incr-decr-1.m b/clang/test/CodeGenObjC/object-incr-decr-1.m
index c1181a21c7202..611ca05fab384 100644
--- a/clang/test/CodeGenObjC/object-incr-decr-1.m
+++ b/clang/test/CodeGenObjC/object-incr-decr-1.m
@@ -6,7 +6,7 @@ @interface Foo
 }
 @end
 
-Foo* foo()
+Foo* foo(void)
 {
   Foo *f;
   

diff  --git a/clang/test/CodeGenObjC/os_log.m b/clang/test/CodeGenObjC/os_log.m
index 8a676944fa91a..d261c71702602 100644
--- a/clang/test/CodeGenObjC/os_log.m
+++ b/clang/test/CodeGenObjC/os_log.m
@@ -16,7 +16,7 @@ + (id)m1;
 C *c;
 
 @class NSString;
-extern __attribute__((visibility("default"))) NSString *GenString();
+extern __attribute__((visibility("default"))) NSString *GenString(void);
 void os_log_pack_send(void *);
 
 // CHECK-LABEL: define{{.*}} void @test_builtin_os_log1(
@@ -26,8 +26,8 @@ + (id)m1;
 // CHECK-O2: %[[V0:.*]] = call i8* @llvm.objc.retain(
 // CHECK-O2: store i8* %[[V0]], i8** %[[A_ADDR]], align 8,
 // CHECK-O0: call void @llvm.objc.storeStrong(i8** %[[A_ADDR]], i8* %{{.*}})
-// CHECK-O2: %[[V4:.*]] = call %{{.*}}* (...) @GenString() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
-// CHECK-O0: %[[CALL:.*]] = call %{{.*}}* (...) @GenString()
+// CHECK-O2: %[[V4:.*]] = call %{{.*}}* @GenString() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
+// CHECK-O0: %[[CALL:.*]] = call %{{.*}}* @GenString()
 // CHECK-O0: %[[V2:.*]] = bitcast %{{.*}}* %[[CALL]] to i8*
 // CHECK-O0: %[[V3:.*]] = notail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %[[V2]])
 // CHECK-O0: %[[V4:.*]] = bitcast i8* %[[V3]] to %{{.*}}*
@@ -72,8 +72,8 @@ void test_builtin_os_log2(void *buf, id __unsafe_unretained a) {
 // CHECK-LABEL: define{{.*}} void @test_builtin_os_log3(
 // CHECK: alloca i8*, align 8
 // CHECK: %[[OS_LOG_ARG:.*]] = alloca i8*, align 8
-// CHECK-O2: %[[V3:.*]] = call %{{.*}}* (...) @GenString() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
-// CHECK-O0: %[[CALL:.*]] = call %{{.*}}* (...) @GenString()
+// CHECK-O2: %[[V3:.*]] = call %{{.*}}* @GenString() [ "clang.arc.attachedcall"(i8* (i8*)* @llvm.objc.retainAutoreleasedReturnValue) ]
+// CHECK-O0: %[[CALL:.*]] = call %{{.*}}* @GenString()
 // CHECK-O0: %[[V1:.*]] = bitcast %{{.*}}* %[[CALL]] to i8*
 // CHECK-O0: %[[V2:.*]] = notail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %[[V1]])
 // CHECK-O0: %[[V3:.*]] = bitcast i8* %[[V2]] to %{{.*}}*

diff  --git a/clang/test/CodeGenObjC/property-agrr-getter.m b/clang/test/CodeGenObjC/property-agrr-getter.m
index 6d8f1d6b03ad2..7a1b06da4f567 100644
--- a/clang/test/CodeGenObjC/property-agrr-getter.m
+++ b/clang/test/CodeGenObjC/property-agrr-getter.m
@@ -31,7 +31,7 @@ @interface AnObject
 
 @end
 
-float f ()
+float f (void)
 {
   AnObject* obj;
   return (obj.size).width;

diff  --git a/clang/test/CodeGenObjC/property-getter-dot-syntax.m b/clang/test/CodeGenObjC/property-getter-dot-syntax.m
index f22b0517735d3..d5875a3dad308 100644
--- a/clang/test/CodeGenObjC/property-getter-dot-syntax.m
+++ b/clang/test/CodeGenObjC/property-getter-dot-syntax.m
@@ -4,7 +4,7 @@ @protocol NSObject
 - (void *)description;
 @end
 
-int main()
+int main(void)
 {
         id<NSObject> eggs;
         void *eggsText= eggs.description;

diff  --git a/clang/test/CodeGenObjC/property-incr-decr-1.m b/clang/test/CodeGenObjC/property-incr-decr-1.m
index d75c02eaa20f9..99535cd88e688 100644
--- a/clang/test/CodeGenObjC/property-incr-decr-1.m
+++ b/clang/test/CodeGenObjC/property-incr-decr-1.m
@@ -15,7 +15,7 @@ @implementation SomeClass
 @synthesize myValue=_myValue;
 @end
 
-int main()
+int main(void)
 {
     int val;
     SomeClass *o = [SomeClass new];

diff  --git a/clang/test/CodeGenObjC/property-ref-cast-to-void.m b/clang/test/CodeGenObjC/property-ref-cast-to-void.m
index 6f24d629f540e..5be6a60543f82 100644
--- a/clang/test/CodeGenObjC/property-ref-cast-to-void.m
+++ b/clang/test/CodeGenObjC/property-ref-cast-to-void.m
@@ -8,7 +8,7 @@ - (int)myProperty;
 - (double)myGetter;
 @end
 
-void FUNC () {
+void FUNC (void) {
     TestClass *obj;
     (void)obj.myProperty; 
     (void)obj.myGetter; 

diff  --git a/clang/test/CodeGenObjC/property.m b/clang/test/CodeGenObjC/property.m
index dae9111509b00..aca3fe21770dd 100644
--- a/clang/test/CodeGenObjC/property.m
+++ b/clang/test/CodeGenObjC/property.m
@@ -56,7 +56,7 @@ -(int) dyn {
 // Test that compound operations only compute the base once.
 // CHECK-LABEL: define{{.*}} void @test2
 A *test2_helper(void);
-void test2() {
+void test2(void) {
   // CHECK:      [[BASE:%.*]] = call [[A:%.*]]* @test2_helper()
   // CHECK-NEXT: [[BASETMP:%.*]] = bitcast [[A]]* [[BASE]] to i8*
   // CHECK-NEXT: [[SEL:%.*]] = load i8*, i8**

diff  --git a/clang/test/CodeGenObjC/protocols-lazy.m b/clang/test/CodeGenObjC/protocols-lazy.m
index a2dfc106d6433..6764d0487fe36 100644
--- a/clang/test/CodeGenObjC/protocols-lazy.m
+++ b/clang/test/CodeGenObjC/protocols-lazy.m
@@ -12,7 +12,7 @@ @protocol P1 -im1; @end
 // RUN: grep OBJC_PROTOCOL_P2 %t | count 3
 // RUN: grep OBJC_PROTOCOL_INSTANCE_METHODS_P2 %t | count 3
 @protocol P2 -im1; @end
-void f0() { id x = @protocol(P2); }
+void f0(void) { id x = @protocol(P2); }
 
 // Forward definition triggered by protocol reference.
 // RUN: grep OBJC_PROTOCOL_P3 %t | count 3
@@ -51,5 +51,5 @@ @implementation UserP5
 @protocol P6 -im1; @end
 @interface I1<P6> @end
 @implementation I1 -im1 { return 0; }; @end
-void f3() { id x = @protocol(P6); }
+void f3(void) { id x = @protocol(P6); }
 

diff  --git a/clang/test/CodeGenObjC/protocols.m b/clang/test/CodeGenObjC/protocols.m
index 9f8abd4ea45ab..354bb0f6ab0a8 100644
--- a/clang/test/CodeGenObjC/protocols.m
+++ b/clang/test/CodeGenObjC/protocols.m
@@ -49,7 +49,7 @@ void foo(const id a) {
   void *p = @protocol(P3);
 }
 
-int main() {
+int main(void) {
   Protocol *P0 = @protocol(P0);
   Protocol *P1 = @protocol(P1);
   Protocol *P2 = @protocol(P2);
@@ -68,6 +68,6 @@ int main() {
 
 // rdar://problem/7992749
 typedef Root<P1> P1Object;
-int test10() {
+int test10(void) {
   return [P1Object maxValue];
 }

diff  --git a/clang/test/CodeGenObjC/related-result-type.m b/clang/test/CodeGenObjC/related-result-type.m
index cacf2c031498c..fea31bf876f29 100644
--- a/clang/test/CodeGenObjC/related-result-type.m
+++ b/clang/test/CodeGenObjC/related-result-type.m
@@ -10,7 +10,7 @@ @interface NSString : NSObject
 @end
 
 // CHECK-LABEL: define {{.*}}void @test1()
-void test1() {
+void test1(void) {
   // CHECK: {{call.*@objc_msgSend}}
   // CHECK: {{call.*@objc_msgSend}}
   // CHECK: {{call.*@objc_msgSend}}
@@ -19,7 +19,7 @@ void test1() {
 }
 
 // CHECK-LABEL: define {{.*}}void @test2()
-void test2() {
+void test2(void) {
   // CHECK: {{call.*@objc_msgSend}}
   // CHECK: {{call.*@objc_msgSend}}
   // CHECK: {{call.*@objc_msgSend}}

diff  --git a/clang/test/CodeGenObjC/stret.m b/clang/test/CodeGenObjC/stret.m
index beb6f302989e4..03aac40258f52 100644
--- a/clang/test/CodeGenObjC/stret.m
+++ b/clang/test/CodeGenObjC/stret.m
@@ -17,6 +17,6 @@
 @interface Test
 +(struct st)method;
 @end
-int main() {
+int main(void) {
   [Test method];
 }

diff  --git a/clang/test/CodeGenObjC/strong-in-c-struct.m b/clang/test/CodeGenObjC/strong-in-c-struct.m
index c5eae31c74e6c..4a4128770f9cf 100644
--- a/clang/test/CodeGenObjC/strong-in-c-struct.m
+++ b/clang/test/CodeGenObjC/strong-in-c-struct.m
@@ -601,7 +601,7 @@ void test_copy_constructor_StrongVolatile1(Strong *s) {
 
 void test_block_capture_Strong(void) {
   Strong t;
-  BlockTy b = ^(){ (void)t; };
+  BlockTy b = ^(void){ (void)t; };
 }
 
 // CHECK: define{{.*}} void @test_variable_length_array(i32 noundef %[[N:.*]])
@@ -920,7 +920,7 @@ void test_volatile_variable_reference(volatile StrongSmall *a) {
 
 // CHECK: define linkonce_odr hidden void @__default_constructor_8_sv0
 // CHECK: define linkonce_odr hidden void @__copy_assignment_8_8_sv0
-void test_zero_bitfield() {
+void test_zero_bitfield(void) {
   struct ZeroBitfield volatile a, b;
   a = b;
 }

diff  --git a/clang/test/CodeGenObjC/super-dotsyntax-property.m b/clang/test/CodeGenObjC/super-dotsyntax-property.m
index 9dfde2d1de3ab..a7da21c9d328a 100644
--- a/clang/test/CodeGenObjC/super-dotsyntax-property.m
+++ b/clang/test/CodeGenObjC/super-dotsyntax-property.m
@@ -35,7 +35,7 @@ -(void) setParent : (int) arg {
 }
 @end
 
-void f0() {
+void f0(void) {
   int l1 = A.classGetter;
   int l2 = [A classGetter2];
 }

diff  --git a/clang/test/CodeGenObjC/tentative-cfconstantstring.m b/clang/test/CodeGenObjC/tentative-cfconstantstring.m
index d5cd259580fe0..9a3a6c27c76cc 100644
--- a/clang/test/CodeGenObjC/tentative-cfconstantstring.m
+++ b/clang/test/CodeGenObjC/tentative-cfconstantstring.m
@@ -15,7 +15,7 @@ @interface Foo : NSObject
 @end
 
 
-static inline void _inlineFunction() {
+static inline void _inlineFunction(void) {
     [Bar format:@" "];
 }
 

diff  --git a/clang/test/CodeGenObjC/ubsan-bool.m b/clang/test/CodeGenObjC/ubsan-bool.m
index 0490100c53f15..7e69e0995ec07 100644
--- a/clang/test/CodeGenObjC/ubsan-bool.m
+++ b/clang/test/CodeGenObjC/ubsan-bool.m
@@ -5,7 +5,7 @@
 typedef signed char BOOL;
 
 // SHARED-LABEL: f1
-BOOL f1() {
+BOOL f1(void) {
   // OBJC: call void @__ubsan_handle_load_invalid_value
   // C-NOT: call void @__ubsan_handle_load_invalid_value
   BOOL a = 2;

diff  --git a/clang/test/CodeGenObjC/ubsan-nonnull-and-nullability.m b/clang/test/CodeGenObjC/ubsan-nonnull-and-nullability.m
index 41f7c76013faa..d9d16e501c292 100644
--- a/clang/test/CodeGenObjC/ubsan-nonnull-and-nullability.m
+++ b/clang/test/CodeGenObjC/ubsan-nonnull-and-nullability.m
@@ -34,7 +34,7 @@
 void f2(int *_Nonnull __attribute__((nonnull)) p) {}
 
 // CHECK-LABEL: define{{.*}} void @call_f2
-void call_f2() {
+void call_f2(void) {
   // CHECK: call void @__ubsan_handle_nonnull_arg_abort
   // CHECK-NOT: call void @__ubsan_handle_nonnull_arg_abort
   f2((void *)0);
@@ -52,7 +52,7 @@ void call_f2() {
 // statement, to avoid accidentally calling the runtime.
 
 // CHECK-LABEL: define{{.*}} nonnull i32* @f4
-__attribute__((returns_nonnull)) int *f4() {
+__attribute__((returns_nonnull)) int *f4(void) {
   // CHECK: store i8* null, i8** [[SLOC_PTR:%.*]]
   // CHECK: [[SLOC:%.*]] = load {{.*}} [[SLOC_PTR]]
   // CHECK: [[SLOC_NONNULL:%.*]] = icmp ne i8* [[SLOC]], null

diff  --git a/clang/test/CodeGenObjC/ubsan-nullability.m b/clang/test/CodeGenObjC/ubsan-nullability.m
index 7e714c93c5b53..22e5d592150ee 100644
--- a/clang/test/CodeGenObjC/ubsan-nullability.m
+++ b/clang/test/CodeGenObjC/ubsan-nullability.m
@@ -186,7 +186,7 @@ @interface NSObject <NSObject> {}
 #pragma clang assume_nonnull begin
 
 /// Create a "NSObject * _Nonnull" instance.
-NSObject *get_nonnull_error() {
+NSObject *get_nonnull_error(void) {
   // Use nil for convenience. The actual object doesn't matter.
   return (NSObject *)NULL;
 }
@@ -194,7 +194,7 @@ @interface NSObject <NSObject> {}
 NSObject *_Nullable no_null_return_value_diagnostic(int flag) {
 // CHECK-LABEL: define internal {{.*}}no_null_return_value_diagnostic{{i?}}_block_invoke
 // CHECK-NOT: @__ubsan_handle_nullability_return
-  NSObject *_Nullable (^foo)() = ^() {
+  NSObject *_Nullable (^foo)(void) = ^(void) {
     if (flag) {
       // Clang should not infer a nonnull return value for this block when this
       // call is present.
@@ -208,7 +208,7 @@ @interface NSObject <NSObject> {}
 
 #pragma clang assume_nonnull end
 
-int main() {
+int main(void) {
   nonnull_retval1(INULL);
   nonnull_retval2(INNULL, INNULL, INULL, (int *_Nullable)NULL, 0, 0, 0, 0);
   call_func_with_nonnull_arg(INNULL);

diff  --git a/clang/test/CodeGenObjC/unqual-copy-restore.m b/clang/test/CodeGenObjC/unqual-copy-restore.m
index 09915f7ce6a82..0dc6bcb8c9511 100644
--- a/clang/test/CodeGenObjC/unqual-copy-restore.m
+++ b/clang/test/CodeGenObjC/unqual-copy-restore.m
@@ -7,7 +7,7 @@ @protocol P1
 
 typedef int handler(id<P1> *const p);
 
-int main() {
+int main(void) {
   id<P1> i1 = 0;
   handler *func = 0;
   return func(&i1);

diff  --git a/clang/test/CodeGenObjC/weak-metaclass-visibility.m b/clang/test/CodeGenObjC/weak-metaclass-visibility.m
index 9254ededbc041..998a8a579053e 100644
--- a/clang/test/CodeGenObjC/weak-metaclass-visibility.m
+++ b/clang/test/CodeGenObjC/weak-metaclass-visibility.m
@@ -24,7 +24,7 @@ - (void)someInstanceMethod {
 }
 @end
 
-void kit()
+void kit(void)
 {
     MyClass *wrapper = [MyClass alloc];
 }


        


More information about the cfe-commits mailing list