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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 15 06:28:11 PST 2022


Author: Aaron Ballman
Date: 2022-02-15T09:28:02-05:00
New Revision: ed509fe296375eb7c01d3d9aeec15cc784695210

URL: https://github.com/llvm/llvm-project/commit/ed509fe296375eb7c01d3d9aeec15cc784695210
DIFF: https://github.com/llvm/llvm-project/commit/ed509fe296375eb7c01d3d9aeec15cc784695210.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 tenth batch of tests being updated (there are a
significant number of other tests left to be updated).

Added: 
    

Modified: 
    clang/test/CodeGen/Inputs/code-coverage-filter1.h
    clang/test/CodeGen/Inputs/code-coverage-filter2.h
    clang/test/CodeGen/Inputs/debug-info-embed-source.c
    clang/test/CodeGen/_Bool-conversion.c
    clang/test/CodeGen/aarch64-args-hfa.c
    clang/test/CodeGen/aarch64-args.cpp
    clang/test/CodeGen/aarch64-byval-temp.c
    clang/test/CodeGen/aarch64-inline-asm.c
    clang/test/CodeGen/aarch64-sve-inline-asm.c
    clang/test/CodeGen/aarch64-type-sizes.c
    clang/test/CodeGen/aarch64-varargs.c
    clang/test/CodeGen/address-space-avr.c
    clang/test/CodeGen/address-space.c
    clang/test/CodeGen/addrsig.c
    clang/test/CodeGen/aggregate-assign-call.c
    clang/test/CodeGen/align-local.c
    clang/test/CodeGen/align-loops.c
    clang/test/CodeGen/alignment.c
    clang/test/CodeGen/alignof.c
    clang/test/CodeGen/alloc-size.c
    clang/test/CodeGen/always-inline.c
    clang/test/CodeGen/arc/arguments.c
    clang/test/CodeGen/arc/struct-align.c
    clang/test/CodeGen/arm-be-result-return.c
    clang/test/CodeGen/arm-bitfield-alignment.c
    clang/test/CodeGen/arm-cmse-attr.c
    clang/test/CodeGen/arm-fp16-arguments.c
    clang/test/CodeGen/arm-interrupt-attr.c
    clang/test/CodeGen/arm-sve-vector-bits-vscale-range.c
    clang/test/CodeGen/arm-swiftcall.c
    clang/test/CodeGen/arm-target-attr.c
    clang/test/CodeGen/arm-varargs.c
    clang/test/CodeGen/arm64-microsoft-intrinsics.c
    clang/test/CodeGen/array.c
    clang/test/CodeGen/artificial.c
    clang/test/CodeGen/asan-strings.c
    clang/test/CodeGen/asm-call-func.c
    clang/test/CodeGen/asm-inout.c
    clang/test/CodeGen/asm-reg-var-local.c
    clang/test/CodeGen/asm-variable.c
    clang/test/CodeGen/asm.c
    clang/test/CodeGen/asm_64.c
    clang/test/CodeGen/asm_arm64.c
    clang/test/CodeGen/assign.c
    clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
    clang/test/CodeGen/atomic-arm64.c
    clang/test/CodeGen/atomic-ops.c
    clang/test/CodeGen/atomic_ops.c
    clang/test/CodeGen/attr-availability.c
    clang/test/CodeGen/attr-cleanup.c
    clang/test/CodeGen/attr-coldhot.c
    clang/test/CodeGen/attr-cpuspecific.c
    clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c
    clang/test/CodeGen/attr-disable-tail-calls.c
    clang/test/CodeGen/attr-ifunc.c
    clang/test/CodeGen/attr-leaf.c
    clang/test/CodeGen/attr-mode-enums.c
    clang/test/CodeGen/attr-mode-vector-types.c
    clang/test/CodeGen/attr-mustprogress.c
    clang/test/CodeGen/attr-naked.c
    clang/test/CodeGen/attr-nodebug.c
    clang/test/CodeGen/attr-nodebug2.c
    clang/test/CodeGen/attr-noinline.c
    clang/test/CodeGen/attr-noreturn.c
    clang/test/CodeGen/attr-optnone.c
    clang/test/CodeGen/attr-retain.c
    clang/test/CodeGen/attr-speculative-load-hardening.c
    clang/test/CodeGen/attr-target-clones.c
    clang/test/CodeGen/attr-target-general-regs-only-x86.c
    clang/test/CodeGen/attr-target-mv-func-ptrs.c
    clang/test/CodeGen/attr-target-mv-va-args.c
    clang/test/CodeGen/attr-target-mv.c
    clang/test/CodeGen/attr-target-x86.c
    clang/test/CodeGen/attr-used.c
    clang/test/CodeGen/attribute_constructor.c
    clang/test/CodeGen/attributes.c
    clang/test/CodeGen/available-externally-suppress.c
    clang/test/CodeGen/avr-unsupported-inline-asm-constraints.c
    clang/test/CodeGen/avr/functionptr-addrspace.c
    clang/test/CodeGen/big-atomic-ops.c
    clang/test/CodeGen/bitfield-2.c
    clang/test/CodeGen/bitfield-assign.c
    clang/test/CodeGen/bitfield-init.c
    clang/test/CodeGen/block-3.c
    clang/test/CodeGen/block-byref-aggr.c
    clang/test/CodeGen/block-copy.c
    clang/test/CodeGen/block-with-perdefinedexpr.c
    clang/test/CodeGen/blocks-1.c
    clang/test/CodeGen/blocks-aligned-byref-variable.c
    clang/test/CodeGen/blocks-seq.c
    clang/test/CodeGen/blocks.c
    clang/test/CodeGen/bounds-checking.c
    clang/test/CodeGen/branch-on-bool.c
    clang/test/CodeGen/branch-target-layout.c
    clang/test/CodeGen/builtin-assume-aligned.c
    clang/test/CodeGen/builtin-constant-p.c
    clang/test/CodeGen/builtin-cpu-is.c
    clang/test/CodeGen/builtin-cpu-supports.c
    clang/test/CodeGen/builtin-expect.c
    clang/test/CodeGen/builtin-memfns.c
    clang/test/CodeGen/builtin-sponentry.c
    clang/test/CodeGen/builtin-unpredictable.c
    clang/test/CodeGen/builtin-unwind-init.c
    clang/test/CodeGen/builtins-arm-exclusive.c
    clang/test/CodeGen/builtins-arm.c
    clang/test/CodeGen/builtins-arm64.c
    clang/test/CodeGen/builtins-riscv.c
    clang/test/CodeGen/builtins-wasm.c
    clang/test/CodeGen/builtins-x86.c
    clang/test/CodeGen/builtins.c
    clang/test/CodeGen/c-strings.c
    clang/test/CodeGen/call.c
    clang/test/CodeGen/callback_annotated.c
    clang/test/CodeGen/calling-conv-ignored.c
    clang/test/CodeGen/capture-complex-expr-in-block.c
    clang/test/CodeGen/captured-statements-nested.c
    clang/test/CodeGen/captured-statements.c
    clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c
    clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c
    clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
    clang/test/CodeGen/catch-undef-behavior.c
    clang/test/CodeGen/cfguardtable.c
    clang/test/CodeGen/cfi-check-fail.c
    clang/test/CodeGen/cfi-check-fail2.c
    clang/test/CodeGen/cfi-icall-canonical-jump-tables.c
    clang/test/CodeGen/cfstring.c
    clang/test/CodeGen/cfstring2.c
    clang/test/CodeGen/char-literal.c
    clang/test/CodeGen/cleanup-destslot-simple.c
    clang/test/CodeGen/clear_cache.c
    clang/test/CodeGen/cmse-clear-arg.c
    clang/test/CodeGen/cmse-clear-return.c
    clang/test/CodeGen/code-coverage-filter.c
    clang/test/CodeGen/code-coverage-tsan.c
    clang/test/CodeGen/coff-aarch64-type-sizes.c
    clang/test/CodeGen/complex-builtins-3.c
    clang/test/CodeGen/complex-strictfp.c
    clang/test/CodeGen/complex.c
    clang/test/CodeGen/compound-assign-overflow.c
    clang/test/CodeGen/compound-literal.c
    clang/test/CodeGen/compound.c
    clang/test/CodeGen/conditional-gnu-ext.c
    clang/test/CodeGen/conditional.c
    clang/test/CodeGen/const-init.c
    clang/test/CodeGen/const-label-addr.c
    clang/test/CodeGen/const-unordered-compare.c
    clang/test/CodeGen/constantexpr-fneg.c
    clang/test/CodeGen/constructor-attribute.c
    clang/test/CodeGen/convergent-functions.cpp
    clang/test/CodeGen/coverage-compilation-dir.c
    clang/test/CodeGen/dbg-const-int128.c
    clang/test/CodeGen/debug-info-abspath.c
    clang/test/CodeGen/debug-info-block-decl.c
    clang/test/CodeGen/debug-info-block-expr.c
    clang/test/CodeGen/debug-info-block-vars.c
    clang/test/CodeGen/debug-info-block.c
    clang/test/CodeGen/debug-info-codeview-buildinfo.c
    clang/test/CodeGen/debug-info-codeview-heapallocsite.c
    clang/test/CodeGen/debug-info-crash.c
    clang/test/CodeGen/debug-info-embed-source.c
    clang/test/CodeGen/debug-info-extern-basic.c
    clang/test/CodeGen/debug-info-extern-callback.c
    clang/test/CodeGen/debug-info-extern-duplicate.c
    clang/test/CodeGen/debug-info-extern-multi.c
    clang/test/CodeGen/debug-info-extern-unused.c
    clang/test/CodeGen/debug-info-file-change.c
    clang/test/CodeGen/debug-info-gline-tables-only2.c
    clang/test/CodeGen/debug-info-global-constant.c
    clang/test/CodeGen/debug-info-line2.c
    clang/test/CodeGen/debug-info-names.c
    clang/test/CodeGen/debug-info-no-inline-line-tables.c
    clang/test/CodeGen/debug-info-ranges-base-address.c
    clang/test/CodeGen/debug-info-scope-file.c
    clang/test/CodeGen/debug-info-scope.c
    clang/test/CodeGen/debug-info-static-const-fp.c
    clang/test/CodeGen/debug-info-sysroot-sdk.c
    clang/test/CodeGen/debug-info.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/Inputs/code-coverage-filter1.h b/clang/test/CodeGen/Inputs/code-coverage-filter1.h
index 4c0de6c5e569b..4de15afb1998a 100644
--- a/clang/test/CodeGen/Inputs/code-coverage-filter1.h
+++ b/clang/test/CodeGen/Inputs/code-coverage-filter1.h
@@ -1 +1 @@
-void test1() {}
+void test1(void) {}

diff  --git a/clang/test/CodeGen/Inputs/code-coverage-filter2.h b/clang/test/CodeGen/Inputs/code-coverage-filter2.h
index 91e68ccae978d..eb1ac4a14aa3f 100644
--- a/clang/test/CodeGen/Inputs/code-coverage-filter2.h
+++ b/clang/test/CodeGen/Inputs/code-coverage-filter2.h
@@ -1 +1 @@
-void test2() {}
+void test2(void) {}

diff  --git a/clang/test/CodeGen/Inputs/debug-info-embed-source.c b/clang/test/CodeGen/Inputs/debug-info-embed-source.c
index 2fb55eed6b26c..335ccc9d2c376 100644
--- a/clang/test/CodeGen/Inputs/debug-info-embed-source.c
+++ b/clang/test/CodeGen/Inputs/debug-info-embed-source.c
@@ -1 +1 @@
-void foo() { }
+void foo(void) { }

diff  --git a/clang/test/CodeGen/_Bool-conversion.c b/clang/test/CodeGen/_Bool-conversion.c
index 631d6327d5291..b0ebd86c87cd2 100644
--- a/clang/test/CodeGen/_Bool-conversion.c
+++ b/clang/test/CodeGen/_Bool-conversion.c
@@ -5,8 +5,8 @@
 // CHECK: }
 
 static _Bool f0_0(void *a0) { return (_Bool) a0; }
-int f0() { return f0_0((void*) 0x2); }
+int f0(void) { return f0_0((void*) 0x2); }
 
 _Bool f1(void) {
-  return (_Bool) ({ void (*x)(); x = 0; });
+  return (_Bool) ({ void (*x)(void); x = 0; });
 }

diff  --git a/clang/test/CodeGen/aarch64-args-hfa.c b/clang/test/CodeGen/aarch64-args-hfa.c
index 4abdc426a5ed1..186399c9cf0fe 100644
--- a/clang/test/CodeGen/aarch64-args-hfa.c
+++ b/clang/test/CodeGen/aarch64-args-hfa.c
@@ -13,7 +13,7 @@ float f0(S0 h) {
 
 // CHECK: define{{.*}} float @f0_call()
 // CHECK: %call = call float @f0([2 x float] %1)
-float f0_call() {
+float f0_call(void) {
   S0 h = {1.0f, 2.0f};
   return f0(h);
 }
@@ -28,7 +28,7 @@ double f1(S1 h) {
 
 // CHECK: define{{.*}} double @f1_call()
 // CHECK: %call = call double @f1([2 x double] %1
-double f1_call() {
+double f1_call(void) {
   S1 h = {1.0, 2.0};
   return f1(h);
 }
@@ -45,7 +45,7 @@ double f2(S2 h) {
 // CHECK: define{{.*}} double @f2_call()
 // CHECK-AAPCS:  %call = call double @f2([2 x double] alignstack(16) %1)
 // CHECK-DARWIN: %call = call double @f2([2 x double] %1
-double f2_call() {
+double f2_call(void) {
   S2 h = {1.0, 2.0};
   return f2(h);
 }
@@ -63,7 +63,7 @@ double f3(S3 h) {
 // CHECK: define{{.*}} double @f3_call()
 // CHECK-AAPCS:  %call = call double @f3([4 x double] alignstack(16) %1)
 // CHECK-DARWIN: %call = call double @f3([4 x double] %1
-double f3_call() {
+double f3_call(void) {
   S3 h = {1.0, 2.0};
   return f3(h);
 }

diff  --git a/clang/test/CodeGen/aarch64-args.cpp b/clang/test/CodeGen/aarch64-args.cpp
index 2a3363663198a..fe1298cc683a4 100644
--- a/clang/test/CodeGen/aarch64-args.cpp
+++ b/clang/test/CodeGen/aarch64-args.cpp
@@ -25,7 +25,7 @@ EXTERNC int empty_arg(struct Empty e, int a) {
 // CHECK: define{{.*}} void @empty_ret()
 // CHECK-GNU-C: define{{.*}} void @empty_ret()
 // CHECK-GNU-CXX: define{{.*}} void @empty_ret()
-EXTERNC struct Empty empty_ret() {
+EXTERNC struct Empty empty_ret(void) {
   struct Empty e;
   return e;
 }
@@ -61,7 +61,7 @@ EXTERNC int sort_of_empty_arg(struct Empty e, int a) {
 // CHECK: define{{.*}} void @sort_of_empty_ret()
 // CHECK-GNU-C: define{{.*}} void @sort_of_empty_ret()
 // CHECK-GNU-CXX: define{{.*}} void @sort_of_empty_ret()
-EXTERNC struct SortOfEmpty sort_of_empty_ret() {
+EXTERNC struct SortOfEmpty sort_of_empty_ret(void) {
   struct SortOfEmpty e;
   return e;
 }

diff  --git a/clang/test/CodeGen/aarch64-byval-temp.c b/clang/test/CodeGen/aarch64-byval-temp.c
index f25a6b76dde46..2a505de049edc 100644
--- a/clang/test/CodeGen/aarch64-byval-temp.c
+++ b/clang/test/CodeGen/aarch64-byval-temp.c
@@ -12,7 +12,7 @@ void pass_large(struct large);
 //
 // Make sure we generate the appropriate lifetime markers for the temporary
 // allocas so that the optimizer can re-use stack slots if possible.
-void example() {
+void example(void) {
     struct large l = {0};
     pass_large(l);
     pass_large(l);

diff  --git a/clang/test/CodeGen/aarch64-inline-asm.c b/clang/test/CodeGen/aarch64-inline-asm.c
index 4dfaff5679d0a..9931fd5d87874 100644
--- a/clang/test/CodeGen/aarch64-inline-asm.c
+++ b/clang/test/CodeGen/aarch64-inline-asm.c
@@ -23,7 +23,7 @@ void test_generic_constraints(int var32, long var64) {
 
 float f;
 double d;
-void test_constraint_w() {
+void test_constraint_w(void) {
     asm("fadd %s0, %s1, %s1" : "=w"(f) : "w"(f));
 // CHECK: [[FLT_ARG:%[a-zA-Z_0-9]+]] = load float, float* @f
 // CHECK: call float asm "fadd ${0:s}, ${1:s}, ${1:s}", "=w,w"(float [[FLT_ARG]])

diff  --git a/clang/test/CodeGen/aarch64-sve-inline-asm.c b/clang/test/CodeGen/aarch64-sve-inline-asm.c
index 90e7777925b9b..8f26680e08f4c 100644
--- a/clang/test/CodeGen/aarch64-sve-inline-asm.c
+++ b/clang/test/CodeGen/aarch64-sve-inline-asm.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK
 
-void test_sve_asm() {
+void test_sve_asm(void) {
   asm volatile(
       "ptrue p0.d\n"
       "ptrue p15.d\n"

diff  --git a/clang/test/CodeGen/aarch64-type-sizes.c b/clang/test/CodeGen/aarch64-type-sizes.c
index 195e8968ecb1d..7a2508c6e1587 100644
--- a/clang/test/CodeGen/aarch64-type-sizes.c
+++ b/clang/test/CodeGen/aarch64-type-sizes.c
@@ -3,79 +3,79 @@
 
 // CHECK: target datalayout = "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 
-int check_short() {
+int check_short(void) {
   return sizeof(short);
 // CHECK: ret i32 2
 }
 
-int check_int() {
+int check_int(void) {
   return sizeof(int);
 // CHECK: ret i32 4
 }
 
-int check_long() {
+int check_long(void) {
 // Both 4 and 8 are permitted under the PCS, Linux says 8!
   return sizeof(long);
 // CHECK: ret i32 8
 }
 
-int check_longlong() {
+int check_longlong(void) {
   return sizeof(long long);
 // CHECK: ret i32 8
 }
 
-int check_int128() {
+int check_int128(void) {
   return sizeof(__int128);
 // CHECK: ret i32 16
 }
 
-int check_fp16() {
+int check_fp16(void) {
   return sizeof(__fp16);
 // CHECK: ret i32 2
 }
 
-int check_float() {
+int check_float(void) {
   return sizeof(float);
 // CHECK: ret i32 4
 }
 
-int check_double() {
+int check_double(void) {
   return sizeof(double);
 // CHECK: ret i32 8
 }
 
-int check_longdouble() {
+int check_longdouble(void) {
   return sizeof(long double);
 // CHECK: ret i32 16
 }
 
-int check_floatComplex() {
+int check_floatComplex(void) {
   return sizeof(float _Complex);
 // CHECK: ret i32 8
 }
 
-int check_doubleComplex() {
+int check_doubleComplex(void) {
   return sizeof(double _Complex);
 // CHECK: ret i32 16
 }
 
-int check_longdoubleComplex() {
+int check_longdoubleComplex(void) {
   return sizeof(long double _Complex);
 // CHECK: ret i32 32
 }
 
-int check_bool() {
+int check_bool(void) {
   return sizeof(_Bool);
 // CHECK: ret i32 1
 }
 
-int check_wchar() {
+int check_wchar(void) {
 // PCS allows either unsigned short or unsigned int. Linux again says "bigger!"
   return sizeof(__WCHAR_TYPE__);
 // CHECK: ret i32 4
 }
 
-int check_wchar_unsigned() {
+int check_wchar_unsigned(void) {
   return (__WCHAR_TYPE__)-1 > (__WCHAR_TYPE__)0;
 // CHECK: ret i32 1
 }
@@ -84,7 +84,7 @@ enum Small {
   Item
 };
 
-int foo() {
+int foo(void) {
   return sizeof(enum Small);
 // CHECK: ret i32 4
 }

diff  --git a/clang/test/CodeGen/aarch64-varargs.c b/clang/test/CodeGen/aarch64-varargs.c
index a0903432c8fed..c43a5796f93da 100644
--- a/clang/test/CodeGen/aarch64-varargs.c
+++ b/clang/test/CodeGen/aarch64-varargs.c
@@ -240,7 +240,7 @@ struct hfa simple_hfa(void) {
 // non-aligned fundamental types.
 
 typedef int underaligned_int __attribute__((packed,aligned(2)));
-underaligned_int underaligned_int_test() {
+underaligned_int underaligned_int_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @underaligned_int_test()
   return va_arg(the_list, underaligned_int);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -277,7 +277,7 @@ underaligned_int underaligned_int_test() {
 }
 
 typedef int overaligned_int __attribute__((aligned(32)));
-overaligned_int overaligned_int_test() {
+overaligned_int overaligned_int_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @overaligned_int_test()
   return va_arg(the_list, overaligned_int);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -314,7 +314,7 @@ overaligned_int overaligned_int_test() {
 }
 
 typedef long long underaligned_long_long  __attribute__((packed,aligned(2)));
-underaligned_long_long underaligned_long_long_test() {
+underaligned_long_long underaligned_long_long_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @underaligned_long_long_test()
   return va_arg(the_list, underaligned_long_long);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -347,7 +347,7 @@ underaligned_long_long underaligned_long_long_test() {
 }
 
 typedef long long overaligned_long_long  __attribute__((aligned(32)));
-overaligned_long_long overaligned_long_long_test() {
+overaligned_long_long overaligned_long_long_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @overaligned_long_long_test()
   return va_arg(the_list, overaligned_long_long);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -380,7 +380,7 @@ overaligned_long_long overaligned_long_long_test() {
 }
 
 typedef __int128 underaligned_int128  __attribute__((packed,aligned(2)));
-underaligned_int128 underaligned_int128_test() {
+underaligned_int128 underaligned_int128_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @underaligned_int128_test()
   return va_arg(the_list, underaligned_int128);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -419,7 +419,7 @@ underaligned_int128 underaligned_int128_test() {
 }
 
 typedef __int128 overaligned_int128  __attribute__((aligned(32)));
-overaligned_int128 overaligned_int128_test() {
+overaligned_int128 overaligned_int128_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @overaligned_int128_test()
   return va_arg(the_list, overaligned_int128);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -472,7 +472,7 @@ overaligned_int128 overaligned_int128_test() {
 typedef struct __attribute__((packed,aligned(2))) {
   int val;
 } underaligned_int_struct;
-underaligned_int_struct underaligned_int_struct_test() {
+underaligned_int_struct underaligned_int_struct_test(void) {
 // CHECK-LE-LABEL: define{{.*}} i32 @underaligned_int_struct_test()
 // CHECK-BE-LABEL: define{{.*}} i64 @underaligned_int_struct_test()
   return va_arg(the_list, underaligned_int_struct);
@@ -506,7 +506,7 @@ underaligned_int_struct underaligned_int_struct_test() {
 typedef struct __attribute__((aligned(16))) {
   int val;
 } overaligned_int_struct;
-overaligned_int_struct overaligned_int_struct_test() {
+overaligned_int_struct overaligned_int_struct_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @overaligned_int_struct_test()
   return va_arg(the_list, overaligned_int_struct);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -539,7 +539,7 @@ overaligned_int_struct overaligned_int_struct_test() {
 typedef struct __attribute__((packed,aligned(2))) {
   long long val;
 } underaligned_long_long_struct;
-underaligned_long_long_struct underaligned_long_long_struct_test() {
+underaligned_long_long_struct underaligned_long_long_struct_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @underaligned_long_long_struct_test()
   return va_arg(the_list, underaligned_long_long_struct);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -572,7 +572,7 @@ underaligned_long_long_struct underaligned_long_long_struct_test() {
 typedef struct __attribute__((aligned(16))) {
   long long val;
 } overaligned_long_long_struct;
-overaligned_long_long_struct overaligned_long_long_struct_test() {
+overaligned_long_long_struct overaligned_long_long_struct_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @overaligned_long_long_struct_test()
   return va_arg(the_list, overaligned_long_long_struct);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -605,7 +605,7 @@ overaligned_long_long_struct overaligned_long_long_struct_test() {
 typedef struct __attribute__((packed,aligned(2))) {
   __int128 val;
 } underaligned_int128_struct;
-underaligned_int128_struct underaligned_int128_struct_test() {
+underaligned_int128_struct underaligned_int128_struct_test(void) {
 // CHECK-LABEL: define{{.*}} [2 x i64] @underaligned_int128_struct_test()
   return va_arg(the_list, underaligned_int128_struct);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -639,7 +639,7 @@ underaligned_int128_struct underaligned_int128_struct_test() {
 typedef struct __attribute__((aligned(32))) {
   __int128 val;
 } overaligned_int128_struct;
-overaligned_int128_struct overaligned_int128_struct_test() {
+overaligned_int128_struct overaligned_int128_struct_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_int128_struct_test(%struct.overaligned_int128_struct* noalias sret(%struct.overaligned_int128_struct) align 32 %agg.result)
   return va_arg(the_list, overaligned_int128_struct);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -675,7 +675,7 @@ overaligned_int128_struct overaligned_int128_struct_test() {
 typedef struct {
   int val __attribute__((packed,aligned(2)));
 } underaligned_int_struct_member;
-underaligned_int_struct_member underaligned_int_struct_member_test() {
+underaligned_int_struct_member underaligned_int_struct_member_test(void) {
 // CHECK-LE-LABEL: define{{.*}} i32 @underaligned_int_struct_member_test()
 // CHECK-BE-LABEL: define{{.*}} i64 @underaligned_int_struct_member_test()
   return va_arg(the_list, underaligned_int_struct_member);
@@ -709,7 +709,7 @@ underaligned_int_struct_member underaligned_int_struct_member_test() {
 typedef struct {
   int val __attribute__((aligned(16)));
 } overaligned_int_struct_member;
-overaligned_int_struct_member overaligned_int_struct_member_test() {
+overaligned_int_struct_member overaligned_int_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @overaligned_int_struct_member_test()
   return va_arg(the_list, overaligned_int_struct_member);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -748,7 +748,7 @@ overaligned_int_struct_member overaligned_int_struct_member_test() {
 typedef struct {
   long long val __attribute__((packed,aligned(2)));
 } underaligned_long_long_struct_member;
-underaligned_long_long_struct_member underaligned_long_long_struct_member_test() {
+underaligned_long_long_struct_member underaligned_long_long_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @underaligned_long_long_struct_member_test()
   return va_arg(the_list, underaligned_long_long_struct_member);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -781,7 +781,7 @@ underaligned_long_long_struct_member underaligned_long_long_struct_member_test()
 typedef struct {
   long long val __attribute__((aligned(16)));
 } overaligned_long_long_struct_member;
-overaligned_long_long_struct_member overaligned_long_long_struct_member_test() {
+overaligned_long_long_struct_member overaligned_long_long_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} i128 @overaligned_long_long_struct_member_test()
   return va_arg(the_list, overaligned_long_long_struct_member);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -820,7 +820,7 @@ overaligned_long_long_struct_member overaligned_long_long_struct_member_test() {
 typedef struct {
   __int128 val __attribute__((packed,aligned(2)));
 } underaligned_int128_struct_member;
-underaligned_int128_struct_member underaligned_int128_struct_member_test() {
+underaligned_int128_struct_member underaligned_int128_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} [2 x i64] @underaligned_int128_struct_member_test()
   return va_arg(the_list, underaligned_int128_struct_member);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)
@@ -854,7 +854,7 @@ underaligned_int128_struct_member underaligned_int128_struct_member_test() {
 typedef struct {
   __int128 val __attribute__((aligned(32)));
 } overaligned_int128_struct_member;
-overaligned_int128_struct_member overaligned_int128_struct_member_test() {
+overaligned_int128_struct_member overaligned_int128_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_int128_struct_member_test(%struct.overaligned_int128_struct_member* noalias sret(%struct.overaligned_int128_struct_member) align 32 %agg.result)
   return va_arg(the_list, overaligned_int128_struct_member);
 // CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32, i32* getelementptr inbounds (%"struct.std::__va_list", %"struct.std::__va_list"* @the_list, i32 0, i32 3)

diff  --git a/clang/test/CodeGen/address-space-avr.c b/clang/test/CodeGen/address-space-avr.c
index 0a37aff1cb857..8c1ebe7f27979 100644
--- a/clang/test/CodeGen/address-space-avr.c
+++ b/clang/test/CodeGen/address-space-avr.c
@@ -21,7 +21,7 @@ int i;
 
 void foo();
 
-void bar() {
+void bar(void) {
   static __flash const int var2[] = {555, 666, 777};
   static __flash3 const int f3var2[] = {5555, 6666, 7787};
   foo(var1[i]);

diff  --git a/clang/test/CodeGen/address-space.c b/clang/test/CodeGen/address-space.c
index f510a6d8449dc..d1578461c99b6 100644
--- a/clang/test/CodeGen/address-space.c
+++ b/clang/test/CodeGen/address-space.c
@@ -12,7 +12,7 @@ int a __attribute__((address_space(0)));
 
 // CHECK-LABEL: define{{.*}} i32 @test1()
 // CHECK: load i32, i32 addrspace(1)* @foo
-int test1() { return foo; }
+int test1(void) { return foo; }
 
 // CHECK-LABEL: define{{.*}} i32 @test2(i32 noundef %i)
 // CHECK: load i32, i32 addrspace(1)*
@@ -29,7 +29,7 @@ __attribute__((address_space(2))) int *A, *B;
 // X86: load i32 addrspace(2)*, i32 addrspace(2)** @A
 // AMDGCN: load i32 addrspace(2)*, i32 addrspace(2)** addrspacecast (i32 addrspace(2)* addrspace(1)* @A to i32 addrspace(2)**)
 // CHECK: store i32 {{.*}}, i32 addrspace(2)*
-void test3() {
+void test3(void) {
   *A = *B;
 }
 
@@ -61,7 +61,7 @@ void_ptr_arithmetic_test(void __attribute__((address_space(1))) *arg) {
 }
 
 // CHECK-LABEL: define{{.*}} i32* @test5(
-const unsigned *test5() {
+const unsigned *test5(void) {
   // Intentionally leave a part of an array uninitialized. This triggers a
   // 
diff erent code path contrary to a fully initialized array.
   // CHECK: ret i32* getelementptr inbounds ([256 x i32]

diff  --git a/clang/test/CodeGen/addrsig.c b/clang/test/CodeGen/addrsig.c
index d7141092bb354..b8b81b76df4d0 100644
--- a/clang/test/CodeGen/addrsig.c
+++ b/clang/test/CodeGen/addrsig.c
@@ -11,10 +11,10 @@
 
 extern const int g1[], g2[];
 
-const int *f1() {
+const int *f1(void) {
   return g1;
 }
 
-int f2() {
+int f2(void) {
   return g2[0];
 }

diff  --git a/clang/test/CodeGen/aggregate-assign-call.c b/clang/test/CodeGen/aggregate-assign-call.c
index d25fc39cfe754..4c0935897289a 100644
--- a/clang/test/CodeGen/aggregate-assign-call.c
+++ b/clang/test/CodeGen/aggregate-assign-call.c
@@ -15,7 +15,7 @@ struct S foo(void);
 
 // CHECK-LABEL: define dso_local void @bar
 __attribute__((optnone))
-struct S bar() {
+struct S bar(void) {
   // O0-NOT: @llvm.lifetime.start
   // O0-NOT: @llvm.lifetime.end
 

diff  --git a/clang/test/CodeGen/align-local.c b/clang/test/CodeGen/align-local.c
index c8b27a83c3ff7..9e8a56066e1a0 100644
--- a/clang/test/CodeGen/align-local.c
+++ b/clang/test/CodeGen/align-local.c
@@ -4,7 +4,7 @@ typedef struct __attribute((aligned(16))) {int x[4];} ff;
 
 // CHECK: alloca %struct.ff, align 16
 // CHECK: alloca %struct.anon, align 16
-int a() {
+int a(void) {
   ff a;
   struct {int x[4];} b __attribute((aligned(16)));
 }

diff  --git a/clang/test/CodeGen/align-loops.c b/clang/test/CodeGen/align-loops.c
index a42c8be818755..7744b4ab0f24e 100644
--- a/clang/test/CodeGen/align-loops.c
+++ b/clang/test/CodeGen/align-loops.c
@@ -8,8 +8,8 @@
 // CHECK_8:       .p2align 3, 0x90
 // CHECK_32:      .p2align 5, 0x90
 
-void bar();
-void foo() {
+void bar(void);
+void foo(void) {
   for (int i = 0; i < 64; ++i)
     bar();
 }

diff  --git a/clang/test/CodeGen/alignment.c b/clang/test/CodeGen/alignment.c
index dc7a57babfc74..1b2b244e5e73b 100644
--- a/clang/test/CodeGen/alignment.c
+++ b/clang/test/CodeGen/alignment.c
@@ -70,7 +70,7 @@ void test6(float4align64 *p) {
 // CHECK:       load <4 x float>, <4 x float>* {{.*}}, align 2
 
 typedef int __attribute__((ext_vector_type(200 * 16))) BigVecTy;
-void test7() {
+void test7(void) {
   BigVecTy V;
 }
 // CHECK-LABEL: @test7

diff  --git a/clang/test/CodeGen/alignof.c b/clang/test/CodeGen/alignof.c
index 64d0c08356870..b700ccd0d64a5 100644
--- a/clang/test/CodeGen/alignof.c
+++ b/clang/test/CodeGen/alignof.c
@@ -7,6 +7,6 @@ struct s0 {
 };
 
 struct s0 t1_tmp;
-int f0() {
+int f0(void) {
   return __alignof__(t1_tmp);
 }

diff  --git a/clang/test/CodeGen/alloc-size.c b/clang/test/CodeGen/alloc-size.c
index 242fa41cd2c08..0908a09cf8ccb 100644
--- a/clang/test/CodeGen/alloc-size.c
+++ b/clang/test/CodeGen/alloc-size.c
@@ -24,7 +24,7 @@ void *my_malloc(size_t) __attribute__((alloc_size(1)));
 void *my_calloc(size_t, size_t) __attribute__((alloc_size(1, 2)));
 
 // CHECK-LABEL: @test1
-void test1() {
+void test1(void) {
   void *const vp = my_malloc(100);
   // CHECK: store i32 100
   gi = OBJECT_SIZE_BUILTIN(vp, 0);
@@ -82,7 +82,7 @@ void test1() {
 }
 
 // CHECK-LABEL: @test2
-void test2() {
+void test2(void) {
   void *const vp = my_malloc(gi);
   // CHECK: @llvm.objectsize
   gi = OBJECT_SIZE_BUILTIN(vp, 0);
@@ -97,7 +97,7 @@ void test2() {
 }
 
 // CHECK-LABEL: @test3
-void test3() {
+void test3(void) {
   char *const buf = (char *)my_calloc(100, 5);
   // CHECK: store i32 500
   gi = OBJECT_SIZE_BUILTIN(buf, 0);
@@ -117,7 +117,7 @@ struct Data {
 };
 
 // CHECK-LABEL: @test5
-void test5() {
+void test5(void) {
   struct Data *const data = my_malloc(sizeof(*data));
   // CHECK: store i32 48
   gi = OBJECT_SIZE_BUILTIN(data, 0);
@@ -158,7 +158,7 @@ void test5() {
 }
 
 // CHECK-LABEL: @test6
-void test6() {
+void test6(void) {
   // Things that would normally trigger conservative estimates don't need to do
   // so when we know the source of the allocation.
   struct Data *const data = my_malloc(sizeof(*data) + 10);
@@ -222,7 +222,7 @@ void test6() {
 }
 
 // CHECK-LABEL: @test7
-void test7() {
+void test7(void) {
   struct Data *const data = my_malloc(sizeof(*data) + 5);
   // CHECK: store i32 9
   gi = OBJECT_SIZE_BUILTIN(data->pad, 0);
@@ -235,7 +235,7 @@ void test7() {
 }
 
 // CHECK-LABEL: @test8
-void test8() {
+void test8(void) {
   // Non-const pointers aren't currently supported.
   void *buf = my_calloc(100, 5);
   // CHECK: @llvm.objectsize.i64.p0i8(i8* %{{.*}}, i1 false, i1 true, i1
@@ -249,7 +249,7 @@ void test8() {
 }
 
 // CHECK-LABEL: @test9
-void test9() {
+void test9(void) {
   // Check to be sure that we unwrap things correctly.
   short *const buf0 = (my_malloc(100));
   short *const buf1 = (short*)(my_malloc(100));
@@ -264,7 +264,7 @@ void test9() {
 }
 
 // CHECK-LABEL: @test10
-void test10() {
+void test10(void) {
   // Yay overflow
   short *const arr = my_calloc((size_t)-1 / 2 + 1, 2);
   // CHECK: @llvm.objectsize
@@ -304,7 +304,7 @@ void *my_tiny_malloc(char) __attribute__((alloc_size(1)));
 void *my_tiny_calloc(char, char) __attribute__((alloc_size(1, 2)));
 
 // CHECK-LABEL: @test11
-void test11() {
+void test11(void) {
   void *const vp = my_tiny_malloc(100);
   // CHECK: store i32 100
   gi = OBJECT_SIZE_BUILTIN(vp, 0);
@@ -332,7 +332,7 @@ void *my_signed_malloc(long) __attribute__((alloc_size(1)));
 void *my_signed_calloc(long, long) __attribute__((alloc_size(1, 2)));
 
 // CHECK-LABEL: @test12
-void test12() {
+void test12(void) {
   // CHECK: store i32 100
   gi = OBJECT_SIZE_BUILTIN(my_signed_malloc(100), 0);
   // CHECK: store i32 500
@@ -361,7 +361,7 @@ void test12() {
 void *alloc_uchar(unsigned char) __attribute__((alloc_size(1)));
 
 // CHECK-LABEL: @test13
-void test13() {
+void test13(void) {
   // If 128 were incorrectly seen as negative, the result would become -1.
   // CHECK: store i32 128,
   gi = OBJECT_SIZE_BUILTIN(alloc_uchar(128), 0);
@@ -371,7 +371,7 @@ void *(*malloc_function_pointer)(int)__attribute__((alloc_size(1)));
 void *(*calloc_function_pointer)(int, int)__attribute__((alloc_size(1, 2)));
 
 // CHECK-LABEL: @test_fn_pointer
-void test_fn_pointer() {
+void test_fn_pointer(void) {
   void *const vp = malloc_function_pointer(100);
   // CHECK: store i32 100
   gi = __builtin_object_size(vp, 0);
@@ -434,7 +434,7 @@ extern my_malloc_function_pointer_type malloc_function_pointer_with_typedef;
 extern my_calloc_function_pointer_type calloc_function_pointer_with_typedef;
 
 // CHECK-LABEL: @test_fn_pointer_typedef
-void test_fn_pointer_typedef() {
+void test_fn_pointer_typedef(void) {
   malloc_function_pointer_with_typedef(100);
   void *const vp = malloc_function_pointer_with_typedef(100);
   // CHECK: store i32 100

diff  --git a/clang/test/CodeGen/always-inline.c b/clang/test/CodeGen/always-inline.c
index c9fd1ae2d80d8..62a1089b9f28b 100644
--- a/clang/test/CodeGen/always-inline.c
+++ b/clang/test/CodeGen/always-inline.c
@@ -3,13 +3,13 @@
 
 // CHECK-NOT: foo
 
-void bar() {
+void bar(void) {
 }
 
-inline void __attribute__((__always_inline__)) foo() {
+inline void __attribute__((__always_inline__)) foo(void) {
   bar();
 }
 
-void i_want_bar() {
+void i_want_bar(void) {
   foo();
 }

diff  --git a/clang/test/CodeGen/arc/arguments.c b/clang/test/CodeGen/arc/arguments.c
index 9564f96d083be..da897cc1ba4a1 100644
--- a/clang/test/CodeGen/arc/arguments.c
+++ b/clang/test/CodeGen/arc/arguments.c
@@ -23,7 +23,7 @@ typedef struct {
   int cc;
 } s2;
 // CHECK: define{{.*}} void @f2(%struct.s2* noalias sret(%struct.s2) align 4 %agg.result)
-s2 f2() {
+s2 f2(void) {
   s2 foo;
   return foo;
 }
@@ -33,7 +33,7 @@ typedef struct {
   int dd;
 } s3;
 // CHECK: define{{.*}} void @f3(%struct.s3* noalias sret(%struct.s3) align 4 %agg.result)
-s3 f3() {
+s3 f3(void) {
   s3 foo;
   return foo;
 }

diff  --git a/clang/test/CodeGen/arc/struct-align.c b/clang/test/CodeGen/arc/struct-align.c
index 7c167572ca150..e509a49759427 100644
--- a/clang/test/CodeGen/arc/struct-align.c
+++ b/clang/test/CodeGen/arc/struct-align.c
@@ -10,7 +10,7 @@ typedef struct {
 
 // CHECK: define{{.*}} i32 @f1
 // CHECK: ret i32 12
-int f1() {
+int f1(void) {
   return sizeof(s1);
 }
 
@@ -20,7 +20,7 @@ typedef struct {
 } s2;
 // CHECK: define{{.*}} i32 @f2
 // CHECK: ret i32 12
-int f2() {
+int f2(void) {
   return sizeof(s2);
 }
 

diff  --git a/clang/test/CodeGen/arm-be-result-return.c b/clang/test/CodeGen/arm-be-result-return.c
index aadc4e18845d5..5796cb74a8e85 100644
--- a/clang/test/CodeGen/arm-be-result-return.c
+++ b/clang/test/CodeGen/arm-be-result-return.c
@@ -6,13 +6,13 @@
 // word-aligned address and then loaded into r0 with an LDR instruction
 
 extern union Us { short s; } us;
-union Us callee_us() { return us; }
+union Us callee_us(void) { return us; }
 // CHECK-LABEL: callee_us()
 // CHECK: zext i16
 // CHECK: shl 
 // CHECK: ret i32
 
-void caller_us() {
+void caller_us(void) {
   us = callee_us();
 // CHECK-LABEL: caller_us()
 // CHECK: call i32
@@ -21,13 +21,13 @@ void caller_us() {
 }
 
 extern struct Ss { short s; } ss;
-struct Ss callee_ss() { return ss; }
+struct Ss callee_ss(void) { return ss; }
 // CHECK-LABEL: callee_ss()
 // CHECK: zext i16
 // CHECK: shl 
 // CHECK: ret i32
 
-void caller_ss() {
+void caller_ss(void) {
   ss = callee_ss();
 // CHECK-LABEL: caller_ss()
 // CHECK: call i32

diff  --git a/clang/test/CodeGen/arm-bitfield-alignment.c b/clang/test/CodeGen/arm-bitfield-alignment.c
index 1c453b2e2d6ab..ae4bc2cdb906e 100644
--- a/clang/test/CodeGen/arm-bitfield-alignment.c
+++ b/clang/test/CodeGen/arm-bitfield-alignment.c
@@ -7,7 +7,7 @@ extern struct T {
   int b2 : 1;
 } g;
 
-int func() {
+int func(void) {
   return g.b1;
 }
 

diff  --git a/clang/test/CodeGen/arm-cmse-attr.c b/clang/test/CodeGen/arm-cmse-attr.c
index 5176e56085224..10bb862cad894 100644
--- a/clang/test/CodeGen/arm-cmse-attr.c
+++ b/clang/test/CodeGen/arm-cmse-attr.c
@@ -20,12 +20,12 @@ void f2(callback2_t *fptr)
     fptr();
 }
 
-void f3() __attribute__((cmse_nonsecure_entry));
-void f3()
+void f3(void) __attribute__((cmse_nonsecure_entry));
+void f3(void)
 {
 }
 
-void f4() __attribute__((cmse_nonsecure_entry))
+void f4(void) __attribute__((cmse_nonsecure_entry))
 {
 }
 

diff  --git a/clang/test/CodeGen/arm-fp16-arguments.c b/clang/test/CodeGen/arm-fp16-arguments.c
index c511861ece633..f8a775b2dc962 100644
--- a/clang/test/CodeGen/arm-fp16-arguments.c
+++ b/clang/test/CodeGen/arm-fp16-arguments.c
@@ -10,7 +10,7 @@ void t1(__fp16 a) { g = a; }
 // NATIVE: define{{.*}} void @t1(half noundef [[PARAM:%.*]])
 // CHECK: store half [[PARAM]], half* @g
 
-__fp16 t2() { return g; }
+__fp16 t2(void) { return g; }
 // SOFT: define{{.*}} half @t2()
 // HARD: define{{.*}} arm_aapcs_vfpcc half @t2()
 // NATIVE: define{{.*}} half @t2()
@@ -25,7 +25,7 @@ void t3(_Float16 a) { h = a; }
 // NATIVE: define{{.*}} void @t3(half noundef [[PARAM:%.*]])
 // CHECK: store half [[PARAM]], half* @h
 
-_Float16 t4() { return h; }
+_Float16 t4(void) { return h; }
 // SOFT: define{{.*}} half @t4()
 // HARD: define{{.*}} arm_aapcs_vfpcc half @t4()
 // NATIVE: define{{.*}} half @t4()

diff  --git a/clang/test/CodeGen/arm-interrupt-attr.c b/clang/test/CodeGen/arm-interrupt-attr.c
index 2aa8dee06f08a..7adf11e817c8e 100644
--- a/clang/test/CodeGen/arm-interrupt-attr.c
+++ b/clang/test/CodeGen/arm-interrupt-attr.c
@@ -1,30 +1,30 @@
 // RUN: %clang_cc1 -triple thumb-apple-darwin -target-abi aapcs -target-cpu cortex-m3 -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -triple arm-apple-darwin -target-abi apcs-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-APCS
 
-__attribute__((interrupt)) void test_generic_interrupt() {
+__attribute__((interrupt)) void test_generic_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
 
   // CHECK-APCS: define{{.*}} void @test_generic_interrupt() [[GENERIC_ATTR:#[0-9]+]]
 }
 
-__attribute__((interrupt("IRQ"))) void test_irq_interrupt() {
+__attribute__((interrupt("IRQ"))) void test_irq_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_irq_interrupt() [[IRQ_ATTR:#[0-9]+]]
 }
 
-__attribute__((interrupt("FIQ"))) void test_fiq_interrupt() {
+__attribute__((interrupt("FIQ"))) void test_fiq_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_fiq_interrupt() [[FIQ_ATTR:#[0-9]+]]
 }
 
-__attribute__((interrupt("SWI"))) void test_swi_interrupt() {
+__attribute__((interrupt("SWI"))) void test_swi_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_swi_interrupt() [[SWI_ATTR:#[0-9]+]]
 }
 
-__attribute__((interrupt("ABORT"))) void test_abort_interrupt() {
+__attribute__((interrupt("ABORT"))) void test_abort_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_abort_interrupt() [[ABORT_ATTR:#[0-9]+]]
 }
 
 
-__attribute__((interrupt("UNDEF"))) void test_undef_interrupt() {
+__attribute__((interrupt("UNDEF"))) void test_undef_interrupt(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test_undef_interrupt() [[UNDEF_ATTR:#[0-9]+]]
 }
 

diff  --git a/clang/test/CodeGen/arm-sve-vector-bits-vscale-range.c b/clang/test/CodeGen/arm-sve-vector-bits-vscale-range.c
index 5f17800cb3470..3ee819ac15786 100644
--- a/clang/test/CodeGen/arm-sve-vector-bits-vscale-range.c
+++ b/clang/test/CodeGen/arm-sve-vector-bits-vscale-range.c
@@ -19,4 +19,4 @@
 // CHECK-NOMAX: attributes #0 = { {{.*}} vscale_range([[#VBITS]],0) {{.*}} }
 // CHECK-UNBOUNDED: attributes #0 = { {{.*}} vscale_range(1,0) {{.*}} }
 // CHECK-NONE: attributes #0 = { {{.*}} vscale_range(1,16) {{.*}} }
-void func() {}
+void func(void) {}

diff  --git a/clang/test/CodeGen/arm-swiftcall.c b/clang/test/CodeGen/arm-swiftcall.c
index 22806ea6f35a4..1deb8476dc73c 100644
--- a/clang/test/CodeGen/arm-swiftcall.c
+++ b/clang/test/CodeGen/arm-swiftcall.c
@@ -43,7 +43,7 @@ SWIFTCALL void context_error_1(CONTEXT int *self, ERROR float **error) {}
 // CHECK:       store float* [[T0]], float** [[TEMP]], align 4
 // CHECK:       [[T0:%.*]] = load float*, float** [[TEMP]], align 4
 // CHECK:       store float* [[T0]], float** [[ERRORARG]], align 4
-void test_context_error_1() {
+void test_context_error_1(void) {
   int x;
   float *error;
   context_error_1(&x, &error);
@@ -85,7 +85,7 @@ typedef long long long2 __attribute__((ext_vector_type(2)));
   }                                      \
   SWIFTCALL void take_##TYPE(TYPE v) {   \
   }                                      \
-  void test_##TYPE() {                   \
+  void test_##TYPE(void) {                   \
     take_##TYPE(return_##TYPE());        \
   }
 

diff  --git a/clang/test/CodeGen/arm-target-attr.c b/clang/test/CodeGen/arm-target-attr.c
index dbfeec550a056..1a9a3428aa997 100644
--- a/clang/test/CodeGen/arm-target-attr.c
+++ b/clang/test/CodeGen/arm-target-attr.c
@@ -3,12 +3,12 @@
 // RUN: %clang_cc1 -triple arm-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKPOS %s
 // RUN: %clang_cc1 -triple arm-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKNEG %s
 
-__attribute__((target("arm"))) void test_target_arm() {
+__attribute__((target("arm"))) void test_target_arm(void) {
   // CHECKPOS: define{{.*}} void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
   // CHECKNEG: define{{.*}} void @test_target_arm() [[ARM_ATTRS:#[0-9]+]]
 }
 
-__attribute__((target("thumb"))) void test_target_thumb() {
+__attribute__((target("thumb"))) void test_target_thumb(void) {
   // CHECKPOS: define{{.*}} void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
   // CHECKNEG: define{{.*}} void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]]
 }

diff  --git a/clang/test/CodeGen/arm-varargs.c b/clang/test/CodeGen/arm-varargs.c
index 5ebaabde46d66..8b446a3c04dc4 100644
--- a/clang/test/CodeGen/arm-varargs.c
+++ b/clang/test/CodeGen/arm-varargs.c
@@ -95,7 +95,7 @@ struct hfa simple_hfa(void) {
 // non-aligned fundamental types.
 
 typedef int underaligned_int __attribute__((packed,aligned(2)));
-underaligned_int underaligned_int_test() {
+underaligned_int underaligned_int_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @underaligned_int_test()
   return va_arg(the_list, underaligned_int);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -107,7 +107,7 @@ underaligned_int underaligned_int_test() {
 }
 
 typedef int overaligned_int __attribute__((aligned(32)));
-overaligned_int overaligned_int_test() {
+overaligned_int overaligned_int_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @overaligned_int_test()
   return va_arg(the_list, overaligned_int);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -119,7 +119,7 @@ overaligned_int overaligned_int_test() {
 }
 
 typedef long long underaligned_long_long  __attribute__((packed,aligned(2)));
-underaligned_long_long underaligned_long_long_test() {
+underaligned_long_long underaligned_long_long_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @underaligned_long_long_test()
   return va_arg(the_list, underaligned_long_long);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -135,7 +135,7 @@ underaligned_long_long underaligned_long_long_test() {
 }
 
 typedef long long overaligned_long_long  __attribute__((aligned(32)));
-overaligned_long_long overaligned_long_long_test() {
+overaligned_long_long overaligned_long_long_test(void) {
 // CHECK-LABEL: define{{.*}} i64 @overaligned_long_long_test()
   return va_arg(the_list, overaligned_long_long);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -165,7 +165,7 @@ overaligned_long_long overaligned_long_long_test() {
 typedef struct __attribute__((packed,aligned(2))) {
   int val;
 } underaligned_int_struct;
-underaligned_int_struct underaligned_int_struct_test() {
+underaligned_int_struct underaligned_int_struct_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @underaligned_int_struct_test()
   return va_arg(the_list, underaligned_int_struct);
 // CHECK: [[RETVAL:%[a-z0-9._]+]] = alloca %struct.underaligned_int_struct, align 2
@@ -184,7 +184,7 @@ underaligned_int_struct underaligned_int_struct_test() {
 typedef struct __attribute__((aligned(16))) {
   int val;
 } overaligned_int_struct;
-overaligned_int_struct overaligned_int_struct_test() {
+overaligned_int_struct overaligned_int_struct_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_int_struct_test(%struct.overaligned_int_struct* noalias sret(%struct.overaligned_int_struct) align 16 %agg.result)
   return va_arg(the_list, overaligned_int_struct);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -200,7 +200,7 @@ overaligned_int_struct overaligned_int_struct_test() {
 typedef struct __attribute__((packed,aligned(2))) {
   long long val;
 } underaligned_long_long_struct;
-underaligned_long_long_struct underaligned_long_long_struct_test() {
+underaligned_long_long_struct underaligned_long_long_struct_test(void) {
 // CHECK-LABEL: define{{.*}} void @underaligned_long_long_struct_test(%struct.underaligned_long_long_struct* noalias sret(%struct.underaligned_long_long_struct) align 2 %agg.result)
   return va_arg(the_list, underaligned_long_long_struct);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -216,7 +216,7 @@ underaligned_long_long_struct underaligned_long_long_struct_test() {
 typedef struct __attribute__((aligned(16))) {
   long long val;
 } overaligned_long_long_struct;
-overaligned_long_long_struct overaligned_long_long_struct_test() {
+overaligned_long_long_struct overaligned_long_long_struct_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_long_long_struct_test(%struct.overaligned_long_long_struct* noalias sret(%struct.overaligned_long_long_struct) align 16 %agg.result)
   return va_arg(the_list, overaligned_long_long_struct);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -239,7 +239,7 @@ overaligned_long_long_struct overaligned_long_long_struct_test() {
 typedef struct {
   int val __attribute__((packed,aligned(2)));
 } underaligned_int_struct_member;
-underaligned_int_struct_member underaligned_int_struct_member_test() {
+underaligned_int_struct_member underaligned_int_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} i32 @underaligned_int_struct_member_test()
   return va_arg(the_list, underaligned_int_struct_member);
 // CHECK: [[RETVAL:%[a-z0-9._]+]] = alloca %struct.underaligned_int_struct_member, align 2
@@ -258,7 +258,7 @@ underaligned_int_struct_member underaligned_int_struct_member_test() {
 typedef struct {
   int val __attribute__((aligned(16)));
 } overaligned_int_struct_member;
-overaligned_int_struct_member overaligned_int_struct_member_test() {
+overaligned_int_struct_member overaligned_int_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_int_struct_member_test(%struct.overaligned_int_struct_member* noalias sret(%struct.overaligned_int_struct_member) align 16 %agg.result)
   return va_arg(the_list, overaligned_int_struct_member);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -278,7 +278,7 @@ overaligned_int_struct_member overaligned_int_struct_member_test() {
 typedef struct {
   long long val __attribute__((packed,aligned(2)));
 } underaligned_long_long_struct_member;
-underaligned_long_long_struct_member underaligned_long_long_struct_member_test() {
+underaligned_long_long_struct_member underaligned_long_long_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} void @underaligned_long_long_struct_member_test(%struct.underaligned_long_long_struct_member* noalias sret(%struct.underaligned_long_long_struct_member) align 2 %agg.result)
   return va_arg(the_list, underaligned_long_long_struct_member);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4
@@ -294,7 +294,7 @@ underaligned_long_long_struct_member underaligned_long_long_struct_member_test()
 typedef struct {
   long long val __attribute__((aligned(16)));
 } overaligned_long_long_struct_member;
-overaligned_long_long_struct_member overaligned_long_long_struct_member_test() {
+overaligned_long_long_struct_member overaligned_long_long_struct_member_test(void) {
 // CHECK-LABEL: define{{.*}} void @overaligned_long_long_struct_member_test(%struct.overaligned_long_long_struct_member* noalias sret(%struct.overaligned_long_long_struct_member) align 16 %agg.result)
   return va_arg(the_list, overaligned_long_long_struct_member);
 // CHECK: [[CUR:%[a-z0-9._]+]] = load i8*, i8** getelementptr inbounds (%struct.__va_list, %struct.__va_list* @the_list, i32 0, i32 0), align 4

diff  --git a/clang/test/CodeGen/arm64-microsoft-intrinsics.c b/clang/test/CodeGen/arm64-microsoft-intrinsics.c
index 36f182433edd2..75b18e6ecdcf2 100644
--- a/clang/test/CodeGen/arm64-microsoft-intrinsics.c
+++ b/clang/test/CodeGen/arm64-microsoft-intrinsics.c
@@ -74,7 +74,7 @@ void check__sevl(void) {
 // CHECK-MSVC: @llvm.aarch64.hint(i32 5)
 // CHECK-LINUX: error: implicit declaration of function '__sevl'
 
-void check_ReadWriteBarrier() {
+void check_ReadWriteBarrier(void) {
   _ReadWriteBarrier();
 }
 
@@ -103,7 +103,7 @@ unsigned long long check_umulh(unsigned long long a, unsigned long long b) {
 // CHECK-MSVC: %[[RES:.*]] = trunc i128 %[[HIGH]] to i64
 // CHECK-LINUX: error: implicit declaration of function '__umulh'
 
-unsigned __int64 check__getReg() {
+unsigned __int64 check__getReg(void) {
   unsigned volatile __int64 reg;
   reg = __getReg(18);
   reg = __getReg(31);

diff  --git a/clang/test/CodeGen/array.c b/clang/test/CodeGen/array.c
index 0b401ea8190c2..91aa83394d20d 100644
--- a/clang/test/CodeGen/array.c
+++ b/clang/test/CodeGen/array.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -emit-llvm %s -o %t
 
-void f() {
+void f(void) {
  int a[2];
  a[0] = 0;
 }
 
-void f2() {
+void f2(void) {
   int x = 0;
   int y = 1;
   int a[10] = { y, x, 2, 3};

diff  --git a/clang/test/CodeGen/artificial.c b/clang/test/CodeGen/artificial.c
index 5db6a67194544..5c433c89f0306 100644
--- a/clang/test/CodeGen/artificial.c
+++ b/clang/test/CodeGen/artificial.c
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 
-extern void foo();
+extern void foo(void);
 // CHECK: !DISubprogram(name: "foo"
 // CHECK-SAME: flags: DIFlagArtificial
-inline void __attribute__((artificial)) foo() {}
+inline void __attribute__((artificial)) foo(void) {}
 
-void baz() {
+void baz(void) {
   foo();
 }

diff  --git a/clang/test/CodeGen/asan-strings.c b/clang/test/CodeGen/asan-strings.c
index fc9c31bcd8a25..0c7420034f89e 100644
--- a/clang/test/CodeGen/asan-strings.c
+++ b/clang/test/CodeGen/asan-strings.c
@@ -8,7 +8,7 @@
 // knows how to make the metadata comdat associative, so the string literal
 // global is only registered if the instrumented global prevails during linking.
 
-const char *foo() { return "asdf"; }
+const char *foo(void) { return "asdf"; }
 
 // LINUX: @.str = private unnamed_addr constant [5 x i8] c"asdf\00", align 1
 

diff  --git a/clang/test/CodeGen/asm-call-func.c b/clang/test/CodeGen/asm-call-func.c
index 851dcc093e76e..7cb5b88173840 100644
--- a/clang/test/CodeGen/asm-call-func.c
+++ b/clang/test/CodeGen/asm-call-func.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu| FileCheck %s
 
 void callee(void);
-void caller() {
+void caller(void) {
   //CHECK: call void asm sideeffect "rcall $0", "n,~{dirflag},~{fpsr},~{flags}"(void ()* @callee)
   asm("rcall %0" ::"n"(callee));
 }

diff  --git a/clang/test/CodeGen/asm-inout.c b/clang/test/CodeGen/asm-inout.c
index 68bdfe7f956f3..3defd5b015994 100644
--- a/clang/test/CodeGen/asm-inout.c
+++ b/clang/test/CodeGen/asm-inout.c
@@ -3,14 +3,14 @@
 int *foo(void);
 
 // CHECK: @test1
-void test1() {
+void test1(void) {
   // CHECK: [[REGCALLRESULT:%[a-zA-Z0-9\.]+]] = call i32* @foo()
   // CHECK: call void asm "foobar", "=*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) [[REGCALLRESULT]], i32* elementtype(i32) [[REGCALLRESULT]])
   asm ("foobar" : "+m"(*foo()));
 }
 
 // CHECK: @test2
-void test2() {
+void test2(void) {
   // CHECK: [[REGCALLRESULT:%[a-zA-Z0-9\.]+]] = call i32* @foo()
   // CHECK: load i32, i32* [[REGCALLRESULT]]
   // CHECK: call i32 asm

diff  --git a/clang/test/CodeGen/asm-reg-var-local.c b/clang/test/CodeGen/asm-reg-var-local.c
index 19c61ab85c9a4..a4d87ee2ca7a3 100644
--- a/clang/test/CodeGen/asm-reg-var-local.c
+++ b/clang/test/CodeGen/asm-reg-var-local.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
 // Exercise various use cases for local asm "register variables".
 
-int foo() {
+int foo(void) {
 // CHECK-LABEL: define{{.*}} i32 @foo()
 // CHECK: [[A:%[a-zA-Z0-9]+]] = alloca i32
 
@@ -24,7 +24,7 @@ int foo() {
 // CHECK:  ret i32 [[TMP1]]
 }
 
-int earlyclobber() {
+int earlyclobber(void) {
 // CHECK-LABEL: define{{.*}} i32 @earlyclobber()
 // CHECK: [[A:%[a-zA-Z0-9]+]] = alloca i32
 

diff  --git a/clang/test/CodeGen/asm-variable.c b/clang/test/CodeGen/asm-variable.c
index dc087bd9e211e..144e5f3551717 100644
--- a/clang/test/CodeGen/asm-variable.c
+++ b/clang/test/CodeGen/asm-variable.c
@@ -59,7 +59,7 @@ unsigned long long foo2(unsigned long long addr, double a0,
 // CHECK: call i64 asm "call *$1", "={rax},r,{xmm0},{xmm1},{xmm2},{xmm3},{xmm4},{xmm5},{xmm6},{xmm7},~{dirflag},~{fpsr},~{flags}
 
 int randomvar asm("randomvar");
-void foo3() {
+void foo3(void) {
   asm("vartest %0" : : "r"(randomvar));
 }
 // CHECK: call void asm sideeffect "vartest $0", "r,~{dirflag},~{fpsr},~{flags}"

diff  --git a/clang/test/CodeGen/asm.c b/clang/test/CodeGen/asm.c
index 4df959c425ab6..2df2d35ac6fba 100644
--- a/clang/test/CodeGen/asm.c
+++ b/clang/test/CodeGen/asm.c
@@ -20,7 +20,7 @@ void t3(unsigned char *src, unsigned long long temp) {
   __asm__ volatile("" : "+m"(temp), "+r"(src));
 }
 
-void t4() {
+void t4(void) {
   unsigned long long a;
   struct reg { unsigned long long a, b; } b;
 
@@ -43,7 +43,7 @@ void t7(int a) {
   // CHECK: T7 NAMED: $1
 }
 
-void t8() {
+void t8(void) {
   __asm__ volatile("T8 NAMED MODIFIER: %c[input]" :: [input] "i" (4));
   // CHECK: @t8()
   // CHECK: T8 NAMED MODIFIER: ${0:c}
@@ -110,7 +110,7 @@ void t14(struct S *P) {
 }
 
 // PR4938
-int t16() {
+int t16(void) {
   int a,b;
   asm ( "nop;"
        :"=%c" (a)
@@ -120,7 +120,7 @@ int t16() {
 }
 
 // PR6475
-void t17() {
+void t17(void) {
   int i;
   __asm__ ( "nop": "=m"(i));
 

diff  --git a/clang/test/CodeGen/asm_64.c b/clang/test/CodeGen/asm_64.c
index 72610e191c5fc..badac126d83e6 100644
--- a/clang/test/CodeGen/asm_64.c
+++ b/clang/test/CodeGen/asm_64.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
 // CHECK-LABEL: @t1
-void t1() {
+void t1(void) {
   __asm__ ("mov r8w, 100;");
   // CHECK: call void asm sideeffect "mov r8w, 100;"
   __asm__ ("mov r8d, 100;");

diff  --git a/clang/test/CodeGen/asm_arm64.c b/clang/test/CodeGen/asm_arm64.c
index 0eaa347a85176..d48b32f155278 100644
--- a/clang/test/CodeGen/asm_arm64.c
+++ b/clang/test/CodeGen/asm_arm64.c
@@ -2,21 +2,21 @@
 
 // rdar://9167275
 
-int t1()
+int t1(void)
 {
   int x;
   __asm__("mov %0, 7" : "=r" (x));
   return x;
 }
 
-long t2()
+long t2(void)
 {
   long x;
   __asm__("mov %0, 7" : "=r" (x));
   return x;
 }
 
-long t3()
+long t3(void)
 {
   long x;
   __asm__("mov %w0, 7" : "=r" (x));

diff  --git a/clang/test/CodeGen/assign.c b/clang/test/CodeGen/assign.c
index fc5caafbe2091..08fa6fbf449fa 100644
--- a/clang/test/CodeGen/assign.c
+++ b/clang/test/CodeGen/assign.c
@@ -9,7 +9,7 @@
 // CHECK-NEXT: store i32 1, i32* [[x_0]]
 // CHECK-NEXT: store i32 1, i32* [[y_0]]
 // CHECK: }
-void f0() {
+void f0(void) {
   int x, y;
   x = 1;
   y = (x = 1);
@@ -25,7 +25,7 @@ void f0() {
 // CHECK-NEXT: store volatile i32 1, i32* [[x_1]]
 // CHECK-NEXT: store volatile i32 1, i32* [[y_1]]
 // CHECK: }
-void f1() {
+void f1(void) {
   volatile int x, y;
   x = 1;
   y = (x = 1);

diff  --git a/clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c b/clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
index a5f3a94022831..1d8d6f5150eea 100644
--- a/clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
+++ b/clang/test/CodeGen/assume-aligned-and-alloc-align-attributes.c
@@ -8,7 +8,7 @@ void *my_aligned_alloc(int size, int alignment) __attribute__((assume_aligned(32
 // CHECK-NEXT:    [[CALL:%.*]] = call align 32 i8* @my_aligned_alloc(i32 noundef 320, i32 noundef 16)
 // CHECK-NEXT:    ret i8* [[CALL]]
 //
-void *t0_immediate0() {
+void *t0_immediate0(void) {
   return my_aligned_alloc(320, 16);
 };
 
@@ -17,7 +17,7 @@ void *t0_immediate0() {
 // CHECK-NEXT:    [[CALL:%.*]] = call align 32 i8* @my_aligned_alloc(i32 noundef 320, i32 noundef 32)
 // CHECK-NEXT:    ret i8* [[CALL]]
 //
-void *t1_immediate1() {
+void *t1_immediate1(void) {
   return my_aligned_alloc(320, 32);
 };
 
@@ -26,7 +26,7 @@ void *t1_immediate1() {
 // CHECK-NEXT:    [[CALL:%.*]] = call align 64 i8* @my_aligned_alloc(i32 noundef 320, i32 noundef 64)
 // CHECK-NEXT:    ret i8* [[CALL]]
 //
-void *t2_immediate2() {
+void *t2_immediate2(void) {
   return my_aligned_alloc(320, 64);
 };
 

diff  --git a/clang/test/CodeGen/atomic-arm64.c b/clang/test/CodeGen/atomic-arm64.c
index 2d5a2fbe9d365..3efdeb5d60aef 100644
--- a/clang/test/CodeGen/atomic-arm64.c
+++ b/clang/test/CodeGen/atomic-arm64.c
@@ -26,7 +26,7 @@ extern _Atomic(pointer_quad_t) a_pointer_quad;
 // CHECK-NEXT: store i8 1, i8* [[TEMP]]
 // CHECK-NEXT: [[T0:%.*]] = load i8, i8* [[TEMP]], align 1
 // CHECK-NEXT: store atomic i8 [[T0]], i8* @a_bool seq_cst, align 1
-void test0() {
+void test0(void) {
   __c11_atomic_store(&a_bool, 1, memory_order_seq_cst);
 }
 
@@ -36,7 +36,7 @@ void test0() {
 // CHECK-NEXT: [[T0:%.*]] = bitcast float* [[TEMP]] to i32*
 // CHECK-NEXT: [[T1:%.*]] = load i32, i32* [[T0]], align 4
 // CHECK-NEXT: store atomic i32 [[T1]], i32* bitcast (float* @a_float to i32*) seq_cst, align 4
-void test1() {
+void test1(void) {
   __c11_atomic_store(&a_float, 3, memory_order_seq_cst);
 }
 
@@ -46,7 +46,7 @@ void test1() {
 // CHECK-NEXT: [[T0:%.*]] = bitcast i8** [[TEMP]] to i64*
 // CHECK-NEXT: [[T1:%.*]] = load i64, i64* [[T0]], align 8
 // CHECK-NEXT: store atomic i64 [[T1]], i64* bitcast (i8** @a_pointer to i64*) seq_cst, align 8
-void test2() {
+void test2(void) {
   __c11_atomic_store(&a_pointer, &a_bool, memory_order_seq_cst);
 }
 

diff  --git a/clang/test/CodeGen/atomic-ops.c b/clang/test/CodeGen/atomic-ops.c
index c7cec67e81b47..59b66e020ac45 100644
--- a/clang/test/CodeGen/atomic-ops.c
+++ b/clang/test/CodeGen/atomic-ops.c
@@ -320,7 +320,7 @@ _Bool fsb(_Bool *c) {
 
 char flag1;
 volatile char flag2;
-void test_and_set() {
+void test_and_set(void) {
   // CHECK: atomicrmw xchg i8* @flag1, i8 1 seq_cst, align 1
   __atomic_test_and_set(&flag1, memory_order_seq_cst);
   // CHECK: atomicrmw volatile xchg i8* @flag2, i8 1 acquire, align 1
@@ -388,7 +388,7 @@ struct bar smallThing, thing1, thing2;
 struct foo bigThing;
 _Atomic(struct foo) bigAtomic;
 
-void structAtomicStore() {
+void structAtomicStore(void) {
   // CHECK-LABEL: @structAtomicStore
   struct foo f = {0};
   struct bar b = {0};
@@ -398,7 +398,7 @@ void structAtomicStore() {
   __atomic_store(&bigThing, &f, 5);
   // CHECK: call void @__atomic_store(i32 noundef 512, i8* noundef {{.*}} @bigThing
 }
-void structAtomicLoad() {
+void structAtomicLoad(void) {
   // CHECK-LABEL: @structAtomicLoad
   struct bar b;
   __atomic_load(&smallThing, &b, 5);
@@ -408,7 +408,7 @@ void structAtomicLoad() {
   __atomic_load(&bigThing, &f, 5);
   // CHECK: call void @__atomic_load(i32 noundef 512, i8* noundef {{.*}} @bigThing
 }
-struct foo structAtomicExchange() {
+struct foo structAtomicExchange(void) {
   // CHECK-LABEL: @structAtomicExchange
   struct foo f = {0};
   struct foo old;
@@ -418,7 +418,7 @@ struct foo structAtomicExchange() {
   return __c11_atomic_exchange(&bigAtomic, f, 5);
   // CHECK: call void @__atomic_exchange(i32 noundef 512, i8* noundef bitcast ({{.*}} @bigAtomic to i8*),
 }
-int structAtomicCmpExchange() {
+int structAtomicCmpExchange(void) {
   // CHECK-LABEL: @structAtomicCmpExchange
   // CHECK: %[[x_mem:.*]] = alloca i8
   _Bool x = __atomic_compare_exchange(&smallThing, &thing1, &thing2, 1, 5, 5);
@@ -444,7 +444,7 @@ int structAtomicCmpExchange() {
 _Atomic(int) atomic_init_i = 42;
 
 // CHECK-LABEL: @atomic_init_foo
-void atomic_init_foo()
+void atomic_init_foo(void)
 {
   // CHECK-NOT: }
   // CHECK-NOT: atomic
@@ -651,7 +651,7 @@ void EMIT_ALL_THE_THINGS(int *ptr, int *ptr2, int new, _Bool weak, int success,
   // CHECK: = cmpxchg weak {{.*}} seq_cst seq_cst, align
 }
 
-int PR21643() {
+int PR21643(void) {
   return __atomic_or_fetch((int __attribute__((address_space(257))) *)0x308, 1,
                            __ATOMIC_RELAXED);
   // CHECK: %[[atomictmp:.*]] = alloca i32, align 4
@@ -698,7 +698,7 @@ int PR17306_2(volatile int *i, int value) {
   return __atomic_add_fetch(i, value, memory_order_seq_cst);
 }
 
-void test_underaligned() {
+void test_underaligned(void) {
   // CHECK-LABEL: @test_underaligned
   struct Underaligned { char c[8]; } underaligned_a, underaligned_b, underaligned_c;
 

diff  --git a/clang/test/CodeGen/atomic_ops.c b/clang/test/CodeGen/atomic_ops.c
index 6e1982688b90b..cff775dcd782a 100644
--- a/clang/test/CodeGen/atomic_ops.c
+++ b/clang/test/CodeGen/atomic_ops.c
@@ -31,7 +31,7 @@ void foo(int x)
 
 extern _Atomic _Bool b;
 
-_Bool bar() {
+_Bool bar(void) {
 // NATIVE-LABEL: @bar
 // NATIVE: %[[load:.*]] = load atomic i8, i8* @b seq_cst, align 1
 // NATIVE: %[[tobool:.*]] = trunc i8 %[[load]] to i1

diff  --git a/clang/test/CodeGen/attr-availability.c b/clang/test/CodeGen/attr-availability.c
index 87e137cfe965e..226c82f63aec3 100644
--- a/clang/test/CodeGen/attr-availability.c
+++ b/clang/test/CodeGen/attr-availability.c
@@ -5,26 +5,26 @@
 // CHECK-10_4-LABEL: define hidden void @f2
 // CHECK-10_5-LABEL: define hidden void @f2
 // CHECK-10_6-LABEL: define hidden void @f2
-void f2();
-void f2() { }
+void f2(void);
+void f2(void) { }
 
 // CHECK-10_4-LABEL: define hidden void @f3
 // CHECK-10_5-LABEL: define hidden void @f3
 // CHECK-10_6-LABEL: define hidden void @f3
-void f3() __attribute__((availability(macosx,introduced=10.5)));
-void f3() { }
+void f3(void) __attribute__((availability(macosx,introduced=10.5)));
+void f3(void) { }
 
 // CHECK-10_4: declare extern_weak void @f0
 // CHECK-10_5: declare void @f0
 // CHECK-10_6: declare void @f0
-void f0() __attribute__((availability(macosx,introduced=10.5)));
+void f0(void) __attribute__((availability(macosx,introduced=10.5)));
 
 // CHECK-10_4: declare extern_weak void @f1
 // CHECK-10_5: declare extern_weak void @f1
 // CHECK-10_6: declare void @f1
-void f1() __attribute__((availability(macosx,introduced=10.6)));
+void f1(void) __attribute__((availability(macosx,introduced=10.6)));
 
-void test() {
+void test(void) {
   f0();
   f1();
   f2();

diff  --git a/clang/test/CodeGen/attr-cleanup.c b/clang/test/CodeGen/attr-cleanup.c
index 7c2053d7ac356..b80e5d3103570 100644
--- a/clang/test/CodeGen/attr-cleanup.c
+++ b/clang/test/CodeGen/attr-cleanup.c
@@ -2,7 +2,7 @@
 
 // <rdar://problem/6827047>
 void f(void* arg);
-void g() {
+void g(void) {
   __attribute__((cleanup(f))) void *g;
 }
 

diff  --git a/clang/test/CodeGen/attr-coldhot.c b/clang/test/CodeGen/attr-coldhot.c
index 24e1feb77b4e9..aa8c1dd1f972c 100644
--- a/clang/test/CodeGen/attr-coldhot.c
+++ b/clang/test/CodeGen/attr-coldhot.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s -check-prefixes=CHECK,O0
 // RUN: %clang_cc1 -emit-llvm %s -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefixes=CHECK,O1
 
-int test1() __attribute__((__cold__)) {
+int test1(void) __attribute__((__cold__)) {
   return 42;
 
 // Check that we set the optsize attribute on the function.

diff  --git a/clang/test/CodeGen/attr-cpuspecific.c b/clang/test/CodeGen/attr-cpuspecific.c
index c5b2af9c7772e..3ee6d7c786e69 100644
--- a/clang/test/CodeGen/attr-cpuspecific.c
+++ b/clang/test/CodeGen/attr-cpuspecific.c
@@ -80,7 +80,7 @@ void ThreeVersionsSameAttr(void){}
 // CHECK: define {{.*}}void @ThreeVersionsSameAttr.S() #[[S]]
 // CHECK: define {{.*}}void @ThreeVersionsSameAttr.Z() #[[K]]
 
-void usages() {
+void usages(void) {
   SingleVersion();
   // LINUX: @SingleVersion.ifunc()
   // WINDOWS: @SingleVersion()

diff  --git a/clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c b/clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c
index 74ebe1b548807..1b762c0229757 100644
--- a/clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c
+++ b/clang/test/CodeGen/attr-disable-sanitizer-instrumentation.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -debug-info-kind=limited %s -emit-llvm -o - | FileCheck %s
 
-void t1() __attribute__((disable_sanitizer_instrumentation)) {
+void t1(void) __attribute__((disable_sanitizer_instrumentation)) {
 }
 // CHECK: disable_sanitizer_instrumentation
 // CHECK-NEXT: void @t1
 
 // CHECK-NOT: disable_sanitizer_instrumentation
 // CHECK: void @t2
-void t2() {
+void t2(void) {
 }

diff  --git a/clang/test/CodeGen/attr-disable-tail-calls.c b/clang/test/CodeGen/attr-disable-tail-calls.c
index 7ae2419228135..83b61dc627042 100644
--- a/clang/test/CodeGen/attr-disable-tail-calls.c
+++ b/clang/test/CodeGen/attr-disable-tail-calls.c
@@ -6,11 +6,11 @@
 // ENABLE: define{{.*}} i32 @f1() [[ATTRFALSE:#[0-9]+]] {
 // ENABLE: define{{.*}} i32 @f2() [[ATTRTRUE:#[0-9]+]] {
 
-int f1() {
+int f1(void) {
   return 0;
 }
 
-int f2() __attribute__((disable_tail_calls)) {
+int f2(void) __attribute__((disable_tail_calls)) {
   return 0;
 }
 

diff  --git a/clang/test/CodeGen/attr-ifunc.c b/clang/test/CodeGen/attr-ifunc.c
index 1a5c385451779..a0659ae773dd1 100644
--- a/clang/test/CodeGen/attr-ifunc.c
+++ b/clang/test/CodeGen/attr-ifunc.c
@@ -3,48 +3,48 @@
 // RUN: %clang_cc1 -triple x86_64-linux -fsyntax-only -verify -emit-llvm-only %s
 
 #if defined(_WIN32)
-void foo() {}
-void bar() __attribute__((ifunc("foo")));
+void foo(void) {}
+void bar(void) __attribute__((ifunc("foo")));
 // expected-warning at -1 {{unknown attribute 'ifunc' ignored}}
 
 #else
 #if defined(CHECK_ALIASES)
-void *f1_ifunc();
-void f1() __attribute__((ifunc("f1_ifunc")));
+void *f1_ifunc(void);
+void f1(void) __attribute__((ifunc("f1_ifunc")));
 // expected-error at -1 {{ifunc must point to a defined function}}
 
-void *f2_a() __attribute__((alias("f2_b")));
-void *f2_b() __attribute__((ifunc("f2_a")));
+void *f2_a(void) __attribute__((alias("f2_b")));
+void *f2_b(void) __attribute__((ifunc("f2_a")));
 // expected-error at -1 {{ifunc definition is part of a cycle}}
 
-void *f3_a() __attribute__((ifunc("f3_b")));
+void *f3_a(void) __attribute__((ifunc("f3_b")));
 // expected-warning at -1 {{ifunc will always resolve to f3_c even if weak definition of f3_b is overridden}}
-void *f3_b() __attribute__((weak, alias("f3_c")));
-void *f3_c() { return 0; }
+void *f3_b(void) __attribute__((weak, alias("f3_c")));
+void *f3_c(void) { return 0; }
 
-void f4_ifunc() {}
-void f4() __attribute__((ifunc("f4_ifunc")));
+void f4_ifunc(void) {}
+void f4(void) __attribute__((ifunc("f4_ifunc")));
 // expected-error at -1 {{ifunc resolver function must return a pointer}}
 
 int f5_resolver_gvar;
-void f5() __attribute__((ifunc("f5_resolver_gvar")));
+void f5(void) __attribute__((ifunc("f5_resolver_gvar")));
 // expected-error at -1 {{ifunc must point to a defined function}}
 
-void *f6_resolver_resolver() { return 0; }
-void *f6_resolver() __attribute__((ifunc("f6_resolver_resolver")));
-void f6() __attribute__((ifunc("f6_resolver")));
+void *f6_resolver_resolver(void) { return 0; }
+void *f6_resolver(void) __attribute__((ifunc("f6_resolver_resolver")));
+void f6(void) __attribute__((ifunc("f6_resolver")));
 // expected-error at -1 {{ifunc must point to a defined function}}
 
 #else
-void f1a() __asm("f1");
-void f1a() {}
+void f1a(void) __asm("f1");
+void f1a(void) {}
 // expected-note at -1 {{previous definition is here}}
-void f1() __attribute__((ifunc("f1_ifunc")));
+void f1(void) __attribute__((ifunc("f1_ifunc")));
 // expected-error at -1 {{definition with same mangled name 'f1' as another definition}}
-void *f1_ifunc() { return 0; }
+void *f1_ifunc(void) { return 0; }
 
 void *f6_ifunc(int i);
-void __attribute__((ifunc("f6_ifunc"))) f6() {}
+void __attribute__((ifunc("f6_ifunc"))) f6(void) {}
 // expected-error at -1 {{definition 'f6' cannot also be an ifunc}}
 
 #endif

diff  --git a/clang/test/CodeGen/attr-leaf.c b/clang/test/CodeGen/attr-leaf.c
index 5a9bcf6748c40..70b76b56f67f9 100644
--- a/clang/test/CodeGen/attr-leaf.c
+++ b/clang/test/CodeGen/attr-leaf.c
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -Oz -o - %s | FileCheck %s
 
 // CHECK: define{{.*}} void @f() local_unnamed_addr [[ATTRS:#[0-9]+]] {
-void f() __attribute__((leaf));
+void f(void) __attribute__((leaf));
 
-void f()
+void f(void)
 {
 }
 

diff  --git a/clang/test/CodeGen/attr-mode-enums.c b/clang/test/CodeGen/attr-mode-enums.c
index 4675f6c069cd5..9b6365cadbab9 100644
--- a/clang/test/CodeGen/attr-mode-enums.c
+++ b/clang/test/CodeGen/attr-mode-enums.c
@@ -4,7 +4,7 @@
 //   1. "typedef enum { A } __attribute__((mode(HI))) T;" is accepted,
 //   2. "enum X __attribute__((mode(QI))) var;" forms a complete integer type.
 
-int main() {
+int main(void) {
   // CHECK: [[X1:%.+]] = alloca i8
   enum { A1, B1 } __attribute__((mode(QI))) x1 = A1;
 

diff  --git a/clang/test/CodeGen/attr-mode-vector-types.c b/clang/test/CodeGen/attr-mode-vector-types.c
index 3c028fbd2882a..e786d0a8c473d 100644
--- a/clang/test/CodeGen/attr-mode-vector-types.c
+++ b/clang/test/CodeGen/attr-mode-vector-types.c
@@ -7,7 +7,7 @@ typedef int __attribute__((mode(DI))) __attribute__((vector_size(64)))vec_t4;
 typedef float __attribute__((mode(SF))) __attribute__((vector_size(128))) vec_t5;
 typedef float __attribute__((mode(DF))) __attribute__((vector_size(256))) vec_t6;
 
-void check() {
+void check(void) {
   // CHECK: alloca <4 x i8>
   vec_t1 v1;
   // CHECK: alloca <8 x i8>
@@ -23,19 +23,19 @@ void check() {
 }
 
 // CHECK: ret i32 4
-int check_size1() { return sizeof(vec_t1); }
+int check_size1(void) { return sizeof(vec_t1); }
 
 // CHECK: ret i32 8
-int check_size2() { return sizeof(vec_t2); }
+int check_size2(void) { return sizeof(vec_t2); }
 
 // CHECK: ret i32 16
-int check_size3() { return sizeof(vec_t3); }
+int check_size3(void) { return sizeof(vec_t3); }
 
 // CHECK: ret i32 64
-int check_size4() { return sizeof(vec_t4); }
+int check_size4(void) { return sizeof(vec_t4); }
 
 // CHECK: ret i32 128
-int check_size5() { return sizeof(vec_t5); }
+int check_size5(void) { return sizeof(vec_t5); }
 
 // CHECK: ret i32 256
-int check_size6() { return sizeof(vec_t6); }
+int check_size6(void) { return sizeof(vec_t6); }

diff  --git a/clang/test/CodeGen/attr-mustprogress.c b/clang/test/CodeGen/attr-mustprogress.c
index e690d2c209211..931564cd1cebc 100644
--- a/clang/test/CodeGen/attr-mustprogress.c
+++ b/clang/test/CodeGen/attr-mustprogress.c
@@ -32,7 +32,7 @@ int b = 0;
 // C11-NOT:       br {{.*}}!llvm.loop
 // FINITE-NEXT:   br {{.*}}!llvm.loop
 //
-void f0() {
+void f0(void) {
   for (; ;) ;
 }
 
@@ -49,7 +49,7 @@ void f0() {
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void
 //
-void f1() {
+void f1(void) {
   for (; 1;) {
   }
 }
@@ -70,7 +70,7 @@ void f1() {
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void
 //
-void f2() {
+void f2(void) {
   for (; a == b;) {
   }
 }
@@ -99,7 +99,7 @@ void f2() {
 // CHECK:       for.end3:
 // CHECK-NEXT:    ret void
 //
-void F() {
+void F(void) {
   for (; 1;) {
   }
   for (; a == b;) {
@@ -115,7 +115,7 @@ void F() {
 // C11-NOT:       br {{.*}}, !llvm.loop
 // FINITE-NEXT:   br {{.*}}, !llvm.loop
 //
-void w1() {
+void w1(void) {
   while (1) {
   }
 }
@@ -136,7 +136,7 @@ void w1() {
 // CHECK:       while.end:
 // CHECK-NEXT:    ret void
 //
-void w2() {
+void w2(void) {
   while (a == b) {
   }
 }
@@ -161,7 +161,7 @@ void w2() {
 // C11-NOT:       br {{.*}} !llvm.loop
 // FINITE-NEXT:   br {{.*}} !llvm.loop
 //
-void W() {
+void W(void) {
   while (a == b) {
   }
   while (1) {
@@ -181,7 +181,7 @@ void W() {
 // CHECK:       do.end:
 // CHECK-NEXT:    ret void
 //
-void d1() {
+void d1(void) {
   do {
   } while (1);
 }
@@ -202,7 +202,7 @@ void d1() {
 // CHECK:       do.end:
 // CHECK-NEXT:    ret void
 //
-void d2() {
+void d2(void) {
   do {
   } while (a == b);
 }
@@ -229,7 +229,7 @@ void d2() {
 // CHECK:       do.end3:
 // CHECK-NEXT:    ret void
 //
-void D() {
+void D(void) {
   do {
   } while (1);
   do {

diff  --git a/clang/test/CodeGen/attr-naked.c b/clang/test/CodeGen/attr-naked.c
index d760683874c13..2bd9e4c77c025 100644
--- a/clang/test/CodeGen/attr-naked.c
+++ b/clang/test/CodeGen/attr-naked.c
@@ -1,18 +1,18 @@
 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -o - | FileCheck %s
 
-void t1() __attribute__((naked));
+void t1(void) __attribute__((naked));
 
 // Basic functionality check
 // (Note that naked needs to imply noinline to work properly.)
 // CHECK: define{{.*}} void @t1() [[NAKED_OPTNONE:#[0-9]+]] {
-void t1()
+void t1(void)
 {
 }
 
 // Make sure this doesn't explode in the verifier.
 // (It doesn't really make sense, but it isn't invalid.)
 // CHECK: define{{.*}} void @t2() [[NAKED:#[0-9]+]] {
-__attribute((naked, always_inline)) void t2() {
+__attribute((naked, always_inline)) void t2(void) {
 }
 
 // Make sure not to generate prolog or epilog for naked functions.

diff  --git a/clang/test/CodeGen/attr-nodebug.c b/clang/test/CodeGen/attr-nodebug.c
index 177cb81e7f863..fde0c912b16dc 100644
--- a/clang/test/CodeGen/attr-nodebug.c
+++ b/clang/test/CodeGen/attr-nodebug.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 
-void t1() __attribute__((nodebug));
+void t1(void) __attribute__((nodebug));
 
-void t1()
+void t1(void)
 {
   int a = 10;
   a++;
 }
 
-void t2()
+void t2(void)
 {
   int b = 10;
   b++;

diff  --git a/clang/test/CodeGen/attr-nodebug2.c b/clang/test/CodeGen/attr-nodebug2.c
index fd6eca1f74323..a17e1e6cbff7d 100644
--- a/clang/test/CodeGen/attr-nodebug2.c
+++ b/clang/test/CodeGen/attr-nodebug2.c
@@ -5,11 +5,11 @@
 extern "C" {
 #endif
 
-void t1();
+void t1(void);
 
-void use() { t1(); }
+void use(void) { t1(); }
 
-__attribute__((nodebug)) void t1() {
+__attribute__((nodebug)) void t1(void) {
   int a = 10;
   a++;
 }

diff  --git a/clang/test/CodeGen/attr-noinline.c b/clang/test/CodeGen/attr-noinline.c
index 44eb1e87b72c7..60d43b36e6c45 100644
--- a/clang/test/CodeGen/attr-noinline.c
+++ b/clang/test/CodeGen/attr-noinline.c
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o %t %s
 // RUN: grep 'noinline' %t
 
-void t1() __attribute__((noinline));
+void t1(void) __attribute__((noinline));
 
-void t1()
+void t1(void)
 {
 }
 

diff  --git a/clang/test/CodeGen/attr-noreturn.c b/clang/test/CodeGen/attr-noreturn.c
index 5dca4fa1f520a..b4420bd5678c3 100644
--- a/clang/test/CodeGen/attr-noreturn.c
+++ b/clang/test/CodeGen/attr-noreturn.c
@@ -3,7 +3,7 @@
 typedef void (*fptrs_t[4])(void);
 fptrs_t p __attribute__((noreturn));
 
-void __attribute__((noreturn)) f() {
+void __attribute__((noreturn)) f(void) {
   p[0]();
 }
 // CHECK: call void

diff  --git a/clang/test/CodeGen/attr-optnone.c b/clang/test/CodeGen/attr-optnone.c
index 96493bfe36132..c8d6dddf771a0 100644
--- a/clang/test/CodeGen/attr-optnone.c
+++ b/clang/test/CodeGen/attr-optnone.c
@@ -9,16 +9,16 @@
 // RUN: FileCheck %s --check-prefix=MINSIZE < %t
 
 __attribute__((always_inline))
-int test2() { return 0; }
+int test2(void) { return 0; }
 // OPTSIZE: @test2{{.*}}[[ATTR2:#[0-9]+]]
 // MINSIZE: @test2{{.*}}[[ATTR2:#[0-9]+]]
 
 __attribute__((optnone))
-int test3() { return 0; }
+int test3(void) { return 0; }
 // PRESENT-DAG: @test3{{.*}}[[ATTR3:#[0-9]+]]
 
 __attribute__((optnone)) __attribute__((cold))
-int test4() { return test2(); }
+int test4(void) { return test2(); }
 // PRESENT-DAG: @test4{{.*}}[[ATTR4:#[0-9]+]]
 // Also check that test2 is inlined into test4 (always_inline still works).
 // PRESENT-NOT: call i32 @test2

diff  --git a/clang/test/CodeGen/attr-retain.c b/clang/test/CodeGen/attr-retain.c
index 8ac9fefb3c20d..13403b36b9343 100644
--- a/clang/test/CodeGen/attr-retain.c
+++ b/clang/test/CodeGen/attr-retain.c
@@ -14,7 +14,7 @@
 
 const int c0 __attribute__((retain)) = 42;
 
-void foo() {
+void foo(void) {
   static int l0 __attribute__((retain)) = 2;
 }
 

diff  --git a/clang/test/CodeGen/attr-speculative-load-hardening.c b/clang/test/CodeGen/attr-speculative-load-hardening.c
index 784640f93932a..7dfbe36a82e08 100644
--- a/clang/test/CodeGen/attr-speculative-load-hardening.c
+++ b/clang/test/CodeGen/attr-speculative-load-hardening.c
@@ -3,7 +3,7 @@
 //
 // Check that we set the attribute on each function.
 
-int test1() {
+int test1(void) {
   return 42;
 }
 // SLH: @{{.*}}test1{{.*}}[[SLH:#[0-9]+]]

diff  --git a/clang/test/CodeGen/attr-target-clones.c b/clang/test/CodeGen/attr-target-clones.c
index e17cca125b5ba..2ba3fb0158044 100644
--- a/clang/test/CodeGen/attr-target-clones.c
+++ b/clang/test/CodeGen/attr-target-clones.c
@@ -33,7 +33,7 @@ __attribute__((target_clones("default,default ,sse4.2"))) void foo_dupes(void) {
 // WINDOWS: musttail call void @foo_dupes.sse4.2.0
 // WINDOWS: musttail call void @foo_dupes.default.1
 
-void bar2() {
+void bar2(void) {
   // LINUX: define {{.*}}void @bar2()
   // WINDOWS: define dso_local void @bar2()
   foo_dupes();
@@ -41,7 +41,7 @@ void bar2() {
   // WINDOWS: call void @foo_dupes()
 }
 
-int bar() {
+int bar(void) {
   // LINUX: define {{.*}}i32 @bar() #[[DEF:[0-9]+]]
   // WINDOWS: define dso_local i32 @bar() #[[DEF:[0-9]+]]
   return foo();
@@ -68,7 +68,7 @@ foo_inline(void) { return 0; }
 inline int __attribute__((target_clones("arch=sandybridge,default,sse4.2")))
 foo_inline2(void);
 
-int bar3() {
+int bar3(void) {
   // LINUX: define {{.*}}i32 @bar3()
   // WINDOWS: define dso_local i32 @bar3()
   return foo_inline() + foo_inline2();

diff  --git a/clang/test/CodeGen/attr-target-general-regs-only-x86.c b/clang/test/CodeGen/attr-target-general-regs-only-x86.c
index f7fbd0bb27bf7..584aef2c61506 100644
--- a/clang/test/CodeGen/attr-target-general-regs-only-x86.c
+++ b/clang/test/CodeGen/attr-target-general-regs-only-x86.c
@@ -4,11 +4,11 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 // CHECK: define{{.*}} void @f() [[GPR_ATTRS:#[0-9]+]]
-void __attribute__((target("general-regs-only"))) f() { }
+void __attribute__((target("general-regs-only"))) f(void) { }
 // CHECK: define{{.*}} void @f_before() [[GPR_ATTRS:#[0-9]+]]
-void __attribute__((target("avx2,general-regs-only"))) f_before() { }
+void __attribute__((target("avx2,general-regs-only"))) f_before(void) { }
 // CHECK: define{{.*}} void @f_after() [[AVX2_ATTRS:#[0-9]+]]
-void __attribute__((target("general-regs-only,avx2"))) f_after() { }
+void __attribute__((target("general-regs-only,avx2"))) f_after(void) { }
 
 // CHECK: attributes [[GPR_ATTRS]] = { {{.*}} "target-features"="{{.*}}-avx{{.*}}-avx2{{.*}}-avx512f{{.*}}-sse{{.*}}-sse2{{.*}}-ssse3{{.*}}-x87{{.*}}"
 // CHECK: attributes [[AVX2_ATTRS]] = { {{.*}} "target-features"="{{.*}}+avx{{.*}}+avx2{{.*}}+sse{{.*}}+sse2{{.*}}+ssse3{{.*}}-avx512f{{.*}}-x87{{.*}}"

diff  --git a/clang/test/CodeGen/attr-target-mv-func-ptrs.c b/clang/test/CodeGen/attr-target-mv-func-ptrs.c
index aace370e0bba5..bae19de9b04ec 100644
--- a/clang/test/CodeGen/attr-target-mv-func-ptrs.c
+++ b/clang/test/CodeGen/attr-target-mv-func-ptrs.c
@@ -8,7 +8,7 @@ int __attribute__((target("default"))) foo(int i) { return 2; }
 typedef int (*FuncPtr)(int);
 void func(FuncPtr);
 
-int bar() {
+int bar(void) {
   func(foo);
   FuncPtr Free = &foo;
   FuncPtr Free2 = foo;

diff  --git a/clang/test/CodeGen/attr-target-mv-va-args.c b/clang/test/CodeGen/attr-target-mv-va-args.c
index 03ba995da35fe..d9fa263100713 100644
--- a/clang/test/CodeGen/attr-target-mv-va-args.c
+++ b/clang/test/CodeGen/attr-target-mv-va-args.c
@@ -5,7 +5,7 @@ int __attribute__((target("arch=sandybridge"))) foo(int i, ...);
 int __attribute__((target("arch=ivybridge"))) foo(int i, ...) {return 1;}
 int __attribute__((target("default"))) foo(int i, ...) { return 2; }
 
-int bar() {
+int bar(void) {
   return foo(1, 'a', 1.1) + foo(2, 2.2, "asdf");
 }
 

diff  --git a/clang/test/CodeGen/attr-target-mv.c b/clang/test/CodeGen/attr-target-mv.c
index 6755f3f02a6a0..39661ee36416e 100644
--- a/clang/test/CodeGen/attr-target-mv.c
+++ b/clang/test/CodeGen/attr-target-mv.c
@@ -16,7 +16,7 @@ int __attribute__((target("arch=alderlake"))) foo(void) {return 11;}
 int __attribute__((target("arch=rocketlake"))) foo(void) {return 12;}
 int __attribute__((target("default"))) foo(void) { return 2; }
 
-int bar() {
+int bar(void) {
   return foo();
 }
 
@@ -25,13 +25,13 @@ inline int __attribute__((target("arch=sandybridge"))) foo_inline(void);
 inline int __attribute__((target("arch=ivybridge"))) foo_inline(void) {return 1;}
 inline int __attribute__((target("default"))) foo_inline(void) { return 2; }
 
-int bar2() {
+int bar2(void) {
   return foo_inline();
 }
 
 inline __attribute__((target("default"))) void foo_decls(void);
 inline __attribute__((target("sse4.2"))) void foo_decls(void);
-void bar3() {
+void bar3(void) {
   foo_decls();
 }
 inline __attribute__((target("default"))) void foo_decls(void) {}
@@ -41,7 +41,7 @@ inline __attribute__((target("default"))) void foo_multi(int i, double d) {}
 inline __attribute__((target("avx,sse4.2"))) void foo_multi(int i, double d) {}
 inline __attribute__((target("sse4.2,fma4"))) void foo_multi(int i, double d) {}
 inline __attribute__((target("arch=ivybridge,fma4,sse4.2"))) void foo_multi(int i, double d) {}
-void bar4() {
+void bar4(void) {
   foo_multi(1, 5.0);
 }
 
@@ -52,7 +52,7 @@ int fwd_decl_avx(void);
 int __attribute__((target("avx"))) fwd_decl_avx(void) { return 2; }
 int __attribute__((target("default"))) fwd_decl_avx(void) { return 2; }
 
-void bar5() {
+void bar5(void) {
   fwd_decl_default();
   fwd_decl_avx();
 }
@@ -69,12 +69,12 @@ __attribute__((target("avx,sse4.2"), used)) inline void foo_used2(int i, double
 // PR50025:
 static void must_be_emitted(void) {}
 inline __attribute__((target("default"))) void pr50025(void) { must_be_emitted(); }
-void calls_pr50025() { pr50025(); }
+void calls_pr50025(void) { pr50025(); }
 
 // Also need to make sure we get other multiversion functions.
 inline __attribute__((target("default"))) void pr50025b(void) { must_be_emitted(); }
 inline __attribute__((target("default"))) void pr50025c(void) { pr50025b(); }
-void calls_pr50025c() { pr50025c(); }
+void calls_pr50025c(void) { pr50025c(); }
 
 // LINUX: @llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (void (i32, double)* @foo_used to i8*), i8* bitcast (void (i32, double)* @foo_used2.avx_sse4.2 to i8*)], section "llvm.metadata"
 // WINDOWS: @llvm.used = appending global [2 x i8*] [i8* bitcast (void (i32, double)* @foo_used to i8*), i8* bitcast (void (i32, double)* @foo_used2.avx_sse4.2 to i8*)], section "llvm.metadata"

diff  --git a/clang/test/CodeGen/attr-target-x86.c b/clang/test/CodeGen/attr-target-x86.c
index 013a34327f153..653033a649c81 100644
--- a/clang/test/CodeGen/attr-target-x86.c
+++ b/clang/test/CodeGen/attr-target-x86.c
@@ -32,9 +32,9 @@ int __attribute__((target("arch=lakemont,mmx"))) use_before_def(void) {
 
 int __attribute__((target("tune=sandybridge"))) walrus(int a) { return 4; }
 
-void __attribute__((target("arch=x86-64-v2"))) x86_64_v2() {}
-void __attribute__((target("arch=x86-64-v3"))) x86_64_v3() {}
-void __attribute__((target("arch=x86-64-v4"))) x86_64_v4() {}
+void __attribute__((target("arch=x86-64-v2"))) x86_64_v2(void) {}
+void __attribute__((target("arch=x86-64-v3"))) x86_64_v3(void) {}
+void __attribute__((target("arch=x86-64-v4"))) x86_64_v4(void) {}
 
 // Check that we emit the additional subtarget and cpu features for foo and not for baz or bar.
 // CHECK: baz{{.*}} #0

diff  --git a/clang/test/CodeGen/attr-used.c b/clang/test/CodeGen/attr-used.c
index dee0cf6a9fd33..2d71f0b68fd0a 100644
--- a/clang/test/CodeGen/attr-used.c
+++ b/clang/test/CodeGen/attr-used.c
@@ -13,9 +13,9 @@ int g0 __attribute__((used));
 static void __attribute__((used)) f0(void) {
 }
 
-void f1() { 
+void f1(void) { 
   static int l0 __attribute__((used)) = 5225; 
 }
 
 __attribute__((used)) int a0;
-void pr27535() { (void)a0; }
+void pr27535(void) { (void)a0; }

diff  --git a/clang/test/CodeGen/attribute_constructor.c b/clang/test/CodeGen/attribute_constructor.c
index c82c263dda198..6ba6d43e5f03a 100644
--- a/clang/test/CodeGen/attribute_constructor.c
+++ b/clang/test/CodeGen/attribute_constructor.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - | grep llvm.global_ctors
 
-void foo() __attribute__((constructor));
-void foo() {
+void foo(void) __attribute__((constructor));
+void foo(void) {
   bar();
 }

diff  --git a/clang/test/CodeGen/attributes.c b/clang/test/CodeGen/attributes.c
index 02a6243a50e26..7ee6fb903fa7a 100644
--- a/clang/test/CodeGen/attributes.c
+++ b/clang/test/CodeGen/attributes.c
@@ -32,41 +32,41 @@ void t9() __attribute__((weak, alias("__t8")));
 
 // CHECK: declare extern_weak i32 @t15()
 int __attribute__((weak_import)) t15(void);
-int t17() {
+int t17(void) {
   return t15() + t16;
 }
 
 // CHECK: define{{.*}} void @t1() [[NR:#[0-9]+]] {
-void t1() __attribute__((noreturn));
-void t1() { while (1) {} }
+void t1(void) __attribute__((noreturn));
+void t1(void) { while (1) {} }
 
 // CHECK: define{{.*}} void @t2() [[NUW:#[0-9]+]] {
-void t2() __attribute__((nothrow));
-void t2() {}
+void t2(void) __attribute__((nothrow));
+void t2(void) {}
 
 // CHECK: define weak{{.*}} void @t3() [[NUW]] {
-void t3() __attribute__((weak));
-void t3() {}
+void t3(void) __attribute__((weak));
+void t3(void) {}
 
 // CHECK: define hidden void @t4() [[NUW]] {
-void t4() __attribute__((visibility("hidden")));
-void t4() {}
+void t4(void) __attribute__((visibility("hidden")));
+void t4(void) {}
 
 // CHECK: define{{.*}} void @t7() [[NR]] {
-void t7() __attribute__((noreturn, nothrow));
-void t7() { while (1) {} }
+void t7(void) __attribute__((noreturn, nothrow));
+void t7(void) { while (1) {} }
 
 // CHECK: define{{.*}} void @t72() [[COLDDEF:#[0-9]+]] {
 void t71(void) __attribute__((cold));
-void t72() __attribute__((cold));
-void t72() { t71(); }
+void t72(void) __attribute__((cold));
+void t72(void) { t71(); }
 // CHECK: call void @t71() [[COLDSITE:#[0-9]+]]
 // CHECK: declare void @t71() [[COLDDECL:#[0-9]+]]
 
 // CHECK: define{{.*}} void @t82() [[HOTDEF:#[0-9]+]] {
 void t81(void) __attribute__((hot));
-void t82() __attribute__((hot));
-void t82() { t81(); }
+void t82(void) __attribute__((hot));
+void t82(void) { t81(); }
 // CHECK: call void @t81() [[HOTSITE:#[0-9]+]]
 // CHECK: declare void @t81() [[HOTDECL:#[0-9]+]]
 

diff  --git a/clang/test/CodeGen/available-externally-suppress.c b/clang/test/CodeGen/available-externally-suppress.c
index 5042cc8623e5c..b28e783e4bf8d 100644
--- a/clang/test/CodeGen/available-externally-suppress.c
+++ b/clang/test/CodeGen/available-externally-suppress.c
@@ -13,7 +13,7 @@ inline void f0(int y) { x = y; }
 // CHECK: declare void @f0(i32 noundef)
 // LTO-LABEL: define{{.*}} void @test()
 // LTO: define available_externally void @f0
-void test() {
+void test(void) {
   f0(17);
 }
 

diff  --git a/clang/test/CodeGen/avr-unsupported-inline-asm-constraints.c b/clang/test/CodeGen/avr-unsupported-inline-asm-constraints.c
index 5a875979a9835..ceea59229f736 100644
--- a/clang/test/CodeGen/avr-unsupported-inline-asm-constraints.c
+++ b/clang/test/CodeGen/avr-unsupported-inline-asm-constraints.c
@@ -2,7 +2,7 @@
 
 const unsigned char val = 0;
 
-int foo() {
+int foo(void) {
   __asm__ volatile("foo %0, 1" : : "fo" (val)); // expected-error {{invalid input constraint 'fo' in asm}}
   __asm__ volatile("foo %0, 1" : : "Nd" (val)); // expected-error {{invalid input constraint 'Nd' in asm}}
 }

diff  --git a/clang/test/CodeGen/avr/functionptr-addrspace.c b/clang/test/CodeGen/avr/functionptr-addrspace.c
index 90ec121319074..655fde1094dd0 100644
--- a/clang/test/CodeGen/avr/functionptr-addrspace.c
+++ b/clang/test/CodeGen/avr/functionptr-addrspace.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -triple avr -emit-llvm %s -o - | FileCheck %s
 
-int main() {
-  int (*p)();
+int main(void) {
+  int (*p)(void);
   return 0;
 }
 
-// CHECK: %p = alloca i16 (...) addrspace(1)*
+// CHECK: %p = alloca i16 () addrspace(1)*

diff  --git a/clang/test/CodeGen/big-atomic-ops.c b/clang/test/CodeGen/big-atomic-ops.c
index 108ccc9a69b53..e8b7f018dc8f9 100644
--- a/clang/test/CodeGen/big-atomic-ops.c
+++ b/clang/test/CodeGen/big-atomic-ops.c
@@ -177,7 +177,7 @@ _Bool fsb(_Bool *c) {
 
 char flag1;
 volatile char flag2;
-void test_and_set() {
+void test_and_set(void) {
   // CHECK: atomicrmw xchg i8* @flag1, i8 1 seq_cst, align 1
   __atomic_test_and_set(&flag1, memory_order_seq_cst);
   // CHECK: atomicrmw volatile xchg i8* @flag2, i8 1 acquire, align 1
@@ -243,7 +243,7 @@ struct bar smallThing, thing1, thing2;
 struct foo bigThing;
 _Atomic(struct foo) bigAtomic;
 
-void structAtomicStore() {
+void structAtomicStore(void) {
   // CHECK: @structAtomicStore
   struct foo f = {0};
   __c11_atomic_store(&bigAtomic, f, 5);
@@ -256,7 +256,7 @@ void structAtomicStore() {
   __atomic_store(&bigThing, &f, 5);
   // CHECK: call void @__atomic_store(i64 noundef 512, i8* noundef {{.*}} @bigThing
 }
-void structAtomicLoad() {
+void structAtomicLoad(void) {
   // CHECK: @structAtomicLoad
   struct foo f = __c11_atomic_load(&bigAtomic, 5);
   // CHECK: call void @__atomic_load(i64 noundef 512, i8* noundef bitcast ({{.*}} @bigAtomic to i8*),
@@ -268,7 +268,7 @@ void structAtomicLoad() {
   __atomic_load(&bigThing, &f, 5);
   // CHECK: call void @__atomic_load(i64 noundef 512, i8* noundef {{.*}} @bigThing
 }
-struct foo structAtomicExchange() {
+struct foo structAtomicExchange(void) {
   // CHECK: @structAtomicExchange
   struct foo f = {0};
   struct foo old;
@@ -278,7 +278,7 @@ struct foo structAtomicExchange() {
   return __c11_atomic_exchange(&bigAtomic, f, 5);
   // CHECK: call void @__atomic_exchange(i64 noundef 512, i8* noundef bitcast ({{.*}} @bigAtomic to i8*),
 }
-int structAtomicCmpExchange() {
+int structAtomicCmpExchange(void) {
   // CHECK: @structAtomicCmpExchange
   _Bool x = __atomic_compare_exchange(&smallThing, &thing1, &thing2, 1, 5, 5);
   // CHECK: call zeroext i1 @__atomic_compare_exchange(i64 noundef 3, {{.*}} @smallThing{{.*}} @thing1{{.*}} @thing2
@@ -295,7 +295,7 @@ int structAtomicCmpExchange() {
 _Atomic(int) atomic_init_i = 42;
 
 // CHECK: @atomic_init_foo
-void atomic_init_foo()
+void atomic_init_foo(void)
 {
   // CHECK-NOT: }
   // CHECK-NOT: atomic

diff  --git a/clang/test/CodeGen/bitfield-2.c b/clang/test/CodeGen/bitfield-2.c
index 93ff7f7716015..7ca607d883f59 100644
--- a/clang/test/CodeGen/bitfield-2.c
+++ b/clang/test/CodeGen/bitfield-2.c
@@ -35,7 +35,7 @@ int f0_reload(struct s0 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_0()
 // CHECK-OPT:  ret i64 1
 // CHECK-OPT: }
-unsigned long long test_0() {
+unsigned long long test_0(void) {
   struct s0 g0 = { 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g0.f0;
@@ -81,7 +81,7 @@ int f1_reload(struct s1 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_1()
 // CHECK-OPT:  ret i64 210
 // CHECK-OPT: }
-unsigned long long test_1() {
+unsigned long long test_1(void) {
   struct s1 g1 = { 0xdeadbeef, 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g1.f0 ^ g1.f1;
@@ -123,7 +123,7 @@ int f2_reload(union u2 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_2()
 // CHECK-OPT:  ret i64 2
 // CHECK-OPT: }
-unsigned long long test_2() {
+unsigned long long test_2(void) {
   union u2 g2 = { 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g2.f0;
@@ -159,7 +159,7 @@ int f3_reload(struct s3 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_3()
 // CHECK-OPT:  ret i64 -559039940
 // CHECK-OPT: }
-unsigned long long test_3() {
+unsigned long long test_3(void) {
   struct s3 g3 = { 0xdeadbeef, 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g3.f0 ^ g3.f1;
@@ -193,7 +193,7 @@ int f4_reload(struct s4 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_4()
 // CHECK-OPT:  ret i64 4860
 // CHECK-OPT: }
-unsigned long long test_4() {
+unsigned long long test_4(void) {
   struct s4 g4 = { 0xdeadbeef, 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g4.f0 ^ g4.f1;
@@ -225,7 +225,7 @@ int f5_reload(struct s5 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i64 @test_5()
 // CHECK-OPT:  ret i64 2
 // CHECK-OPT: }
-unsigned long long test_5() {
+unsigned long long test_5(void) {
   struct s5 g5 = { 0xdeadbeef, 0xdeadbeef, 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g5.f0 ^ g5.f1 ^ g5.f2;
@@ -255,7 +255,7 @@ int f6_reload(struct s6 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} zeroext i1 @test_6()
 // CHECK-OPT:  ret i1 true
 // CHECK-OPT: }
-_Bool test_6() {
+_Bool test_6(void) {
   struct s6 g6 = { 0xF };
   unsigned long long res = 0;
   res ^= g6.f0;
@@ -313,7 +313,7 @@ int f8_reload(struct s8 *a0) {
 // CHECK-OPT-LABEL: define{{.*}} i32 @test_8()
 // CHECK-OPT:  ret i32 -3
 // CHECK-OPT: }
-unsigned test_8() {
+unsigned test_8(void) {
   struct s8 g8 = { 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef };
   unsigned long long res = 0;
   res ^= g8.f0 ^ g8.f2 ^ g8.f3;

diff  --git a/clang/test/CodeGen/bitfield-assign.c b/clang/test/CodeGen/bitfield-assign.c
index 270f44de52f36..498ad8597c000 100644
--- a/clang/test/CodeGen/bitfield-assign.c
+++ b/clang/test/CodeGen/bitfield-assign.c
@@ -19,7 +19,7 @@ struct s0 {
   unsigned f2 : 2;
 };
 
-int g0();
+int g0(void);
 
 void f0(void) {
   struct s0 s;  

diff  --git a/clang/test/CodeGen/bitfield-init.c b/clang/test/CodeGen/bitfield-init.c
index bee4e7d3a059b..1f55222b188de 100644
--- a/clang/test/CodeGen/bitfield-init.c
+++ b/clang/test/CodeGen/bitfield-init.c
@@ -6,7 +6,7 @@ const c d = { 1 };
 struct Token {
   unsigned n : 31;
 };
-void sqlite3CodeSubselect(){
+void sqlite3CodeSubselect(void){
   struct Token one = { 1 };
 }
 

diff  --git a/clang/test/CodeGen/block-3.c b/clang/test/CodeGen/block-3.c
index 29c1bb5803c71..096cf28155d1d 100644
--- a/clang/test/CodeGen/block-3.c
+++ b/clang/test/CodeGen/block-3.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 
 // rdar://10001085
 
-int main() {
+int main(void) {
   ^{
                 __attribute__((__blocks__(byref))) int index = ({ int __a; int __b; __a < __b ? __b : __a; });
    };
@@ -13,7 +13,7 @@ typedef struct {} Z;
 
 typedef int (^B)(Z);
 
-void testPR13229() {
+void testPR13229(void) {
   Z z1;
   B b1 = ^(Z z1) { return 1; };
   b1(z1);

diff  --git a/clang/test/CodeGen/block-byref-aggr.c b/clang/test/CodeGen/block-byref-aggr.c
index f77fcdc40e85e..76a548d04fd89 100644
--- a/clang/test/CodeGen/block-byref-aggr.c
+++ b/clang/test/CodeGen/block-byref-aggr.c
@@ -7,7 +7,7 @@ Agg makeAgg(void);
 // When assigning into a __block variable, ensure that we compute that
 // address *after* evaluating the RHS when the RHS has the capacity to
 // cause a block copy.  rdar://9309454
-void test0() {
+void test0(void) {
   __block Agg a = {100};
   ^{ (void)a; };
 
@@ -35,7 +35,7 @@ void test0() {
 // When chaining assignments into __block variables, make sure we
 // propagate the actual value into the outer variable.
 // rdar://11757470
-void test1() {
+void test1(void) {
   __block Agg a, b;
   ^{ (void)a; (void)b; };
   a = b = makeAgg();

diff  --git a/clang/test/CodeGen/block-copy.c b/clang/test/CodeGen/block-copy.c
index fba76ad21a146..0d25ebb46aa78 100644
--- a/clang/test/CodeGen/block-copy.c
+++ b/clang/test/CodeGen/block-copy.c
@@ -6,7 +6,7 @@
 
 void foo();
 
-float bar() {
+float bar(void) {
   float lookupTable[] = {-1,-1,-1,0, -1,-1,0,-1, -1,-1,0,1, -1,-1,1,0,
 			 -1,0,-1,-1, -1,0,-1,1, -1,0,1,-1, -1,0,1,1,
 			 -1,1,-1,0, -1,1,0,-1, -1,1,0,1, -1,1,1,0,

diff  --git a/clang/test/CodeGen/block-with-perdefinedexpr.c b/clang/test/CodeGen/block-with-perdefinedexpr.c
index 94d67c3b93b54..b9af9c1b04181 100644
--- a/clang/test/CodeGen/block-with-perdefinedexpr.c
+++ b/clang/test/CodeGen/block-with-perdefinedexpr.c
@@ -6,7 +6,7 @@ void syslog(const char *, ...);
 void handler( );
 
 __attribute__((used))
-static void (^spd)() = ^()
+static void (^spd)(void) = ^(void)
 {
  handler( ^(){ syslog("%s", __FUNCTION__); } );
 };

diff  --git a/clang/test/CodeGen/blocks-1.c b/clang/test/CodeGen/blocks-1.c
index 0df13790ddd24..22046f57ae2d6 100644
--- a/clang/test/CodeGen/blocks-1.c
+++ b/clang/test/CodeGen/blocks-1.c
@@ -18,7 +18,7 @@
 
 int printf(const char *, ...);
 
-void test1() {
+void test1(void) {
   __block int a;
   int b=2;
   a=1;
@@ -29,7 +29,7 @@ void test1() {
   printf("a is %d, b is %d\n", a, b);
 }
 
-void test2() {
+void test2(void) {
   __block int a;
   a=1;
   printf("a is %d\n", a);
@@ -43,13 +43,13 @@ void test2() {
   printf("a is %d\n", a);
 }
 
-void test3() {
+void test3(void) {
   __block int k;
   __block int (^j)(int);
   ^{j=0; k=0;}(); // needs copy/dispose
 }
 
-int test4() {
+int test4(void) {
   extern int g;
   static int i = 1;
   ^(int j){ i = j; g = 0; }(0); // does not need copy/dispose
@@ -58,25 +58,25 @@ int test4() {
 
 int g;
 
-void test5() {
+void test5(void) {
   __block struct { int i; } i;
   ^{ (void)i; }(); // needs copy/dispose
 }
 
-void test6() {
+void test6(void) {
   __block int i;
   ^{ i=1; }(); // needs copy/dispose
   ^{}(); // does not need copy/dispose
 }
 
-void test7() {
+void test7(void) {
   ^{ // does not need copy/dispose
     __block int i;
     ^{ i = 1; }(); // needs copy/dispose
   }();
 }
 
-int main() {
+int main(void) {
   int rv = 0;
   test1();
   test2();

diff  --git a/clang/test/CodeGen/blocks-aligned-byref-variable.c b/clang/test/CodeGen/blocks-aligned-byref-variable.c
index 07d683c3526e4..fc78b7fe78f35 100644
--- a/clang/test/CodeGen/blocks-aligned-byref-variable.c
+++ b/clang/test/CodeGen/blocks-aligned-byref-variable.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -emit-llvm -o - -triple i386-apple-darwin10 -fblocks %s
 typedef int __attribute__((aligned(32)))  ai;
 
-void f() {
+void f(void) {
   __block ai a = 10;
 
   ^{
@@ -10,7 +10,7 @@ void f() {
   }();
 }
 
-void g() {
+void g(void) {
   __block double a = 10;
 
   ^{

diff  --git a/clang/test/CodeGen/blocks-seq.c b/clang/test/CodeGen/blocks-seq.c
index 9b47fbf783dd9..416d98f0d9f84 100644
--- a/clang/test/CodeGen/blocks-seq.c
+++ b/clang/test/CodeGen/blocks-seq.c
@@ -1,15 +1,15 @@
 // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
 // CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8
-// CHECK: call i32 (...) @rhs()
+// CHECK: call i32 @rhs()
 // CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
 // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]]
-// CHECK: call i32 (...) @rhs()
+// CHECK: call i32 @rhs()
 // CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1
 // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]]
 
-int rhs();
+int rhs(void);
 
-void foo() {
+void foo(void) {
   __block int i;
   ^{ (void)i; };
   i = rhs();

diff  --git a/clang/test/CodeGen/blocks.c b/clang/test/CodeGen/blocks.c
index 95535545b1cf1..97236f1ab0631 100644
--- a/clang/test/CodeGen/blocks.c
+++ b/clang/test/CodeGen/blocks.c
@@ -68,7 +68,7 @@ ftype ^test2 = ^ftype {
 
 // rdar://problem/8605032
 void f3_helper(void (^)(void));
-void f3() {
+void f3(void) {
   _Bool b = 0;
   f3_helper(^{ if (b) {} });
 }
@@ -101,7 +101,7 @@ void f5(void) {
 
 // rdar://14085217
 void (^b)() = ^{};
-int main() {
+int main(void) {
    (b?: ^{})();
 }
 // CHECK: [[ZERO:%.*]] = load void (...)*, void (...)** @b
@@ -112,7 +112,7 @@ int main() {
 
 // Ensure that we don't emit helper code in copy/dispose routines for variables
 // that are const-captured.
-void testConstCaptureInCopyAndDestroyHelpers() {
+void testConstCaptureInCopyAndDestroyHelpers(void) {
   const int x = 0;
   __block int i;
   (^ { i = x; })();

diff  --git a/clang/test/CodeGen/bounds-checking.c b/clang/test/CodeGen/bounds-checking.c
index 632b7fefbc920..ba8c18934388c 100644
--- a/clang/test/CodeGen/bounds-checking.c
+++ b/clang/test/CodeGen/bounds-checking.c
@@ -13,7 +13,7 @@ double f(int b, int i) {
 }
 
 // CHECK-LABEL: @f2
-void f2() {
+void f2(void) {
   // everything is constant; no trap possible
   // CHECK-NOT: call {{.*}} @llvm.{{(ubsan)?trap}}
   int a[2];
@@ -26,7 +26,7 @@ void f2() {
 }
 
 // CHECK-LABEL: @f3
-void f3() {
+void f3(void) {
   int a[1];
   // CHECK: call {{.*}} @llvm.{{(ubsan)?trap}}
   a[2] = 1;

diff  --git a/clang/test/CodeGen/branch-on-bool.c b/clang/test/CodeGen/branch-on-bool.c
index 98a3845fba284..1126eecac6cf4 100644
--- a/clang/test/CodeGen/branch-on-bool.c
+++ b/clang/test/CodeGen/branch-on-bool.c
@@ -1,7 +1,7 @@
 // RUN: %clang %s -O0 -emit-llvm -S -o - | FileCheck %s
 
-void foo();
-void bar();
+void foo(void);
+void bar(void);
 
 void fold_if(int a, int b) {
   // CHECK: define {{.*}} @fold_if(

diff  --git a/clang/test/CodeGen/branch-target-layout.c b/clang/test/CodeGen/branch-target-layout.c
index a6475d7ef116c..5a0a6a3d18962 100644
--- a/clang/test/CodeGen/branch-target-layout.c
+++ b/clang/test/CodeGen/branch-target-layout.c
@@ -9,9 +9,9 @@
 // Note that the frontend inverts branches to simplify the condition, so the
 // order of a branch instruction's labels cannot be used as a source order bias.
 
-void calla();
-void callb();
-void callc();
+void calla(void);
+void callb(void);
+void callc(void);
 
 // CHECK: @test1
 // CHECK: @calla

diff  --git a/clang/test/CodeGen/builtin-assume-aligned.c b/clang/test/CodeGen/builtin-assume-aligned.c
index 7510820f5650f..c4e3f2afb92a5 100644
--- a/clang/test/CodeGen/builtin-assume-aligned.c
+++ b/clang/test/CodeGen/builtin-assume-aligned.c
@@ -81,28 +81,28 @@ int test4(int *a, int b) {
   return a[0];
 }
 
-int *m1() __attribute__((assume_aligned(64)));
+int *m1(void) __attribute__((assume_aligned(64)));
 
 // CHECK-LABEL: @test5(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[CALL:%.*]] = call align 64 i32* (...) @m1()
+// CHECK-NEXT:    [[CALL:%.*]] = call align 64 i32* @m1()
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 // CHECK-NEXT:    ret i32 [[TMP0]]
 //
-int test5() {
+int test5(void) {
   return *m1();
 }
 
-int *m2() __attribute__((assume_aligned(64, 12)));
+int *m2(void) __attribute__((assume_aligned(64, 12)));
 
 // CHECK-LABEL: @test6(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[CALL:%.*]] = call i32* (...) @m2()
+// CHECK-NEXT:    [[CALL:%.*]] = call i32* @m2()
 // CHECK-NEXT:    call void @llvm.assume(i1 true) [ "align"(i32* [[CALL]], i64 64, i64 12) ]
 // CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 // CHECK-NEXT:    ret i32 [[TMP0]]
 //
-int test6() {
+int test6(void) {
   return *m2();
 }
 

diff  --git a/clang/test/CodeGen/builtin-constant-p.c b/clang/test/CodeGen/builtin-constant-p.c
index 76ab4c8ec2c61..2c15a9b07fb37 100644
--- a/clang/test/CodeGen/builtin-constant-p.c
+++ b/clang/test/CodeGen/builtin-constant-p.c
@@ -19,7 +19,7 @@ struct foo test0(int expr) {
 
 /* --- Pointer types */
 
-int test1() {
+int test1(void) {
   // CHECK-LABEL: test1
   // CHECK: ret i32 0
   return __builtin_constant_p(&a - 13);
@@ -29,7 +29,7 @@ int test1() {
 
 int b[] = {1, 2, 3};
 
-int test2() {
+int test2(void) {
   // CHECK-LABEL: test2
   // CHECK: ret i32 0
   return __builtin_constant_p(b);
@@ -37,7 +37,7 @@ int test2() {
 
 const char test3_c[] = {1, 2, 3, 0};
 
-int test3() {
+int test3(void) {
   // CHECK-LABEL: test3
   // CHECK: ret i32 0
   return __builtin_constant_p(test3_c);
@@ -47,7 +47,7 @@ inline char test4_i(const char *x) {
   return x[1];
 }
 
-int test4() {
+int test4(void) {
   // CHECK: define{{.*}} i32 @test4
   // CHECK: ret i32 0
   return __builtin_constant_p(test4_i(test3_c));
@@ -57,7 +57,7 @@ int test4() {
 
 const int c = 42;
 
-int test5() {
+int test5(void) {
   // CHECK-LABEL: test5
   // CHECK: ret i32 1
   return __builtin_constant_p(c);
@@ -68,19 +68,19 @@ int test5() {
 int arr[] = { 1, 2, 3 };
 const int c_arr[] = { 1, 2, 3 };
 
-int test6() {
+int test6(void) {
   // CHECK-LABEL: test6
   // CHECK: call i1 @llvm.is.constant.i32
   return __builtin_constant_p(arr[2]);
 }
 
-int test7() {
+int test7(void) {
   // CHECK-LABEL: test7
   // CHECK: call i1 @llvm.is.constant.i32
   return __builtin_constant_p(c_arr[2]);
 }
 
-int test8() {
+int test8(void) {
   // CHECK-LABEL: test8
   // CHECK: ret i32 0
   return __builtin_constant_p(c_arr);
@@ -88,13 +88,13 @@ int test8() {
 
 /* --- Function pointers */
 
-int test9() {
+int test9(void) {
   // CHECK-LABEL: test9
   // CHECK: ret i32 0
   return __builtin_constant_p(&test9);
 }
 
-int test10() {
+int test10(void) {
   // CHECK-LABEL: test10
   // CHECK: ret i32 1
   return __builtin_constant_p(&test10 != 0);
@@ -122,7 +122,7 @@ extern fn_p *dest_p;
 static void src_fn(void) {
 }
 
-void test11() {
+void test11(void) {
   assign(dest_p, src_fn);
 }
 
@@ -137,16 +137,16 @@ struct { int a; } test13 = { __builtin_constant_p(test13_v) };
 
 extern unsigned long long test14_v;
 
-void test14() {
+void test14(void) {
   // CHECK-LABEL: test14
   // CHECK: call void asm sideeffect "", {{.*}}(i32 -1) 
   __asm__ __volatile__("" :: "n"( (__builtin_constant_p(test14_v) || 0) ? 1 : -1));
 }
 
-int test15_f();
+int test15_f(void);
 // CHECK-LABEL: define{{.*}} void @test15
 // CHECK-NOT: call {{.*}}test15_f
-void test15() {
+void test15(void) {
   int a, b;
   (void)__builtin_constant_p((a = b, test15_f()));
 }

diff  --git a/clang/test/CodeGen/builtin-cpu-is.c b/clang/test/CodeGen/builtin-cpu-is.c
index bff3544c13607..f58435ee973c8 100644
--- a/clang/test/CodeGen/builtin-cpu-is.c
+++ b/clang/test/CodeGen/builtin-cpu-is.c
@@ -6,7 +6,7 @@ extern void a(const char *);
 
 // CHECK: @__cpu_model = external dso_local global { i32, i32, i32, [1 x i32] }
 
-void intel() {
+void intel(void) {
   if (__builtin_cpu_is("intel"))
     a("intel");
 
@@ -14,7 +14,7 @@ void intel() {
   // CHECK: = icmp eq i32 [[LOAD]], 1
 }
 
-void amd() {
+void amd(void) {
   if (__builtin_cpu_is("amd"))
     a("amd");
 
@@ -22,7 +22,7 @@ void amd() {
   // CHECK: = icmp eq i32 [[LOAD]], 2
 }
 
-void atom() {
+void atom(void) {
   if (__builtin_cpu_is("atom"))
     a("atom");
 
@@ -30,7 +30,7 @@ void atom() {
   // CHECK: = icmp eq i32 [[LOAD]], 1
 }
 
-void amdfam10h() {
+void amdfam10h(void) {
   if (__builtin_cpu_is("amdfam10h"))
     a("amdfam10h");
 
@@ -38,7 +38,7 @@ void amdfam10h() {
   // CHECK: = icmp eq i32 [[LOAD]], 4
 }
 
-void barcelona() {
+void barcelona(void) {
   if (__builtin_cpu_is("barcelona"))
     a("barcelona");
 
@@ -46,7 +46,7 @@ void barcelona() {
   // CHECK: = icmp eq i32 [[LOAD]], 4
 }
 
-void nehalem() {
+void nehalem(void) {
   if (__builtin_cpu_is("nehalem"))
     a("nehalem");
 

diff  --git a/clang/test/CodeGen/builtin-cpu-supports.c b/clang/test/CodeGen/builtin-cpu-supports.c
index 761f00cf95721..31e02e2c7b6d8 100644
--- a/clang/test/CodeGen/builtin-cpu-supports.c
+++ b/clang/test/CodeGen/builtin-cpu-supports.c
@@ -7,7 +7,7 @@ extern void a(const char *);
 // CHECK: @__cpu_model = external dso_local global { i32, i32, i32, [1 x i32] }
 // CHECK: @__cpu_features2 = external dso_local global i32
 
-int main() {
+int main(void) {
   __builtin_cpu_init();
 
   // CHECK: call void @__cpu_indicator_init

diff  --git a/clang/test/CodeGen/builtin-expect.c b/clang/test/CodeGen/builtin-expect.c
index c74e6da010ed9..1e7fe9aa88392 100644
--- a/clang/test/CodeGen/builtin-expect.c
+++ b/clang/test/CodeGen/builtin-expect.c
@@ -28,9 +28,9 @@ int expect_not_taken(int x) {
 
 int x;
 int y(void);
-void foo();
+void foo(void);
 
-void expect_value_side_effects() {
+void expect_value_side_effects(void) {
 // ALL-LABEL: define{{.*}} void @expect_value_side_effects()
 // ALL:       [[CALL:%.*]] = call i32 @y
 // O1:        [[SEXT:%.*]] = sext i32 [[CALL]] to i64
@@ -46,12 +46,12 @@ void expect_value_side_effects() {
 // There's no compare, so there's nothing to expect?
 // rdar://9330105
 void isigprocmask(void);
-long bar();
+long bar(void);
 
-int main() {
+int main(void) {
 // ALL-LABEL: define{{.*}} i32 @main()
 // ALL:       call void @isigprocmask()
-// ALL:       [[CALL:%.*]] = call i64 (...) @bar()
+// ALL:       [[CALL:%.*]] = call i64 @bar()
 // O1:        call i64 @llvm.expect.i64(i64 0, i64 [[CALL]])
 // O0-NOT:    @llvm.expect
 

diff  --git a/clang/test/CodeGen/builtin-memfns.c b/clang/test/CodeGen/builtin-memfns.c
index 33e64dc054baf..4470c036a9a37 100644
--- a/clang/test/CodeGen/builtin-memfns.c
+++ b/clang/test/CodeGen/builtin-memfns.c
@@ -84,7 +84,7 @@ void test8(int *arg) {
 }
 
 __attribute((aligned(16))) int x[4], y[4];
-void test9() {
+void test9(void) {
   // CHECK: @test9
   // CHECK: call void @llvm.memcpy{{.*}} align 16 {{.*}} align 16 {{.*}} 16, i1 false)
   __builtin_memcpy(x, y, sizeof(y));
@@ -95,7 +95,7 @@ wchar_t src;
 
 // CHECK-LABEL: @test10
 // FIXME: Consider lowering these to llvm.memcpy / llvm.memmove.
-void test10() {
+void test10(void) {
   // CHECK: call i32* @wmemcpy(i32* noundef @dest, i32* noundef @src, i32 noundef 4)
   __builtin_wmemcpy(&dest, &src, 4);
 
@@ -104,7 +104,7 @@ void test10() {
 }
 
 // CHECK-LABEL: @test11
-void test11() {
+void test11(void) {
   typedef struct { int a; } b;
   int d;
   b e;
@@ -115,7 +115,7 @@ void test11() {
 // CHECK-LABEL: @test12
 extern char dest_array[];
 extern char src_array[];
-void test12() {
+void test12(void) {
   // CHECK: call void @llvm.memcpy{{.*}}(
   memcpy(&dest_array, &dest_array, 2);
 }

diff  --git a/clang/test/CodeGen/builtin-sponentry.c b/clang/test/CodeGen/builtin-sponentry.c
index 46bfa2557a8cd..4c02cbe0f16f1 100644
--- a/clang/test/CodeGen/builtin-sponentry.c
+++ b/clang/test/CodeGen/builtin-sponentry.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple aarch64-windows-gnu -Oz -emit-llvm %s -o - | FileCheck %s
 
-void *test_sponentry() {
+void *test_sponentry(void) {
   return __builtin_sponentry();
 }
 // CHECK-LABEL: define dso_local i8* @test_sponentry()

diff  --git a/clang/test/CodeGen/builtin-unpredictable.c b/clang/test/CodeGen/builtin-unpredictable.c
index b0d5f2f164fa0..13981d223d8ed 100644
--- a/clang/test/CodeGen/builtin-unpredictable.c
+++ b/clang/test/CodeGen/builtin-unpredictable.c
@@ -10,7 +10,7 @@
 extern "C" {
 #endif
 
-void foo();
+void foo(void);
 void branch(int x) {
 // CHECK-LABEL: define{{.*}} void @branch(
 

diff  --git a/clang/test/CodeGen/builtin-unwind-init.c b/clang/test/CodeGen/builtin-unwind-init.c
index 6fa77667bdf7d..be738ace5379a 100644
--- a/clang/test/CodeGen/builtin-unwind-init.c
+++ b/clang/test/CodeGen/builtin-unwind-init.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -emit-llvm < %s -o - | FileCheck %s
 
-void a() { __builtin_unwind_init(); }
+void a(void) { __builtin_unwind_init(); }
 
 // CHECK:  call void @llvm.eh.unwind.init()

diff  --git a/clang/test/CodeGen/builtins-arm-exclusive.c b/clang/test/CodeGen/builtins-arm-exclusive.c
index 56d7798a5e898..c6cf231659ecd 100644
--- a/clang/test/CodeGen/builtins-arm-exclusive.c
+++ b/clang/test/CodeGen/builtins-arm-exclusive.c
@@ -339,7 +339,7 @@ int test_stlex(char *addr) {
   return res;
 }
 
-void test_clrex() {
+void test_clrex(void) {
 // CHECK-LABEL: @test_clrex
 // CHECK-ARM64-LABEL: @test_clrex
 

diff  --git a/clang/test/CodeGen/builtins-arm.c b/clang/test/CodeGen/builtins-arm.c
index b1544a29daf55..de74d78dd0a66 100644
--- a/clang/test/CodeGen/builtins-arm.c
+++ b/clang/test/CodeGen/builtins-arm.c
@@ -2,7 +2,7 @@
 
 #include <stdint.h>
 
-void *f0()
+void *f0(void)
 {
   return __builtin_thread_pointer();
 }
@@ -32,7 +32,7 @@ double test_vcvtrd1(double d) {
   return __builtin_arm_vcvtr_d(d, 1);
 }
 
-void test_eh_return_data_regno()
+void test_eh_return_data_regno(void)
 {
   // CHECK: store volatile i32 0
   // CHECK: store volatile i32 1
@@ -41,42 +41,42 @@ void test_eh_return_data_regno()
   res = __builtin_eh_return_data_regno(1);
 }
 
-void nop() {
+void nop(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 0)
   __builtin_arm_nop();
 }
 
-void yield() {
+void yield(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 1)
   __builtin_arm_yield();
 }
 
-void wfe() {
+void wfe(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 2)
   __builtin_arm_wfe();
 }
 
-void wfi() {
+void wfi(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 3)
   __builtin_arm_wfi();
 }
 
-void sev() {
+void sev(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 4)
   __builtin_arm_sev();
 }
 
-void sevl() {
+void sevl(void) {
   // CHECK: call {{.*}} @llvm.arm.hint(i32 5)
   __builtin_arm_sevl();
 }
 
-void dbg() {
+void dbg(void) {
   // CHECK: call {{.*}} @llvm.arm.dbg(i32 0)
   __builtin_arm_dbg(0);
 }
 
-void test_barrier() {
+void test_barrier(void) {
   //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
   //CHECK: call {{.*}} @llvm.arm.dsb(i32 2)
   //CHECK: call {{.*}} @llvm.arm.isb(i32 3)
@@ -157,28 +157,28 @@ void stc2l(void *i) {
   __builtin_arm_stc2l(1, 2, i);
 }
 
-void cdp() {
+void cdp(void) {
   // CHECK: define{{.*}} void @cdp()
   // CHECK: call void @llvm.arm.cdp(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
   // CHECK-NEXT: ret void
   __builtin_arm_cdp(1, 2, 3, 4, 5, 6);
 }
 
-void cdp2() {
+void cdp2(void) {
   // CHECK: define{{.*}} void @cdp2()
   // CHECK: call void @llvm.arm.cdp2(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
   // CHECK-NEXT: ret void
   __builtin_arm_cdp2(1, 2, 3, 4, 5, 6);
 }
 
-unsigned mrc() {
+unsigned mrc(void) {
   // CHECK: define{{.*}} i32 @mrc()
   // CHECK: [[R:%.*]] = call i32 @llvm.arm.mrc(i32 15, i32 0, i32 13, i32 0, i32 3)
   // CHECK-NEXT: ret i32 [[R]]
   return __builtin_arm_mrc(15, 0, 13, 0, 3);
 }
 
-unsigned mrc2() {
+unsigned mrc2(void) {
   // CHECK: define{{.*}} i32 @mrc2()
   // CHECK: [[R:%.*]] = call i32 @llvm.arm.mrc2(i32 15, i32 0, i32 13, i32 0, i32 3)
   // CHECK-NEXT: ret i32 [[R]]
@@ -209,31 +209,31 @@ void mcrr2(uint64_t a) {
   __builtin_arm_mcrr2(15, 0, a, 0);
 }
 
-uint64_t mrrc() {
+uint64_t mrrc(void) {
   // CHECK: define{{.*}} i64 @mrrc()
   // CHECK: call { i32, i32 } @llvm.arm.mrrc(i32 15, i32 0, i32 0)
   return __builtin_arm_mrrc(15, 0, 0);
 }
 
-uint64_t mrrc2() {
+uint64_t mrrc2(void) {
   // CHECK: define{{.*}} i64 @mrrc2()
   // CHECK: call { i32, i32 } @llvm.arm.mrrc2(i32 15, i32 0, i32 0)
   return __builtin_arm_mrrc2(15, 0, 0);
 }
 
-unsigned rsr() {
+unsigned rsr(void) {
   // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i32 @llvm.read_volatile_register.i32(metadata ![[M0:.*]])
   // CHECK-NEXT: ret i32 [[V0]]
   return __builtin_arm_rsr("cp1:2:c3:c4:5");
 }
 
-unsigned long long rsr64() {
+unsigned long long rsr64(void) {
   // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i64 @llvm.read_volatile_register.i64(metadata ![[M1:.*]])
   // CHECK-NEXT: ret i64 [[V0]]
   return __builtin_arm_rsr64("cp1:2:c3");
 }
 
-void *rsrp() {
+void *rsrp(void) {
   // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i32 @llvm.read_volatile_register.i32(metadata ![[M2:.*]])
   // CHECK-NEXT: [[V1:[%A-Za-z0-9.]+]] = inttoptr i32 [[V0]] to i8*
   // CHECK-NEXT: ret i8* [[V1]]

diff  --git a/clang/test/CodeGen/builtins-arm64.c b/clang/test/CodeGen/builtins-arm64.c
index 9590627d17d4b..a68021b89c106 100644
--- a/clang/test/CodeGen/builtins-arm64.c
+++ b/clang/test/CodeGen/builtins-arm64.c
@@ -30,7 +30,7 @@ uint64_t rbit64(uint64_t a) {
   return __builtin_arm_rbit64(a);
 }
 
-void hints() {
+void hints(void) {
   __builtin_arm_nop();    //CHECK: call {{.*}} @llvm.aarch64.hint(i32 0)
   __builtin_arm_yield();  //CHECK: call {{.*}} @llvm.aarch64.hint(i32 1)
   __builtin_arm_wfe();    //CHECK: call {{.*}} @llvm.aarch64.hint(i32 2)
@@ -39,13 +39,13 @@ void hints() {
   __builtin_arm_sevl();   //CHECK: call {{.*}} @llvm.aarch64.hint(i32 5)
 }
 
-void barriers() {
+void barriers(void) {
   __builtin_arm_dmb(1);  //CHECK: call {{.*}} @llvm.aarch64.dmb(i32 1)
   __builtin_arm_dsb(2);  //CHECK: call {{.*}} @llvm.aarch64.dsb(i32 2)
   __builtin_arm_isb(3);  //CHECK: call {{.*}} @llvm.aarch64.isb(i32 3)
 }
 
-void prefetch() {
+void prefetch(void) {
   __builtin_arm_prefetch(0, 1, 2, 0, 1); // pstl3keep
   // CHECK: call {{.*}} @llvm.prefetch.p0i8(i8* null, i32 1, i32 1, i32 1)
 
@@ -67,7 +67,7 @@ int32_t jcvt(double v) {
 
 __typeof__(__builtin_arm_rsr("1:2:3:4:5")) rsr(void);
 
-uint32_t rsr() {
+uint32_t rsr(void) {
   // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i64 @llvm.read_volatile_register.i64(metadata ![[M0:[0-9]]])
   // CHECK-NEXT: trunc i64 [[V0]] to i32
   return __builtin_arm_rsr("1:2:3:4:5");
@@ -80,7 +80,7 @@ uint64_t rsr64(void) {
   return __builtin_arm_rsr64("1:2:3:4:5");
 }
 
-void *rsrp() {
+void *rsrp(void) {
   // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i64 @llvm.read_volatile_register.i64(metadata ![[M0:[0-9]]])
   // CHECK-NEXT: inttoptr i64 [[V0]] to i8*
   return __builtin_arm_rsrp("1:2:3:4:5");

diff  --git a/clang/test/CodeGen/builtins-riscv.c b/clang/test/CodeGen/builtins-riscv.c
index 31fb572cb2740..9cdce73217537 100644
--- a/clang/test/CodeGen/builtins-riscv.c
+++ b/clang/test/CodeGen/builtins-riscv.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -Wall -Wno-unused-but-set-variable -Werror -triple riscv32 -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
 // RUN: %clang_cc1 -Wall -Wno-unused-but-set-variable -Werror -triple riscv64 -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
 
-void test_eh_return_data_regno() {
+void test_eh_return_data_regno(void) {
   // CHECK: store volatile i32 10
   // CHECK: store volatile i32 11
   volatile int res;

diff  --git a/clang/test/CodeGen/builtins-wasm.c b/clang/test/CodeGen/builtins-wasm.c
index 36b70a8fbbcb2..84ab98971e838 100644
--- a/clang/test/CodeGen/builtins-wasm.c
+++ b/clang/test/CodeGen/builtins-wasm.c
@@ -26,19 +26,19 @@ __SIZE_TYPE__ memory_grow(__SIZE_TYPE__ delta) {
   // WEBASSEMBLY64: call i64 @llvm.wasm.memory.grow.i64(i32 0, i64 %{{.*}})
 }
 
-__SIZE_TYPE__ tls_size() {
+__SIZE_TYPE__ tls_size(void) {
   return __builtin_wasm_tls_size();
   // WEBASSEMBLY32: call i32 @llvm.wasm.tls.size.i32()
   // WEBASSEMBLY64: call i64 @llvm.wasm.tls.size.i64()
 }
 
-__SIZE_TYPE__ tls_align() {
+__SIZE_TYPE__ tls_align(void) {
   return __builtin_wasm_tls_align();
   // WEBASSEMBLY32: call i32 @llvm.wasm.tls.align.i32()
   // WEBASSEMBLY64: call i64 @llvm.wasm.tls.align.i64()
 }
 
-void *tls_base() {
+void *tls_base(void) {
   return __builtin_wasm_tls_base();
   // WEBASSEMBLY: call i8* @llvm.wasm.tls.base()
 }

diff  --git a/clang/test/CodeGen/builtins-x86.c b/clang/test/CodeGen/builtins-x86.c
index e8e42f39c3b8c..fea5ff2d69c41 100644
--- a/clang/test/CodeGen/builtins-x86.c
+++ b/clang/test/CodeGen/builtins-x86.c
@@ -45,7 +45,7 @@ typedef signed long V4LLi __attribute__((vector_size(32)));
 typedef double V4d __attribute__((vector_size(32)));
 typedef float  V8f __attribute__((vector_size(32)));
 
-void f0() {
+void f0(void) {
   signed char         tmp_c;
 //  unsigned char       tmp_Uc;
   signed short        tmp_s;

diff  --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c
index 87cdca01e6230..a5bdb9b3fa1b4 100644
--- a/clang/test/CodeGen/builtins.c
+++ b/clang/test/CodeGen/builtins.c
@@ -16,7 +16,7 @@ void r(char *str, void *ptr) {
 
 int random(void);
 
-int main() {
+int main(void) {
   int N = random();
 #define P(n,args) p(#n #args, __builtin_##n args)
 #define Q(n,args) q(#n #args, __builtin_##n args)
@@ -143,12 +143,12 @@ int main() {
 
 
 
-void foo() {
+void foo(void) {
  __builtin_strcat(0, 0);
 }
 
 // CHECK-LABEL: define{{.*}} void @bar(
-void bar() {
+void bar(void) {
   float f;
   double d;
   long double ld;
@@ -183,7 +183,7 @@ void bar() {
 // CHECK: }
 
 // CHECK-LABEL: define{{.*}} void @test_conditional_bzero
-void test_conditional_bzero() {
+void test_conditional_bzero(void) {
   char dst[20];
   int _sz = 20, len = 20;
   return (_sz
@@ -457,7 +457,7 @@ void test_memory_builtins(int n) {
 }
 
 // CHECK-LABEL: define{{.*}} i64 @test_builtin_readcyclecounter
-long long test_builtin_readcyclecounter() {
+long long test_builtin_readcyclecounter(void) {
   // CHECK: call i64 @llvm.readcyclecounter()
   return __builtin_readcyclecounter();
 }
@@ -473,7 +473,7 @@ void test_builtin_launder(int *p) {
 
 // __warn_memset_zero_len should be NOP, see https://sourceware.org/bugzilla/show_bug.cgi?id=25399
 // CHECK-LABEL: define{{.*}} void @test___warn_memset_zero_len
-void test___warn_memset_zero_len() {
+void test___warn_memset_zero_len(void) {
   // CHECK-NOT: @__warn_memset_zero_len
   __warn_memset_zero_len();
 }
@@ -836,7 +836,7 @@ void test_builtin_os_log_merge_helper1(void *buf, unsigned u, long long ll) {
 // Check that this function doesn't write past the end of array 'buf'.
 
 // CHECK-LABEL: define{{.*}} void @test_builtin_os_log_errno
-void test_builtin_os_log_errno() {
+void test_builtin_os_log_errno(void) {
   // CHECK-NOT: @stacksave
   // CHECK: %[[BUF:.*]] = alloca [4 x i8], align 1
   // CHECK: %[[DECAY:.*]] = getelementptr inbounds [4 x i8], [4 x i8]* %[[BUF]], i64 0, i64 0

diff  --git a/clang/test/CodeGen/c-strings.c b/clang/test/CodeGen/c-strings.c
index d8277eb335765..ce636ea4e1b27 100644
--- a/clang/test/CodeGen/c-strings.c
+++ b/clang/test/CodeGen/c-strings.c
@@ -29,14 +29,14 @@ unsigned char align = 1;
 void bar(const char *);
 
 // CHECK-LABEL: define {{.*}}void @f0()
-void f0() {
+void f0(void) {
   bar("hello");
   // ITANIUM: call {{.*}}void @bar({{.*}} @.str
   // MSABI: call {{.*}}void @bar({{.*}} @"??_C at _05CJBACGMB@hello?$AA@"
 }
 
 // CHECK-LABEL: define {{.*}}void @f1()
-void f1() {
+void f1(void) {
   static char *x = "hello";
   bar(x);
   // CHECK: [[T1:%.*]] = load i8*, i8** @f1.x
@@ -44,14 +44,14 @@ void f1() {
 }
 
 // CHECK-LABEL: define {{.*}}void @f2()
-void f2() {
+void f2(void) {
   static char x[] = "hello";
   bar(x);
   // CHECK: call {{.*}}void @bar({{.*}} @f2.x
 }
 
 // CHECK-LABEL: define {{.*}}void @f3()
-void f3() {
+void f3(void) {
   static char x[8] = "hello";
   bar(x);
   // CHECK: call {{.*}}void @bar({{.*}} @f3.x
@@ -60,7 +60,7 @@ void f3() {
 void gaz(void *);
 
 // CHECK-LABEL: define {{.*}}void @f4()
-void f4() {
+void f4(void) {
   static struct s {
     char *name;
   } x = { "hello" };

diff  --git a/clang/test/CodeGen/call.c b/clang/test/CodeGen/call.c
index eec6e52b72f23..585e755e78d24 100644
--- a/clang/test/CodeGen/call.c
+++ b/clang/test/CodeGen/call.c
@@ -1,12 +1,12 @@
 // RUN: %clang %s -O0 -emit-llvm -S -o - | FileCheck %s
 
 // This should call rb_define_global_function, not rb_f_chop.
-void rb_define_global_function (const char*,void(*)(),int);
-static void rb_f_chop();
-void Init_String() {
+void rb_define_global_function (const char*,void(*)(void),int);
+static void rb_f_chop(void);
+void Init_String(void) {
   rb_define_global_function("chop", rb_f_chop, 0);
 }
-static void rb_f_chop() {
+static void rb_f_chop(void) {
 }
 
 // CHECK: call{{.*}}rb_define_global_function
@@ -15,7 +15,7 @@ static void rb_f_chop() {
 typedef   void (* JSErrorCallback)(void);
 void js_GetErrorMessage(void);
 void JS_ReportErrorNumber(JSErrorCallback errorCallback, ...);
-void Interpret() {
+void Interpret(void) {
   JS_ReportErrorNumber(js_GetErrorMessage, 0);
   
   // CHECK: call {{.*}}void ({{.*}}, ...) @JS_ReportErrorNumber({{.*}}@js_GetErrorMessage
@@ -26,14 +26,14 @@ void Interpret() {
 
 // PR10337
 struct sigaction { int (*_sa_handler)(int); };
-typedef int SigHandler ();
+typedef int SigHandler (void);
 typedef struct sigaction sighandler_cxt;
 SigHandler *rl_set_sighandler(ohandler)
 sighandler_cxt *ohandler;  {
   return 0;
 }
 
-void rl_set_signals() {
+void rl_set_signals(void) {
   SigHandler *oh;
   oh = rl_set_sighandler(0);
 }

diff  --git a/clang/test/CodeGen/callback_annotated.c b/clang/test/CodeGen/callback_annotated.c
index 7b69a4de3897d..1be32dfe94f31 100644
--- a/clang/test/CodeGen/callback_annotated.c
+++ b/clang/test/CodeGen/callback_annotated.c
@@ -34,7 +34,7 @@ static int ThreeInt2Int(int a, int b, int c) {
   return a * b + c;
 }
 
-void foo() {
+void foo(void) {
   broker0(VoidPtr2VoidPtr, 0l);
   broker1(0l, VoidPtr2VoidPtr);
   broker2(foo);

diff  --git a/clang/test/CodeGen/calling-conv-ignored.c b/clang/test/CodeGen/calling-conv-ignored.c
index 15801633a0338..96dac7cf46e82 100644
--- a/clang/test/CodeGen/calling-conv-ignored.c
+++ b/clang/test/CodeGen/calling-conv-ignored.c
@@ -8,7 +8,7 @@ void __stdcall foo_std(const char *lpString1, const char *lpString2);
 void __fastcall foo_fast(const char *lpString1, const char *lpString2);
 void __vectorcall foo_vector(const char *lpString1, const char *lpString2);
 
-void __cdecl bar() {
+void __cdecl bar(void) {
   foo_default(0, 0);
   foo_std(0, 0);
   foo_fast(0, 0);

diff  --git a/clang/test/CodeGen/capture-complex-expr-in-block.c b/clang/test/CodeGen/capture-complex-expr-in-block.c
index 20e078e661507..7880e9d7343bc 100644
--- a/clang/test/CodeGen/capture-complex-expr-in-block.c
+++ b/clang/test/CodeGen/capture-complex-expr-in-block.c
@@ -2,7 +2,7 @@
 // rdar://10033986
 
 typedef void (^BLOCK)(void);
-int main ()
+int main (void)
 {
     _Complex double c;
     BLOCK b =  ^() {

diff  --git a/clang/test/CodeGen/captured-statements-nested.c b/clang/test/CodeGen/captured-statements-nested.c
index c078f72d51b2a..5eb45347e9c5c 100644
--- a/clang/test/CodeGen/captured-statements-nested.c
+++ b/clang/test/CodeGen/captured-statements-nested.c
@@ -94,7 +94,7 @@ void test_nest_captured_stmt(int param, int size, int param_arr[size]) {
   }
 }
 
-void test_nest_block() {
+void test_nest_block(void) {
   __block int x;
   int y;
   ^{

diff  --git a/clang/test/CodeGen/captured-statements.c b/clang/test/CodeGen/captured-statements.c
index 68ff2517be1e8..945faf83ec944 100644
--- a/clang/test/CodeGen/captured-statements.c
+++ b/clang/test/CodeGen/captured-statements.c
@@ -6,11 +6,11 @@
 
 typedef __INTPTR_TYPE__ intptr_t;
 
-int foo();
+int foo(void);
 int global;
 
 // Single statement
-void test1() {
+void test1(void) {
   int i = 0;
   #pragma clang __debug captured
   {
@@ -79,7 +79,7 @@ void test4(intptr_t size, intptr_t vla_arr[size]) {
   // CHECK-3: call void @__captured_stmt
 }
 
-void dont_capture_global() {
+void dont_capture_global(void) {
   static int s;
   extern int e;
   #pragma clang __debug captured

diff  --git a/clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c b/clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c
index 0645fbe9be61b..0f028b41dc2c8 100644
--- a/clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c
+++ b/clang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c
@@ -143,10 +143,10 @@ uint32_t uint32_to_uint32(uint32_t src) {
 // ========================================================================== //
 
 enum a { b = ~2147483647 };
-enum a c();
+enum a c(void);
 void d(int);
-void e();
-void e() {
+void e(void);
+void e(void) {
   enum a f = c();
   d(f);
 }

diff  --git a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c
index 636d33344699c..492d6f737b1cc 100644
--- a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c
+++ b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c
@@ -19,7 +19,7 @@ struct S {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i64 ptrtoint (i32* getelementptr inbounds ([[STRUCT_S:%.*]], %struct.S* null, i32 0, i32 1) to i64)
 //
-uintptr_t get_offset_of_y_naively() {
+uintptr_t get_offset_of_y_naively(void) {
   return ((uintptr_t)(&(((struct S *)0)->y)));
 }
 
@@ -27,7 +27,7 @@ uintptr_t get_offset_of_y_naively() {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    ret i64 4
 //
-uintptr_t get_offset_of_y_via_builtin() {
+uintptr_t get_offset_of_y_via_builtin(void) {
   return __builtin_offsetof(struct S, y);
 }
 

diff  --git a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
index fc0fddce07ba6..99f920011e080 100644
--- a/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
+++ b/clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
@@ -196,7 +196,7 @@ char *nullptr_var(unsigned long offset) {
   return base + offset;
 }
 
-char *nullptr_zero() {
+char *nullptr_zero(void) {
   // CHECK:                             define{{.*}} i8* @nullptr_zero()
   // CHECK-NEXT:                        [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:               br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -213,7 +213,7 @@ char *nullptr_zero() {
   return base + offset;
 }
 
-char *nullptr_one_BAD() {
+char *nullptr_one_BAD(void) {
   // CHECK:                           define{{.*}} i8* @nullptr_one_BAD()
   // CHECK-NEXT:                      [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -231,7 +231,7 @@ char *nullptr_one_BAD() {
   return base + offset;
 }
 
-char *nullptr_allones_BAD() {
+char *nullptr_allones_BAD(void) {
   // CHECK:                           define{{.*}} i8* @nullptr_allones_BAD()
   // CHECK-NEXT:                      [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 false, label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -283,7 +283,7 @@ char *one_var(unsigned long offset) {
   return base + offset;
 }
 
-char *one_zero() {
+char *one_zero(void) {
   // CHECK:                             define{{.*}} i8* @one_zero()
   // CHECK-NEXT:                        [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:               br i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -300,7 +300,7 @@ char *one_zero() {
   return base + offset;
 }
 
-char *one_one_OK() {
+char *one_one_OK(void) {
   // CHECK:                           define{{.*}} i8* @one_one_OK()
   // CHECK-NEXT:                      [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 and (i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -318,7 +318,7 @@ char *one_one_OK() {
   return base + offset;
 }
 
-char *one_allones_BAD() {
+char *one_allones_BAD(void) {
   // CHECK:                           define{{.*}} i8* @one_allones_BAD()
   // CHECK-NEXT:                      [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 and (i1 icmp ne (i8* inttoptr (i64 1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 1 to i8*), i64 -1) to i64), i64 1), i64 1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -370,7 +370,7 @@ char *allones_var(unsigned long offset) {
   return base + offset;
 }
 
-char *allones_zero_OK() {
+char *allones_zero_OK(void) {
   // CHECK:                             define{{.*}} i8* @allones_zero_OK()
   // CHECK-NEXT:                        [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:               br i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -387,7 +387,7 @@ char *allones_zero_OK() {
   return base + offset;
 }
 
-char *allones_one_BAD() {
+char *allones_one_BAD(void) {
   // CHECK: define{{.*}} i8* @allones_one_BAD()
   // CHECK-NEXT: [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 and (i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize
@@ -405,7 +405,7 @@ char *allones_one_BAD() {
   return base + offset;
 }
 
-char *allones_allones_OK() {
+char *allones_allones_OK(void) {
   // CHECK: define{{.*}} i8* @allones_allones_OK()
   // CHECK-NEXT: [[ENTRY:.*]]:
   // CHECK-SANITIZE-C-NEXT:             br i1 and (i1 icmp ne (i8* inttoptr (i64 -1 to i8*), i8* null), i1 icmp ne (i64 add (i64 sub (i64 ptrtoint (i8* getelementptr inbounds (i8, i8* inttoptr (i64 -1 to i8*), i64 -1) to i64), i64 -1), i64 -1), i64 0)), label %[[CONT:.*]], label %[[HANDLER_POINTER_OVERFLOW:[^,]+]],{{.*}} !nosanitize

diff  --git a/clang/test/CodeGen/catch-undef-behavior.c b/clang/test/CodeGen/catch-undef-behavior.c
index c10dd2504073f..b4bf6c5b768d1 100644
--- a/clang/test/CodeGen/catch-undef-behavior.c
+++ b/clang/test/CodeGen/catch-undef-behavior.c
@@ -29,7 +29,7 @@
 
 // PR6805
 // CHECK-COMMON-LABEL: @foo
-void foo() {
+void foo(void) {
   union { int i; } u;
 
   // CHECK-COMMON:      %[[I8PTR:.*]] = bitcast i32* %[[PTR:.*]] to i8*
@@ -168,7 +168,7 @@ int signed_overflow(int a, int b) {
 }
 
 // CHECK-COMMON-LABEL: @no_return
-int no_return() {
+int no_return(void) {
   // Reaching the end of a noreturn function is fine in C.
   // FIXME: If the user explicitly requests -fsanitize=return, we should catch
   //        that here even though it's not undefined behavior.

diff  --git a/clang/test/CodeGen/cfguardtable.c b/clang/test/CodeGen/cfguardtable.c
index c0212aea89e2a..a92e1f6c610c1 100644
--- a/clang/test/CodeGen/cfguardtable.c
+++ b/clang/test/CodeGen/cfguardtable.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -cfguard -emit-llvm %s -o - | FileCheck %s -check-prefix=CFGUARD
 // RUN: %clang_cc1 -ehcontguard -emit-llvm %s -o - | FileCheck %s -check-prefix=EHCONTGUARD
 
-void f() {}
+void f(void) {}
 
 // Check that the cfguard metadata flag gets correctly set on the module.
 // CFGUARDNOCHECKS: !"cfguard", i32 1}

diff  --git a/clang/test/CodeGen/cfi-check-fail.c b/clang/test/CodeGen/cfi-check-fail.c
index 5cf62c0e6b876..00d5c2e42f733 100644
--- a/clang/test/CodeGen/cfi-check-fail.c
+++ b/clang/test/CodeGen/cfi-check-fail.c
@@ -3,7 +3,7 @@
 // RUN:     -fsanitize-trap=cfi-icall,cfi-nvcall -fsanitize-recover=cfi-vcall,cfi-unrelated-cast \
 // RUN:     -emit-llvm -o - %s | FileCheck %s
 
-void caller(void (*f)()) {
+void caller(void (*f)(void)) {
   f();
 }
 

diff  --git a/clang/test/CodeGen/cfi-check-fail2.c b/clang/test/CodeGen/cfi-check-fail2.c
index 988ade30e3a80..2caf9e4bb8a20 100644
--- a/clang/test/CodeGen/cfi-check-fail2.c
+++ b/clang/test/CodeGen/cfi-check-fail2.c
@@ -9,7 +9,7 @@
 // RUN:     -fsanitize=cfi-vcall -fsanitize-ignorelist=%t-all.ignorelist \
 // RUN:     -emit-llvm -o - %s | FileCheck %s
 
-void caller(void (*f)()) {
+void caller(void (*f)(void)) {
   f();
 }
 

diff  --git a/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c b/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c
index a2e9eba09543f..d924b6fe34156 100644
--- a/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c
+++ b/clang/test/CodeGen/cfi-icall-canonical-jump-tables.c
@@ -4,7 +4,7 @@
 void ext(void);
 
 // CHECK: define{{.*}} void @f({{.*}} [[ATTR1:#[0-9]+]]
-void f() {
+void f(void) {
   ext();
 }
 
@@ -12,7 +12,7 @@ void f() {
 // CANON: declare void @ext()
 
 // CHECK: define{{.*}} void @g({{.*}} [[ATTR2:#[0-9]+]]
-__attribute__((cfi_canonical_jump_table)) void g() {}
+__attribute__((cfi_canonical_jump_table)) void g(void) {}
 
 // CHECK: [[ATTR1]] = {
 // CHECK-NOT: "cfi-canonical-jump-table"

diff  --git a/clang/test/CodeGen/cfstring.c b/clang/test/CodeGen/cfstring.c
index f0862b99b43d6..f7c90f77b062e 100644
--- a/clang/test/CodeGen/cfstring.c
+++ b/clang/test/CodeGen/cfstring.c
@@ -13,13 +13,13 @@
 
 #define CFSTR __builtin___CFStringMakeConstantString
 
-void f() {
+void f(void) {
   CFSTR("Hello, World!");
 }
 
 // rdar://6248329
 void *G = CFSTR("yo joe");
 
-void h() {
+void h(void) {
   static void* h = CFSTR("Goodbye, World!");
 }

diff  --git a/clang/test/CodeGen/cfstring2.c b/clang/test/CodeGen/cfstring2.c
index 3d724aaf30bf6..2b89c3fe277c6 100644
--- a/clang/test/CodeGen/cfstring2.c
+++ b/clang/test/CodeGen/cfstring2.c
@@ -5,7 +5,7 @@ typedef const struct __CFString * CFStringRef;
 
 #define CFSTR(x) (CFStringRef) __builtin___CFStringMakeConstantString (x)
 
-void f() {
+void f(void) {
   CFSTR("Hello, World!");
 }
 

diff  --git a/clang/test/CodeGen/char-literal.c b/clang/test/CodeGen/char-literal.c
index c7a2a7bee471f..16126fd5e9772 100644
--- a/clang/test/CodeGen/char-literal.c
+++ b/clang/test/CodeGen/char-literal.c
@@ -3,7 +3,7 @@
 
 #include <stddef.h>
 
-int main() {
+int main(void) {
   // CHECK-C: store i8 97
   // CHECK-CPP0X: store i8 97
   char a = 'a';

diff  --git a/clang/test/CodeGen/cleanup-destslot-simple.c b/clang/test/CodeGen/cleanup-destslot-simple.c
index eabfa47a14e5c..3619b4f6c299a 100644
--- a/clang/test/CodeGen/cleanup-destslot-simple.c
+++ b/clang/test/CodeGen/cleanup-destslot-simple.c
@@ -8,7 +8,7 @@
 // There is no exception to handle here, lifetime.end is not a destructor,
 // so there is no need have cleanup dest slot related code
 // CHECK-LABEL: define{{.*}} i32 @test
-int test() {
+int test(void) {
   int x = 3;
   int *volatile p = &x;
   return *p;

diff  --git a/clang/test/CodeGen/clear_cache.c b/clang/test/CodeGen/clear_cache.c
index 1caa33f6bf556..f12b3c2d33a83 100644
--- a/clang/test/CodeGen/clear_cache.c
+++ b/clang/test/CodeGen/clear_cache.c
@@ -13,7 +13,7 @@ char buffer[32] = "This is a largely unused buffer";
 // CHECK-NEXT:    call void @llvm.clear_cache(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @buffer, i64 1, i64 0))
 // CHECK-NEXT:    ret i32 0
 //
-int main() {
+int main(void) {
   __builtin___clear_cache(buffer, buffer+32);
   return 0;
 }

diff  --git a/clang/test/CodeGen/cmse-clear-arg.c b/clang/test/CodeGen/cmse-clear-arg.c
index 4c7eef82d4562..39caa4cebe260 100644
--- a/clang/test/CodeGen/cmse-clear-arg.c
+++ b/clang/test/CodeGen/cmse-clear-arg.c
@@ -23,7 +23,7 @@ typedef struct T0 {
 void __attribute__((cmse_nonsecure_call)) (*g0)(T0);
 
 T0 t0;
-void f0() { g0(t0); }
+void f0(void) { g0(t0); }
 // CHECK:    define {{.*}} @f0()
 // CHECK-LE: %[[V0:.*]] = and i32 {{.*}}, 1
 // CHECK-BE: %[[V0:.*]] = and i32 {{.*}}, -2147483648
@@ -42,7 +42,7 @@ typedef struct T8 {
 
 T8 t8;
 void __attribute__((cmse_nonsecure_call)) (*g8)(T8);
-void f8() { g8(t8); }
+void f8(void) { g8(t8); }
 // CHECK:    define {{.*}} @f8()
 // CHECK-LE: %[[V0:.*]] = and i32 {{.*}}, -769
 // CHECK-BE: %[[V0:.*]] = and i32 {{.*}}, -12582913
@@ -62,7 +62,7 @@ typedef struct T15 {
 T15 t15;
 
 void __attribute__((cmse_nonsecure_call)) (*g15_0)(T15);
-void f15_0() {
+void f15_0(void) {
   g15_0(t15);
 }
 // CHECK: define {{.*}}@f15_0()
@@ -76,7 +76,7 @@ void f15_0() {
 // CHECK: call {{.*}} void %[[FN]]([2 x i32] %[[R1]])
 
 void __attribute__((cmse_nonsecure_call)) (*g15_1)(int, int, int, T15);
-void f15_1() {
+void f15_1(void) {
   g15_1(0, 1, 2, t15);
 }
 // CHECK: define {{.*}}@f15_1()
@@ -103,7 +103,7 @@ typedef struct T16 {
 T16 t16;
 
 void __attribute__((cmse_nonsecure_call)) (*g16_0)(T16);
-void f16_0() {
+void f16_0(void) {
   g16_0(t16);
 }
 // CHECK: define {{.*}} @f16_0()
@@ -133,7 +133,7 @@ typedef struct T18 {
 T18 t18;
 
 void __attribute__((cmse_nonsecure_call)) (*g18)(T18);
-void f18() {
+void f18(void) {
   g18(t18);
 }
 // CHECK:    define {{.*}} @f18()
@@ -163,7 +163,7 @@ typedef union T19 {
 
 T19 t19;
 void __attribute__((cmse_nonsecure_call)) (*g19)(T19);
-void f19() {
+void f19(void) {
   g19(t19);
 }
 // CHECK:    define {{.*}} @f19()
@@ -180,7 +180,7 @@ typedef struct T20 {
 
 T20 t20;
 void __attribute__((cmse_nonsecure_call)) (*g20)(T20);
-void f20() {
+void f20(void) {
   g20(t20);
 }
 // CHECK: define {{.*}} @f20()

diff  --git a/clang/test/CodeGen/cmse-clear-return.c b/clang/test/CodeGen/cmse-clear-return.c
index 2302579434c4a..904164a158ad6 100644
--- a/clang/test/CodeGen/cmse-clear-return.c
+++ b/clang/test/CodeGen/cmse-clear-return.c
@@ -19,7 +19,7 @@ typedef struct T0 {
 } T0;
 
 T0 t0;
-__attribute__((cmse_nonsecure_entry)) T0 f0() { return t0; }
+__attribute__((cmse_nonsecure_entry)) T0 f0(void) { return t0; }
 // CHECK:    define {{.*}} @f0()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 1
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -2147483648
@@ -32,7 +32,7 @@ typedef struct T1 {
 } T1;
 
 T1 t1;
-__attribute__((cmse_nonsecure_entry)) T1 f1() { return t1; }
+__attribute__((cmse_nonsecure_entry)) T1 f1(void) { return t1; }
 // CHECK:    define {{.*}} @f1()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 2
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 1073741824
@@ -45,7 +45,7 @@ typedef struct T2 {
 } T2;
 
 T2 t2;
-__attribute__((cmse_nonsecure_entry)) T2 f2() { return t2; }
+__attribute__((cmse_nonsecure_entry)) T2 f2(void) { return t2; }
 // CHECK:    define {{.*}} @f2()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 256
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 8388608
@@ -58,7 +58,7 @@ typedef struct T3 {
 } T3;
 
 T3 t3;
-__attribute__((cmse_nonsecure_entry)) T3 f3() { return t3; }
+__attribute__((cmse_nonsecure_entry)) T3 f3(void) { return t3; }
 // CHECK:    define {{.*}} @f3()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 1024
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 2097152
@@ -71,7 +71,7 @@ typedef struct T4 {
 } T4;
 
 T4 t4;
-__attribute__((cmse_nonsecure_entry)) T4 f4() { return t4; }
+__attribute__((cmse_nonsecure_entry)) T4 f4(void) { return t4; }
 // CHECK: define {{.*}} @f4()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 255
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -16777216
@@ -84,7 +84,7 @@ typedef struct T5 {
 } T5;
 
 T5 t5;
-__attribute__((cmse_nonsecure_entry)) T5 f5() { return t5; }
+__attribute__((cmse_nonsecure_entry)) T5 f5(void) { return t5; }
 // CHECK:    define {{.*}} @f5()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 510
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 2139095040
@@ -97,7 +97,7 @@ typedef struct T6 {
 } T6;
 
 T6 t6;
-__attribute__((cmse_nonsecure_entry)) T6 f6() { return t6; }
+__attribute__((cmse_nonsecure_entry)) T6 f6(void) { return t6; }
 // CHECK:    define {{.*}} @f6()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 65534
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 2147418112
@@ -110,7 +110,7 @@ typedef struct T7 {
 } T7;
 
 T7 t7;
-__attribute__((cmse_nonsecure_entry)) T7 f7() { return t7; }
+__attribute__((cmse_nonsecure_entry)) T7 f7(void) { return t7; }
 // CHECK:    define {{.*}} @f7()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 131070
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, 2147450880
@@ -127,7 +127,7 @@ typedef struct T8 {
 } T8;
 
 T8 t8;
-__attribute__((cmse_nonsecure_entry)) T8 f8() { return t8; }
+__attribute__((cmse_nonsecure_entry)) T8 f8(void) { return t8; }
 // CHECK:    define {{.*}} @f8()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, -769
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -12582913
@@ -145,13 +145,13 @@ typedef struct T9 {
 } T9;
 
 T9 t9;
-__attribute__((cmse_nonsecure_entry)) T9 f9() { return t9; }
+__attribute__((cmse_nonsecure_entry)) T9 f9(void) { return t9; }
 // CHECK:    define {{.*}} @f9()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 2047747
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -1057163264
 // CHECK:    ret i32 %[[R]]
 
-T9 f91() { return t9; }
+T9 f91(void) { return t9; }
 // CHECK:  define {{.*}} @f91()
 // CHECK: %[[R:.*]] = load i32
 // CHECK: ret i32 %[[R]]
@@ -164,7 +164,7 @@ typedef struct T10 {
 } T10;
 
 T10 t10;
-__attribute__((cmse_nonsecure_entry)) T10 f10() { return t10; }
+__attribute__((cmse_nonsecure_entry)) T10 f10(void) { return t10; }
 // CHECK: define {{.*}} @f10()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, -65281
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -16711681
@@ -178,7 +178,7 @@ typedef struct T11 {
 } T11;
 
 T11 t11;
-__attribute__((cmse_nonsecure_entry)) T11 f11() { return t11; }
+__attribute__((cmse_nonsecure_entry)) T11 f11(void) { return t11; }
 // CHECK: define {{.*}} @f11()
 // CHECK-LE: %[[R:.*]] = and i32 %{{.*}}, 16777215
 // CHECK-BE: %[[R:.*]] = and i32 %{{.*}}, -256
@@ -191,7 +191,7 @@ typedef struct T12 {
 } T12;
 
 T12 t12;
-__attribute__((cmse_nonsecure_entry)) T12 f12() { return t12; }
+__attribute__((cmse_nonsecure_entry)) T12 f12(void) { return t12; }
 // CHECK:    define {{.*}} @f12()
 // CHECK-LE-OPT:  %[[V0:.*]] = load i24, i24* bitcast (%struct.T12* @t12
 // CHECK-LE-OPT:  %[[R:.*]] = zext i24 %[[V0]] to i32
@@ -210,7 +210,7 @@ typedef struct __attribute__((packed)) T13 {
 } T13;
 
 T13 t13;
-__attribute__((cmse_nonsecure_entry)) T13 f13() { return t13; }
+__attribute__((cmse_nonsecure_entry)) T13 f13(void) { return t13; }
 // CHECK:         define {{.*}} @f13()
 // CHECK-LE-OPT:  %[[V0:.*]] = load i24, i24* bitcast (%struct.T13* @t13
 // CHECK-LE-OPT:  %[[R:.*]] = zext i24 %[[V0]] to i32
@@ -227,7 +227,7 @@ typedef struct __attribute__((packed)) T14 {
 } T14;
 
 T14 t14;
-__attribute__((cmse_nonsecure_entry)) T14 f14() { return t14; }
+__attribute__((cmse_nonsecure_entry)) T14 f14(void) { return t14; }
 // CHECK: define {{.*}} @f14()
 // CHECK: [[R:%.*]] = load
 // CHECK-LE-NOPT-NEXT: [[AND:%.+]] = and i32 [[R]], -1
@@ -246,7 +246,7 @@ typedef struct T17 {
 } T17;
 
 T17 t17;
-__attribute__((cmse_nonsecure_entry)) T17 f17() { return t17; }
+__attribute__((cmse_nonsecure_entry)) T17 f17(void) { return t17; }
 // CHECK:    define {{.*}} @f17()
 // CHECK-LE: %[[R:.*]] = and i32 {{.*}}, -3085
 // CHECK-BE: %[[R:.*]] = and i32 {{.*}}, -808452097
@@ -257,11 +257,11 @@ typedef struct T21 {
 } T21;
 
 T21 t21;
-__attribute__((cmse_nonsecure_entry)) T21 f21() { return t21; }
+__attribute__((cmse_nonsecure_entry)) T21 f21(void) { return t21; }
 // CHECK:      define {{.*}} @f21()
 // CHECK-SOFT: ret i32
 // CHECK-HARD: ret %struct.T21
 
-__attribute__((cmse_nonsecure_entry)) float f22() { return 1.0f; }
+__attribute__((cmse_nonsecure_entry)) float f22(void) { return 1.0f; }
 // CHECK: define {{.*}} @f22()
 // CHECK: ret float

diff  --git a/clang/test/CodeGen/code-coverage-filter.c b/clang/test/CodeGen/code-coverage-filter.c
index 5186dadcd804c..9248ab5b1c8d0 100644
--- a/clang/test/CodeGen/code-coverage-filter.c
+++ b/clang/test/CodeGen/code-coverage-filter.c
@@ -18,7 +18,7 @@
 #include "Inputs/code-coverage-filter1.h"
 #include "Inputs/code-coverage-filter2.h"
 
-void test() {
+void test(void) {
   test1();
   test2();
 }

diff  --git a/clang/test/CodeGen/code-coverage-tsan.c b/clang/test/CodeGen/code-coverage-tsan.c
index 5a48232a4c0bc..e69c1760f673d 100644
--- a/clang/test/CodeGen/code-coverage-tsan.c
+++ b/clang/test/CodeGen/code-coverage-tsan.c
@@ -9,4 +9,4 @@
 // CHECK-NEXT:    atomicrmw sub i32*
 
 _Atomic(int) cnt;
-void foo() { cnt--; }
+void foo(void) { cnt--; }

diff  --git a/clang/test/CodeGen/coff-aarch64-type-sizes.c b/clang/test/CodeGen/coff-aarch64-type-sizes.c
index 20c557c85952d..f8286618fc8f7 100644
--- a/clang/test/CodeGen/coff-aarch64-type-sizes.c
+++ b/clang/test/CodeGen/coff-aarch64-type-sizes.c
@@ -3,77 +3,77 @@
 // CHECK: target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"
 // CHECK: target triple = "aarch64-unknown-windows-msvc"
 
-int check_short() {
+int check_short(void) {
   return sizeof(short);
 // CHECK: ret i32 2
 }
 
-int check_int() {
+int check_int(void) {
   return sizeof(int);
 // CHECK: ret i32 4
 }
 
-int check_long() {
+int check_long(void) {
   return sizeof(long);
 // CHECK: ret i32 4
 }
 
-int check_longlong() {
+int check_longlong(void) {
   return sizeof(long long);
 // CHECK: ret i32 8
 }
 
-int check_int128() {
+int check_int128(void) {
   return sizeof(__int128);
 // CHECK: ret i32 16
 }
 
-int check_fp16() {
+int check_fp16(void) {
   return sizeof(__fp16);
 // CHECK: ret i32 2
 }
 
-int check_float() {
+int check_float(void) {
   return sizeof(float);
 // CHECK: ret i32 4
 }
 
-int check_double() {
+int check_double(void) {
   return sizeof(double);
 // CHECK: ret i32 8
 }
 
-int check_longdouble() {
+int check_longdouble(void) {
   return sizeof(long double);
 // CHECK: ret i32 8
 }
 
-int check_floatComplex() {
+int check_floatComplex(void) {
   return sizeof(float _Complex);
 // CHECK: ret i32 8
 }
 
-int check_doubleComplex() {
+int check_doubleComplex(void) {
   return sizeof(double _Complex);
 // CHECK: ret i32 16
 }
 
-int check_longdoubleComplex() {
+int check_longdoubleComplex(void) {
   return sizeof(long double _Complex);
 // CHECK: ret i32 16
 }
 
-int check_bool() {
+int check_bool(void) {
   return sizeof(_Bool);
 // CHECK: ret i32 1
 }
 
-int check_wchar() {
+int check_wchar(void) {
   return sizeof(__WCHAR_TYPE__);
 // CHECK: ret i32 2
 }
 
-int check_wchar_unsigned() {
+int check_wchar_unsigned(void) {
   return (__WCHAR_TYPE__)-1 > (__WCHAR_TYPE__)0;
 // CHECK: ret i32 1
 }
@@ -82,7 +82,7 @@ enum Small {
   Item
 };
 
-int foo() {
+int foo(void) {
   return sizeof(enum Small);
 // CHECK: ret i32 4
 }

diff  --git a/clang/test/CodeGen/complex-builtins-3.c b/clang/test/CodeGen/complex-builtins-3.c
index 09219cfb9d4ec..131c160b6ce74 100644
--- a/clang/test/CodeGen/complex-builtins-3.c
+++ b/clang/test/CodeGen/complex-builtins-3.c
@@ -20,7 +20,7 @@ extern void abort (void);
 extern void link_error (void);
 
 int
-main ()
+main (void)
 {
   /* For each type, test both runtime and compile time (constant folding)
      optimization.  */

diff  --git a/clang/test/CodeGen/complex-strictfp.c b/clang/test/CodeGen/complex-strictfp.c
index b1eff08640118..5e47a637d62a2 100644
--- a/clang/test/CodeGen/complex-strictfp.c
+++ b/clang/test/CodeGen/complex-strictfp.c
@@ -29,7 +29,7 @@ double D;
 // CHECK-NEXT:    store float [[CONV3]], float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 1), align 4
 // CHECK-NEXT:    ret void
 //
-void test3a() {
+void test3a(void) {
   cf += D;
 }
 
@@ -44,7 +44,7 @@ void test3a() {
 // CHECK-NEXT:    store double [[ADD_R]], double* @D, align 8
 // CHECK-NEXT:    ret void
 //
-void test3b() {
+void test3b(void) {
   D += cf;
 }
 
@@ -65,7 +65,7 @@ void test3b() {
 // CHECK-NEXT:    store float [[CONV3]], float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 1), align 4
 // CHECK-NEXT:    ret void
 //
-void test3c() {
+void test3c(void) {
   cf /= g1;
 }
 
@@ -79,7 +79,7 @@ void test3c() {
 // CHECK-NEXT:    store double [[G1_IMAG]], double* getelementptr inbounds ({ double, double }, { double, double }* @g1, i32 0, i32 1), align 8
 // CHECK-NEXT:    ret void
 //
-void test3d() {
+void test3d(void) {
   g1 = g1 + D;
 }
 
@@ -93,7 +93,7 @@ void test3d() {
 // CHECK-NEXT:    store double [[G1_IMAG]], double* getelementptr inbounds ({ double, double }, { double, double }* @g1, i32 0, i32 1), align 8
 // CHECK-NEXT:    ret void
 //
-void test3e() {
+void test3e(void) {
   g1 = D + g1;
 }
 
@@ -103,7 +103,7 @@ void test3e() {
 // CHECK-NEXT:    store float [[CONV]], float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 0), align 4
 // CHECK-NEXT:    ret void
 //
-void t1() {
+void t1(void) {
   (__real__ cf) = 4.0;
 }
 
@@ -113,7 +113,7 @@ void t1() {
 // CHECK-NEXT:    store float [[CONV]], float* getelementptr inbounds ({ float, float }, { float, float }* @cf, i32 0, i32 1), align 4
 // CHECK-NEXT:    ret void
 //
-void t2() {
+void t2(void) {
   (__imag__ cf) = 4.0;
 }
 
@@ -132,7 +132,7 @@ void t2() {
 // CHECK-NEXT:    [[COND_I:%.*]] = phi double [ 0.000000e+00, [[COND_TRUE]] ], [ 0.000000e+00, [[COND_FALSE]] ]
 // CHECK-NEXT:    ret void
 //
-void t91() {
+void t91(void) {
   // Check for proper type promotion of conditional expression
   char c[(int)(sizeof(typeof((0 ? 2.0f : (_Complex double) 2.0f))) - sizeof(_Complex double))];
   // Check for proper codegen
@@ -154,7 +154,7 @@ void t91() {
 // CHECK-NEXT:    [[COND_I:%.*]] = phi double [ 0.000000e+00, [[COND_TRUE]] ], [ 0.000000e+00, [[COND_FALSE]] ]
 // CHECK-NEXT:    ret void
 //
-void t92() {
+void t92(void) {
   // Check for proper type promotion of conditional expression
   char c[(int)(sizeof(typeof((0 ? (_Complex double) 2.0f : 2.0f))) - sizeof(_Complex double))];
   // Check for proper codegen

diff  --git a/clang/test/CodeGen/complex.c b/clang/test/CodeGen/complex.c
index 1c0e7cb2ee950..ace60ed0a6b68 100644
--- a/clang/test/CodeGen/complex.c
+++ b/clang/test/CodeGen/complex.c
@@ -23,7 +23,7 @@ _Complex double g1, g2;
 _Complex float cf;
 double D;
 
-void test3() {
+void test3(void) {
   g1 = g1 + g2;
   g1 = g1 - g2;
   g1 = g1 * g2;
@@ -41,7 +41,7 @@ void test3() {
 __complex__ int ci1, ci2;
 __complex__ short cs;
 int i;
-void test3int() {
+void test3int(void) {
   ci1 = ci1 + ci2;
   ci1 = ci1 - ci2;
   ci1 = ci1 * ci2;
@@ -56,27 +56,27 @@ void test3int() {
   ci1 = i + ci1;
 }
 
-void t1() {
+void t1(void) {
   (__real__ cf) = 4.0;
 }
 
-void t2() {
+void t2(void) {
   (__imag__ cf) = 4.0;
 }
 
 // PR1960
-void t3() {
+void t3(void) {
   __complex__ long long v = 2;
 }
 
 // PR3131
-float _Complex t4();
+float _Complex t4(void);
 
-void t5() {
+void t5(void) {
   float _Complex x = t4();
 }
 
-void t6() {
+void t6(void) {
   g1++;
   g1--;
   ++g1;
@@ -92,22 +92,22 @@ double t7(double _Complex c) {
   return __builtin_fabs(__real__(c));
 }
 
-void t8() {
+void t8(void) {
   __complex__ int *x = &(__complex__ int){1};
 }
 
 const _Complex double test9const = 0;
-_Complex double test9func() { return test9const; }
+_Complex double test9func(void) { return test9const; }
 
 // D6217
-void t91() {
+void t91(void) {
   // Check for proper type promotion of conditional expression
   char c[(int)(sizeof(typeof((0 ? 2.0f : (_Complex double) 2.0f))) - sizeof(_Complex double))];
   // Check for proper codegen
   (0 ? 2.0f : (_Complex double) 2.0f);
 }
 
-void t92() {
+void t92(void) {
   // Check for proper type promotion of conditional expression
   char c[(int)(sizeof(typeof((0 ? (_Complex double) 2.0f : 2.0f))) - sizeof(_Complex double))];
   // Check for proper codegen

diff  --git a/clang/test/CodeGen/compound-assign-overflow.c b/clang/test/CodeGen/compound-assign-overflow.c
index 92ae249eb9ff4..d816dfe63049a 100644
--- a/clang/test/CodeGen/compound-assign-overflow.c
+++ b/clang/test/CodeGen/compound-assign-overflow.c
@@ -12,21 +12,21 @@
 int32_t x;
 
 // CHECK: @compaddsigned
-void compaddsigned() {
+void compaddsigned(void) {
 #line 100
   x += ((int32_t)1);
   // CHECK: @__ubsan_handle_add_overflow(i8* bitcast ({{.*}} @[[LINE_100]] to i8*), {{.*}})
 }
 
 // CHECK: @compaddunsigned
-void compaddunsigned() {
+void compaddunsigned(void) {
 #line 200
   x += ((uint32_t)1U);
   // CHECK: @__ubsan_handle_add_overflow(i8* bitcast ({{.*}} @[[LINE_200]] to i8*), {{.*}})
 }
 
 // CHECK: @compdiv
-void compdiv() {
+void compdiv(void) {
 #line 300
   x /= x;
   // CHECK: @__ubsan_handle_divrem_overflow(i8* bitcast ({{.*}} @[[LINE_300]] to i8*), {{.*}})

diff  --git a/clang/test/CodeGen/compound-literal.c b/clang/test/CodeGen/compound-literal.c
index 6def0b8c68c21..149d0ea650ba5 100644
--- a/clang/test/CodeGen/compound-literal.c
+++ b/clang/test/CodeGen/compound-literal.c
@@ -16,14 +16,14 @@ v4i32 *y = &(v4i32){1,2,3,4};
 // CHECK: @compound_array ={{.*}} global [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
 int compound_array[] = __extension__(__builtin_choose_expr(0, 0, _Generic(1, int: (int[]){1, 2, 3, 4, 5, 6, 7, 8})));
 
-void xxx() {
+void xxx(void) {
 int* a = &(int){1};
 struct s {int a, b, c;} * b = &(struct s) {1, 2, 3};
 _Complex double * x = &(_Complex double){1.0f};
 }
 
 // CHECK-LABEL: define{{.*}} void @f()
-void f() {
+void f(void) {
   typedef struct S { int x,y; } S;
   // CHECK: [[S:%[a-zA-Z0-9.]+]] = alloca [[STRUCT:%[a-zA-Z0-9.]+]],
   struct S s;
@@ -80,7 +80,7 @@ struct G g(int x, int y, int z) {
 // We had a bug where we'd emit a new GlobalVariable for each time we used a
 // const pointer to a variable initialized by a compound literal.
 // CHECK-LABEL: define{{.*}} i32 @compareMyCLH() #0
-int compareMyCLH() {
+int compareMyCLH(void) {
   // CHECK: store i8* bitcast ([[MY_CLH]] to i8*)
   const void *a = MyCLH;
   // CHECK: store i8* bitcast ([[MY_CLH]] to i8*)
@@ -93,7 +93,7 @@ int compareMyCLH() {
 // CHECK-LABEL: define{{.*}} i32 @compound_array_fn()
 // CHECK: [[COMPOUND_ARRAY:%.*]] = alloca [8 x i32]
 // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}, i64 32, i1 false)
-int compound_array_fn() {
+int compound_array_fn(void) {
   int compound_array[] = (int[]){1,2,3,4,5,6,7,8};
   return compound_array[0];
 }

diff  --git a/clang/test/CodeGen/compound.c b/clang/test/CodeGen/compound.c
index 960b2e8b04b8f..b21f0dc43abf1 100644
--- a/clang/test/CodeGen/compound.c
+++ b/clang/test/CodeGen/compound.c
@@ -3,7 +3,7 @@ int A;
 long long B;
 int C;
 int *P;
-void test1() {
+void test1(void) {
   C = (A /= B);
 
   P -= 4;

diff  --git a/clang/test/CodeGen/conditional-gnu-ext.c b/clang/test/CodeGen/conditional-gnu-ext.c
index 2e32d3a01669a..55141014ebce8 100644
--- a/clang/test/CodeGen/conditional-gnu-ext.c
+++ b/clang/test/CodeGen/conditional-gnu-ext.c
@@ -11,8 +11,8 @@ float test(float x, int Y) {
 }
 
 // rdar://8446940
-extern void abort();
-void  test1 () {
+extern void abort(void);
+void  test1 (void) {
   char x[1];
   char *y = x ? : 0;
 
@@ -28,7 +28,7 @@ _Complex int getComplex(_Complex int val) {
   return val;
 }
 
-_Complex int complx() {
+_Complex int complx(void) {
     _Complex int cond;
     _Complex int rhs;
 

diff  --git a/clang/test/CodeGen/conditional.c b/clang/test/CodeGen/conditional.c
index 88538a2042a76..6f235e8a24727 100644
--- a/clang/test/CodeGen/conditional.c
+++ b/clang/test/CodeGen/conditional.c
@@ -8,41 +8,41 @@ double test2(int cond, float a, double b) {
   return cond ? a : b;
 }
 
-void f();
+void f(void);
 
-void test3(){
+void test3(void){
    1 ? f() : (void)0;
 }
 
-void test4() {
+void test4(void) {
   int i; short j;
   float* k = 1 ? &i : &j;
 }
 
-void test5() {
+void test5(void) {
   const int* cip;
   void* vp;
   cip = 0 ? vp : cip;
 }
 
-void test6();
+void test6(void);
 void test7(int);
-void* test8() {return 1 ? test6 : test7;}
+void* test8(void) {return 1 ? test6 : test7;}
 
 
 void _efree(void *ptr);
 
-void _php_stream_free3() {
+void _php_stream_free3(void) {
   (1 ? free(0) : _efree(0));
 }
 
-void _php_stream_free4() {
+void _php_stream_free4(void) {
   1 ? _efree(0) : free(0);
 }
 
 // PR5526
 struct test9 { int a; };
-void* test9spare();
+void* test9spare(void);
 void test9(struct test9 *p) {
   p ? p : test9spare();
 }
@@ -69,6 +69,6 @@ double test12(int c) {
 // CHECK: @test13
 // CHECK: call {{.*}} @f2(
 int f2(void);
-void test13() {
+void test13(void) {
   f2() ? (void)0 : (void)0;
 }

diff  --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
index 7a0818a78a0a6..443e5b9dc2724 100644
--- a/clang/test/CodeGen/const-init.c
+++ b/clang/test/CodeGen/const-init.c
@@ -12,7 +12,7 @@ char a2[2][5] = { "asdf" };
 // Double-implicit-conversions of array/functions (not legal C, but
 // clang accepts it for gcc compat).
 intptr_t b = a; // expected-warning {{incompatible pointer to integer conversion}}
-int c();
+int c(void);
 void *d = c;
 intptr_t e = c; // expected-warning {{incompatible pointer to integer conversion}}
 
@@ -67,7 +67,7 @@ struct {
 
 // Global references
 // CHECK: @g11.l0 = internal global i32 ptrtoint (i32 ()* @g11 to i32)
-long g11() { 
+long g11(void) { 
   static long l0 = (long) g11;
   return l0; 
 }
@@ -123,17 +123,17 @@ struct g23 g24 = {1,2,3,4};
 
 // CHECK: @g25.g26 = internal global i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[FUNC:.*]], i32 0, i32 0)
 // CHECK: @[[FUNC]] = private unnamed_addr constant [4 x i8] c"g25\00"
-int g25() {
+int g25(void) {
   static const char *g26 = __func__;
   return *g26;
 }
 
 // CHECK: @g27.x = internal global i8* bitcast (i8** @g27.x to i8*), align 4
-void g27() { // PR8073
+void g27(void) { // PR8073
   static void *x = &x;
 }
 
-void g28() {
+void g28(void) {
   typedef long long v1i64 __attribute((vector_size(8)));
   typedef short v12i16 __attribute((vector_size(24)));
   typedef long double v2f80 __attribute((vector_size(24)));
@@ -146,7 +146,7 @@ void g28() {
 }
 
 // PR13643
-void g29() {
+void g29(void) {
   typedef char DCC_PASSWD[2];
   typedef struct
   {
@@ -161,7 +161,7 @@ void g29() {
 }
 
 // PR21300
-void g30() {
+void g30(void) {
 #pragma pack(1)
   static struct {
     int : 1;
@@ -171,7 +171,7 @@ void g30() {
 #pragma pack()
 }
 
-void g31() {
+void g31(void) {
 #pragma pack(4)
   static struct {
     short a;

diff  --git a/clang/test/CodeGen/const-label-addr.c b/clang/test/CodeGen/const-label-addr.c
index e606c3b2cda2f..4c98631e1a4a2 100644
--- a/clang/test/CodeGen/const-label-addr.c
+++ b/clang/test/CodeGen/const-label-addr.c
@@ -2,13 +2,13 @@
 // REQUIRES: asserts
 
 // CHECK: @a.a = internal global i8* blockaddress(@a, %A)
-int a() {
+int a(void) {
 A:;static void* a = &&A;
 }
 
 // PR14005
 // CHECK: @b.ar = internal global {{.*}} sub (i{{..}} ptrtoint (i8* blockaddress(@b, %l2) to i{{..}}), i{{..}} ptrtoint (i8* blockaddress(@b, %l1) to i{{..}}))
-int b() {
+int b(void) {
   static int ar = &&l2 - &&l1;
 l1:
   return 10;

diff  --git a/clang/test/CodeGen/const-unordered-compare.c b/clang/test/CodeGen/const-unordered-compare.c
index ffd04db6f8621..6a219822b270b 100644
--- a/clang/test/CodeGen/const-unordered-compare.c
+++ b/clang/test/CodeGen/const-unordered-compare.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
 
 // Checks folding of an unordered comparison
-int nan_ne_check() {
+int nan_ne_check(void) {
   // CHECK: ret i32 1
   return (__builtin_nanf("") != __builtin_nanf("")) ? 1 : 0;
 }

diff  --git a/clang/test/CodeGen/constantexpr-fneg.c b/clang/test/CodeGen/constantexpr-fneg.c
index 57f6164375166..68586ef037263 100644
--- a/clang/test/CodeGen/constantexpr-fneg.c
+++ b/clang/test/CodeGen/constantexpr-fneg.c
@@ -15,6 +15,6 @@
 
 int a[], b;
 float *c;
-int main() {
+int main(void) {
   return -(*c = &b != a);
 }

diff  --git a/clang/test/CodeGen/constructor-attribute.c b/clang/test/CodeGen/constructor-attribute.c
index 491ec6f8f2e31..62587a622a47f 100644
--- a/clang/test/CodeGen/constructor-attribute.c
+++ b/clang/test/CodeGen/constructor-attribute.c
@@ -14,9 +14,9 @@
 // CHECK: define internal void @G()
 // CHECK: define{{.*}} i32 @__GLOBAL_init_789(i32 noundef %{{.*}})
 // CHECK: define internal void @C()
+// CHECK: define internal i32 @foo()
 // CHECK: define internal void @D()
 // CHECK: define{{.*}} i32 @main()
-// CHECK: define internal i32 @foo()
 // WITHOUTATEXIT-NOT: define
 
 // CXAATEXIT: define internal void @__GLOBAL_init_123(){{.*}}section "__TEXT,__StaticInit,regular,pure_instructions" !dbg ![[GLOBAL_INIT_SP:.*]] {
@@ -38,28 +38,28 @@
 
 int printf(const char *, ...);
 
-void A() __attribute__((constructor));
-void B() __attribute__((destructor));
+void A(void) __attribute__((constructor));
+void B(void) __attribute__((destructor));
 
-void A() {
+void A(void) {
   printf("A\n");
 }
 
-void B() {
+void B(void) {
   printf("B\n");
 }
 
-static void C() __attribute__((constructor));
+static void C(void) __attribute__((constructor));
 
-static void D() __attribute__((destructor));
+static void D(void) __attribute__((destructor));
 
-static __attribute__((destructor(123))) void E() {
+static __attribute__((destructor(123))) void E(void) {
 }
 
-static __attribute__((destructor(789))) void F() {
+static __attribute__((destructor(789))) void F(void) {
 }
 
-static __attribute__((destructor(123))) void G() {
+static __attribute__((destructor(123))) void G(void) {
 }
 
 // Test that this function doesn't collide with the synthesized constructor
@@ -68,19 +68,19 @@ int __GLOBAL_init_789(int a) {
   return a * a;
 }
 
-static int foo() {
+static int foo(void) {
   return 10;
 }
 
-static void C() {
+static void C(void) {
   printf("A: %d\n", foo());
 }
 
-static void D() {
+static void D(void) {
   printf("B\n");
 }
 
-int main() {
+int main(void) {
   return 0;
 }
 

diff  --git a/clang/test/CodeGen/convergent-functions.cpp b/clang/test/CodeGen/convergent-functions.cpp
index cb8682474f931..7290c505ec6fe 100644
--- a/clang/test/CodeGen/convergent-functions.cpp
+++ b/clang/test/CodeGen/convergent-functions.cpp
@@ -7,4 +7,4 @@
 // NOCONVFUNC-NOT: convergent
 // CONVFUNC-SAME: convergent
 // CHECK-SAME: }
-void func() { }
+void func(void) { }

diff  --git a/clang/test/CodeGen/coverage-compilation-dir.c b/clang/test/CodeGen/coverage-compilation-dir.c
index dc4c15f2f3719..ee8a3d90dc886 100644
--- a/clang/test/CodeGen/coverage-compilation-dir.c
+++ b/clang/test/CodeGen/coverage-compilation-dir.c
@@ -4,4 +4,4 @@
 
 // CHECK-NONSENSE: nonsense
 
-void f() {}
+void f(void) {}

diff  --git a/clang/test/CodeGen/dbg-const-int128.c b/clang/test/CodeGen/dbg-const-int128.c
index 0af788e26304e..c780c8f4ffe60 100644
--- a/clang/test/CodeGen/dbg-const-int128.c
+++ b/clang/test/CodeGen/dbg-const-int128.c
@@ -6,4 +6,4 @@
 static const __uint128_t ro = 18446744073709551615;
 
 void bar(__uint128_t);
-void foo() { bar(ro); }
+void foo(void) { bar(ro); }

diff  --git a/clang/test/CodeGen/debug-info-abspath.c b/clang/test/CodeGen/debug-info-abspath.c
index b20ed317d7d4a..b2047a7deb0e0 100644
--- a/clang/test/CodeGen/debug-info-abspath.c
+++ b/clang/test/CodeGen/debug-info-abspath.c
@@ -16,7 +16,7 @@
 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
 // RUN:   %s -emit-llvm -o - | FileCheck %s --check-prefix=CURDIR
 
-void foo() {}
+void foo(void) {}
 
 // Since %s is an absolute path, directory should be the common
 // prefix, but the directory part should be part of the filename.

diff  --git a/clang/test/CodeGen/debug-info-block-decl.c b/clang/test/CodeGen/debug-info-block-decl.c
index e45a2d8ad474d..900592200384d 100644
--- a/clang/test/CodeGen/debug-info-block-decl.c
+++ b/clang/test/CodeGen/debug-info-block-decl.c
@@ -7,7 +7,7 @@
 // CHECK: define {{.*}} @__main_block_invoke
 // CHECK: , !dbg ![[BLOCK_ENTRY:[0-9]+]]
 
-int main()
+int main(void)
 {
 // CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
 // CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],

diff  --git a/clang/test/CodeGen/debug-info-block-expr.c b/clang/test/CodeGen/debug-info-block-expr.c
index 5626c5c33a4fb..6ca8a826cacfd 100644
--- a/clang/test/CodeGen/debug-info-block-expr.c
+++ b/clang/test/CodeGen/debug-info-block-expr.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // RUN: %clang_cc1 -DDEAD_CODE -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 
-typedef void (^BlockTy)();
+typedef void (^BlockTy)(void);
 void escapeFunc(BlockTy);
-typedef void (^BlockTy)();
+typedef void (^BlockTy)(void);
 void noEscapeFunc(__attribute__((noescape)) BlockTy);
 
 // Verify that the desired DIExpression are generated for escaping (i.e, not
 // 'noescape') blocks.
-void test_escape_func() {
+void test_escape_func(void) {
 // CHECK-LABEL: void @test_escape_func
 // CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[ESCAPE_VAR:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
   __block int escape_var;
@@ -20,7 +20,7 @@ void test_escape_func() {
 }
 
 // Verify that the desired DIExpression are generated for noescape blocks.
-void test_noescape_func() {
+void test_noescape_func(void) {
 // CHECK-LABEL: void @test_noescape_func
 // CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[NOESCAPE_VAR:[0-9]+]], metadata !DIExpression())
   __block int noescape_var;
@@ -28,7 +28,7 @@ void test_noescape_func() {
 }
 
 // Verify that the desired DIExpression are generated for blocks.
-void test_local_block() {
+void test_local_block(void) {
 // CHECK-LABEL: void @test_local_block
 // CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[BLOCK_VAR:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
   __block int block_var;
@@ -40,7 +40,7 @@ void test_local_block() {
 
 // Verify that the desired DIExpression are generated for __block vars not used
 // in any block.
-void test_unused() {
+void test_unused(void) {
 // CHECK-LABEL: void @test_unused
 // CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[UNUSED_VAR:[0-9]+]], metadata !DIExpression())
   __block int unused_var;

diff  --git a/clang/test/CodeGen/debug-info-block-vars.c b/clang/test/CodeGen/debug-info-block-vars.c
index 05758a6cfc72e..6837ebcd55594 100644
--- a/clang/test/CodeGen/debug-info-block-vars.c
+++ b/clang/test/CodeGen/debug-info-block-vars.c
@@ -13,7 +13,7 @@
 // CHECK-OPT-NOT: alloca
 // CHECK-OPT: call void @llvm.dbg.value(metadata i8* %.block_descriptor,
 // CHECK-OPT-SAME:                      metadata !DIExpression())
-void f() {
+void f(void) {
   a(^{
     b();
   });

diff  --git a/clang/test/CodeGen/debug-info-block.c b/clang/test/CodeGen/debug-info-block.c
index d23095ba43e99..a4b8fde1c74fe 100644
--- a/clang/test/CodeGen/debug-info-block.c
+++ b/clang/test/CodeGen/debug-info-block.c
@@ -10,7 +10,7 @@
 // CHECK: ![[FPEL1]] = {{.*}}"__FuncPtr", {{.*}}, baseType: ![[FPTY1:[0-9]+]]
 // CHECK: ![[FPTY1]] = {{.*}}baseType: ![[FNTY1:[0-9]+]]
 // CHECK: ![[FNTY1]] = !DISubroutineType(types: ![[VOIDVOID:[0-9]+]])
-// CHECK: ![[VOIDVOID]] = !{null, null}
+// CHECK: ![[VOIDVOID]] = !{null}
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
 // CHECK-NOT:              line
 // CHECK-SAME:            )
@@ -24,6 +24,6 @@
 // CHECK: ![[FNTY2]] = !DISubroutineType(types: ![[INTINT:[0-9]+]])
 // CHECK: ![[INTINT]] = !{![[INT]], ![[INT]]}
 struct inStruct {
-  void (^voidBlockPtr)();
+  void (^voidBlockPtr)(void);
   int (^intBlockPtr)(int);
 } is;

diff  --git a/clang/test/CodeGen/debug-info-codeview-buildinfo.c b/clang/test/CodeGen/debug-info-codeview-buildinfo.c
index 93810e829c6d9..2c82ee83d12bf 100644
--- a/clang/test/CodeGen/debug-info-codeview-buildinfo.c
+++ b/clang/test/CodeGen/debug-info-codeview-buildinfo.c
@@ -4,7 +4,7 @@
 // RUN: %clang_cl --target=i686-windows-msvc /c /Z7 /Fo%t.obj -fdebug-compilation-dir=. -- %s
 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s --check-prefix RELATIVE
 
-int main() { return 42; }
+int main(void) { return 42; }
 
 // CHECK:                       Types (.debug$T)
 // CHECK: ============================================================

diff  --git a/clang/test/CodeGen/debug-info-codeview-heapallocsite.c b/clang/test/CodeGen/debug-info-codeview-heapallocsite.c
index 3ddce910aba13..e91dd250f0aed 100644
--- a/clang/test/CodeGen/debug-info-codeview-heapallocsite.c
+++ b/clang/test/CodeGen/debug-info-codeview-heapallocsite.c
@@ -3,10 +3,10 @@
 struct Foo;
 struct Bar;
 
-__declspec(allocator) void *alloc_void();
-__declspec(allocator) struct Foo *alloc_foo();
+__declspec(allocator) void *alloc_void(void);
+__declspec(allocator) struct Foo *alloc_foo(void);
 
-void call_alloc() {
+void call_alloc(void) {
   struct Foo *p = alloc_void();
   struct Foo *w = alloc_foo();
   struct Foo *q = (struct Foo*)alloc_void();

diff  --git a/clang/test/CodeGen/debug-info-crash.c b/clang/test/CodeGen/debug-info-crash.c
index 9214909f5877e..3160018dfccff 100644
--- a/clang/test/CodeGen/debug-info-crash.c
+++ b/clang/test/CodeGen/debug-info-crash.c
@@ -26,6 +26,6 @@ typedef struct P {
   int x;
 } PS;
 # 1 ""
-void foo() {
+void foo(void) {
   PS p2;
 }

diff  --git a/clang/test/CodeGen/debug-info-embed-source.c b/clang/test/CodeGen/debug-info-embed-source.c
index 3b607b61f7d7e..daa6a6c468ed0 100644
--- a/clang/test/CodeGen/debug-info-embed-source.c
+++ b/clang/test/CodeGen/debug-info-embed-source.c
@@ -2,4 +2,4 @@
 // RUN: %clang_cc1 -gembed-source -debug-info-kind=limited -emit-llvm %p/Inputs/debug-info-embed-source.c -o - | FileCheck %s --check-prefix=EMBED
 
 // NOEMBED-NOT: !DIFile({{.*}}source:
-// EMBED: !DIFile({{.*}}source: "void foo() { }\0A"
+// EMBED: !DIFile({{.*}}source: "void foo(void) { }\0A"

diff  --git a/clang/test/CodeGen/debug-info-extern-basic.c b/clang/test/CodeGen/debug-info-extern-basic.c
index e2c90842fffbb..13b88111f6a6d 100644
--- a/clang/test/CodeGen/debug-info-extern-basic.c
+++ b/clang/test/CodeGen/debug-info-extern-basic.c
@@ -1,17 +1,17 @@
 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 extern char ch;
-int test() {
+int test(void) {
   return ch;
 }
 
-int test2() {
+int test2(void) {
   extern char ch2;
   return ch2;
 }
 
 extern int (*foo)(int);
-int test3() {
+int test3(void) {
   return foo(0);
 }
 

diff  --git a/clang/test/CodeGen/debug-info-extern-callback.c b/clang/test/CodeGen/debug-info-extern-callback.c
index 6a2fe301561e5..a9f210ccf7d7c 100644
--- a/clang/test/CodeGen/debug-info-extern-callback.c
+++ b/clang/test/CodeGen/debug-info-extern-callback.c
@@ -2,16 +2,16 @@
 
 extern int do_work1(int);
 long bpf_helper1(void *callback_fn);
-long prog1() {
+long prog1(void) {
   return bpf_helper1(&do_work1);
 }
 
-extern int do_work2();
-long prog2_1() {
+extern int do_work2(void);
+long prog2_1(void) {
   return (long)&do_work2;
 }
-int do_work2() { return 0; }
-long prog2_2() {
+int do_work2(void) { return 0; }
+long prog2_2(void) {
   return (long)&do_work2;
 }
 

diff  --git a/clang/test/CodeGen/debug-info-extern-duplicate.c b/clang/test/CodeGen/debug-info-extern-duplicate.c
index 1c6d86f4cc093..597865c9f2b9d 100644
--- a/clang/test/CodeGen/debug-info-extern-duplicate.c
+++ b/clang/test/CodeGen/debug-info-extern-duplicate.c
@@ -2,7 +2,7 @@
 
 extern char ch;
 extern char ch;
-int test() {
+int test(void) {
   return ch;
 }
 

diff  --git a/clang/test/CodeGen/debug-info-extern-multi.c b/clang/test/CodeGen/debug-info-extern-multi.c
index 6a9021d382b97..c8a355be6837f 100644
--- a/clang/test/CodeGen/debug-info-extern-multi.c
+++ b/clang/test/CodeGen/debug-info-extern-multi.c
@@ -1,13 +1,13 @@
 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 extern char ch;
-int test() {
+int test(void) {
   extern short sh;
   return ch + sh;
 }
 
 extern char (*foo)(char);
-int test2() {
+int test2(void) {
   return foo(0) + ch;
 }
 

diff  --git a/clang/test/CodeGen/debug-info-extern-unused.c b/clang/test/CodeGen/debug-info-extern-unused.c
index 8b89eaab27e62..52b3b1b91f79f 100644
--- a/clang/test/CodeGen/debug-info-extern-unused.c
+++ b/clang/test/CodeGen/debug-info-extern-unused.c
@@ -1,21 +1,21 @@
 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 extern char ch;
-int test() {
+int test(void) {
   return 0;
 }
 
-int test2() {
+int test2(void) {
   extern char ch2;
   return 0;
 }
 
 extern int (*foo)(int);
-int test3() {
+int test3(void) {
   return 0;
 }
 
-int test4() {
+int test4(void) {
   extern int (*foo2)(int);
   return 0;
 }

diff  --git a/clang/test/CodeGen/debug-info-file-change.c b/clang/test/CodeGen/debug-info-file-change.c
index abcffaf9bb400..9a80f4d49caff 100644
--- a/clang/test/CodeGen/debug-info-file-change.c
+++ b/clang/test/CodeGen/debug-info-file-change.c
@@ -4,7 +4,7 @@
 // There are no lexical blocks, but we need two DILexicalBlockFiles to
 // correctly represent file info.
 
-int foo() {
+int foo(void) {
   int i = 1;
 # 4 "m.c"
 # 1 "m.h" 1

diff  --git a/clang/test/CodeGen/debug-info-gline-tables-only2.c b/clang/test/CodeGen/debug-info-gline-tables-only2.c
index 8b8fbc2fe00ce..d5d62351a9b66 100644
--- a/clang/test/CodeGen/debug-info-gline-tables-only2.c
+++ b/clang/test/CodeGen/debug-info-gline-tables-only2.c
@@ -3,7 +3,7 @@
 // Checks that clang with "-gline-tables-only" or "-gline-directives-only" emits metadata for
 // compile unit, subprogram and file.
 
-int main() {
+int main(void) {
   // CHECK: ret i32 0, !dbg
   return 0;
 }

diff  --git a/clang/test/CodeGen/debug-info-global-constant.c b/clang/test/CodeGen/debug-info-global-constant.c
index 7da33aedbb517..80e4651134169 100644
--- a/clang/test/CodeGen/debug-info-global-constant.c
+++ b/clang/test/CodeGen/debug-info-global-constant.c
@@ -12,6 +12,6 @@
 static const int i = 1;
 
 void g(const int *, int);
-void f() {
+void f(void) {
   g(&i, i);
 }

diff  --git a/clang/test/CodeGen/debug-info-line2.c b/clang/test/CodeGen/debug-info-line2.c
index fbdc6b1bf950c..e2328c5aa9a49 100644
--- a/clang/test/CodeGen/debug-info-line2.c
+++ b/clang/test/CodeGen/debug-info-line2.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-darwin-apple -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
 // Radar 9199234
 
-int bar();
+int bar(void);
 int foo(int i) {
 	int j = 0;
 	if (i) {

diff  --git a/clang/test/CodeGen/debug-info-names.c b/clang/test/CodeGen/debug-info-names.c
index bcfc998609881..841387d50fd44 100644
--- a/clang/test/CodeGen/debug-info-names.c
+++ b/clang/test/CodeGen/debug-info-names.c
@@ -6,5 +6,5 @@
 // DEFAULT-NOT: !DICompileUnit({{.*}}, nameTableKind:
 // GNU: !DICompileUnit({{.*}}, nameTableKind: GNU
 
-void f1() {
+void f1(void) {
 }

diff  --git a/clang/test/CodeGen/debug-info-no-inline-line-tables.c b/clang/test/CodeGen/debug-info-no-inline-line-tables.c
index ac9216247c820..bdd202066ceb3 100644
--- a/clang/test/CodeGen/debug-info-no-inline-line-tables.c
+++ b/clang/test/CodeGen/debug-info-no-inline-line-tables.c
@@ -5,10 +5,10 @@
 // RUN: %clang -S -emit-llvm -o - %s | FileCheck %s -check-prefix=NO-FLAG
 
 int x;
-__attribute((always_inline)) void f() {
+__attribute((always_inline)) void f(void) {
   x += 1;
 }
-int main() {
+int main(void) {
   f();
   x += 2;
   return x;

diff  --git a/clang/test/CodeGen/debug-info-ranges-base-address.c b/clang/test/CodeGen/debug-info-ranges-base-address.c
index dee7cc5f898d6..9f6ffa00d7ac1 100644
--- a/clang/test/CodeGen/debug-info-ranges-base-address.c
+++ b/clang/test/CodeGen/debug-info-ranges-base-address.c
@@ -4,6 +4,6 @@
 // NORNGBSE-NOT: rangesBaseAddress
 // RNGBSE: !DICompileUnit({{.*}}, rangesBaseAddress: true
 
-void f1() {
+void f1(void) {
 }
 

diff  --git a/clang/test/CodeGen/debug-info-scope-file.c b/clang/test/CodeGen/debug-info-scope-file.c
index a5af59506592e..9ba8a65a848f7 100644
--- a/clang/test/CodeGen/debug-info-scope-file.c
+++ b/clang/test/CodeGen/debug-info-scope-file.c
@@ -10,11 +10,11 @@
 // CHECK: [[F2:![0-9]*]] = distinct !DISubprogram(name: "f2",{{.*}} DISPFlagDefinition
 // CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]])
 
-void f1() {
+void f1(void) {
 }
 
 # 2 "foo.c"
 
-void f2() {
+void f2(void) {
 }
 

diff  --git a/clang/test/CodeGen/debug-info-scope.c b/clang/test/CodeGen/debug-info-scope.c
index 0c12c4d604645..6c446a842584e 100644
--- a/clang/test/CodeGen/debug-info-scope.c
+++ b/clang/test/CodeGen/debug-info-scope.c
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-directives-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
 // Two variables with same name in separate scope.
 // Radar 8330217.
-int main() {
+int main(void) {
 	int j = 0;
 	int k = 0;
 // CHECK: !DILocalVariable(name: "i"

diff  --git a/clang/test/CodeGen/debug-info-static-const-fp.c b/clang/test/CodeGen/debug-info-static-const-fp.c
index 1b1da09f9e592..be4b51d4ce7e5 100644
--- a/clang/test/CodeGen/debug-info-static-const-fp.c
+++ b/clang/test/CodeGen/debug-info-static-const-fp.c
@@ -29,7 +29,7 @@ static const double dVal = 19637/7.0;           // 2805.2857142857142857
 
 static const long double ldVal = 3/1234567.0L;  //    2.4300017739012949479e-06 (<depends on size of long double>)
 
-int main() {
+int main(void) {
   return hVal + fVal + dVal + ldVal;
 }
 

diff  --git a/clang/test/CodeGen/debug-info-sysroot-sdk.c b/clang/test/CodeGen/debug-info-sysroot-sdk.c
index 5c4d201d69047..c3e00ca4a6f0e 100644
--- a/clang/test/CodeGen/debug-info-sysroot-sdk.c
+++ b/clang/test/CodeGen/debug-info-sysroot-sdk.c
@@ -5,7 +5,7 @@
 // RUN:   %s -isysroot /CLANG_SYSROOT/MacOSX.sdk -emit-llvm -o - \
 // RUN:   -debugger-tuning=gdb | FileCheck %s --check-prefix=GDB
 
-void foo() {}
+void foo(void) {}
 
 // The sysroot and sdk are LLDB-tuning-specific attributes.
 

diff  --git a/clang/test/CodeGen/debug-info.c b/clang/test/CodeGen/debug-info.c
index 8850ed4a4daa4..e3f0426900ea8 100644
--- a/clang/test/CodeGen/debug-info.c
+++ b/clang/test/CodeGen/debug-info.c
@@ -45,11 +45,11 @@ struct foo2 foo2;
 // Radar 7325611
 // CHECK-DAG: !DIDerivedType(tag: DW_TAG_typedef, name: "barfoo"
 typedef int barfoo;
-barfoo foo() {
+barfoo foo(void) {
 }
 
 // CHECK-DAG: __uint128_t
-__uint128_t foo128 ()
+__uint128_t foo128 (void)
 {
   __uint128_t int128 = 44;
   return int128;


        


More information about the cfe-commits mailing list