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

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


Author: Aaron Ballman
Date: 2022-02-15T16:06:43-05:00
New Revision: adc402bf3d0565ac2bc7efbdd05f0d846e818041

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

Added: 
    

Modified: 
    clang/test/CodeGen/debug-prefix-map.c
    clang/test/CodeGen/decl-in-prototype.c
    clang/test/CodeGen/decl.c
    clang/test/CodeGen/default-address-space.c
    clang/test/CodeGen/default-function-attr.c
    clang/test/CodeGen/denormalfpmode.c
    clang/test/CodeGen/dependent-lib.c
    clang/test/CodeGen/designated-initializers.c
    clang/test/CodeGen/dllexport-1.c
    clang/test/CodeGen/dllimport.c
    clang/test/CodeGen/dostmt.c
    clang/test/CodeGen/dso-local-executable.c
    clang/test/CodeGen/dump-struct-builtin.c
    clang/test/CodeGen/emit-all-decls.c
    clang/test/CodeGen/emit-summary-index.c
    clang/test/CodeGen/empty-union-init.c
    clang/test/CodeGen/enable_if.c
    clang/test/CodeGen/exceptions-seh-finally.c
    clang/test/CodeGen/exceptions-seh-leave.c
    clang/test/CodeGen/exceptions-seh-nested-finally.c
    clang/test/CodeGen/exceptions-strictfp.c
    clang/test/CodeGen/exceptions.c
    clang/test/CodeGen/exprs-strictfp.c
    clang/test/CodeGen/exprs.c
    clang/test/CodeGen/ext-int-cc.c
    clang/test/CodeGen/ext-int.c
    clang/test/CodeGen/ext-vector-indexing.c
    clang/test/CodeGen/ext-vector.c
    clang/test/CodeGen/extend-arg-64.c
    clang/test/CodeGen/extern-block-var.c
    clang/test/CodeGen/extern-weak.c
    clang/test/CodeGen/flip-dllimport.c
    clang/test/CodeGen/forceinline.c
    clang/test/CodeGen/fpconstrained.c
    clang/test/CodeGen/func-aligned.c
    clang/test/CodeGen/func-in-block.c
    clang/test/CodeGen/func-ptr-cast-decl.c
    clang/test/CodeGen/function-min-vector-width.c
    clang/test/CodeGen/function-sections.c
    clang/test/CodeGen/function-target-features.c
    clang/test/CodeGen/funique-sections.c
    clang/test/CodeGen/global-decls.c
    clang/test/CodeGen/globalinit.c
    clang/test/CodeGen/guard_nocf.c
    clang/test/CodeGen/hexagon-inline-asm-reg-names.c
    clang/test/CodeGen/iamcu-abi.c
    clang/test/CodeGen/ifunc.c
    clang/test/CodeGen/incomplete-function-type-2.c
    clang/test/CodeGen/indirect-goto.c
    clang/test/CodeGen/indirect-tls-seg-refs.c
    clang/test/CodeGen/init-memset.c
    clang/test/CodeGen/init.c
    clang/test/CodeGen/inline-asm-immediate-ubsan.c
    clang/test/CodeGen/inline-asm-intel.c
    clang/test/CodeGen/inline-asm-mixed-style.c
    clang/test/CodeGen/inline-asm-x86-flag-output.c
    clang/test/CodeGen/inline-optim.c
    clang/test/CodeGen/integer-overflow.c
    clang/test/CodeGen/label-array-aggregate-init.c
    clang/test/CodeGen/lanai-arguments.c
    clang/test/CodeGen/lanai-regparm.c
    clang/test/CodeGen/lifetime-debuginfo-1.c
    clang/test/CodeGen/lifetime.c
    clang/test/CodeGen/lifetime2.c
    clang/test/CodeGen/linkage-redecl.c
    clang/test/CodeGen/linker-option.c
    clang/test/CodeGen/loop-info-asan.c
    clang/test/CodeGen/loop-unroll.c
    clang/test/CodeGen/loop-vectorize.c
    clang/test/CodeGen/lto-newpm-pipeline.c
    clang/test/CodeGen/mandel.c
    clang/test/CodeGen/mangle-windows.c
    clang/test/CodeGen/matrix-type-builtins.c
    clang/test/CodeGen/matrix-type.c
    clang/test/CodeGen/mcu-struct-return.c
    clang/test/CodeGen/merge-attrs.c
    clang/test/CodeGen/mips-clobber-reg.c
    clang/test/CodeGen/mips-constraint-regs.c
    clang/test/CodeGen/mips-constraints-mem.c
    clang/test/CodeGen/mips-inline-asm-modifiers.c
    clang/test/CodeGen/mips-type-sizes-int128.c
    clang/test/CodeGen/mips-type-sizes.c
    clang/test/CodeGen/mips-unsigned-ext-var.c
    clang/test/CodeGen/mips-unsigned-extend.c
    clang/test/CodeGen/mips64-f128-literal.c
    clang/test/CodeGen/ms-anonymous-struct.c
    clang/test/CodeGen/ms-barriers-intrinsics.c
    clang/test/CodeGen/ms-declspecs.c
    clang/test/CodeGen/ms-inline-asm-64.c
    clang/test/CodeGen/ms-inline-asm-EVEN.c
    clang/test/CodeGen/ms-inline-asm-align.c
    clang/test/CodeGen/ms-inline-asm-avx512.c
    clang/test/CodeGen/ms-inline-asm-functions.c
    clang/test/CodeGen/ms-inline-asm-static-variable.c
    clang/test/CodeGen/ms-inline-asm-variables.c
    clang/test/CodeGen/ms-inline-asm.c
    clang/test/CodeGen/ms-intrinsics.c
    clang/test/CodeGen/ms-setjmp.c
    clang/test/CodeGen/ms_struct-bitfield-init.c
    clang/test/CodeGen/mult-alt-generic.c
    clang/test/CodeGen/mult-alt-x86.c
    clang/test/CodeGen/named_reg_global.c
    clang/test/CodeGen/no-junk-ftrunc.c
    clang/test/CodeGen/no_profile.c
    clang/test/CodeGen/nobuiltin.c
    clang/test/CodeGen/noexceptionsfpmath.c
    clang/test/CodeGen/noinline.c
    clang/test/CodeGen/nonnull.c
    clang/test/CodeGen/noplt.c
    clang/test/CodeGen/nousejumptable.c
    clang/test/CodeGen/nvptx-inlineasm-ptx.c
    clang/test/CodeGen/object-size.c
    clang/test/CodeGen/openmp_default_simd_align.c
    clang/test/CodeGen/opt-record.c
    clang/test/CodeGen/overloadable.c
    clang/test/CodeGen/override-layout.c
    clang/test/CodeGen/packed-arrays.c
    clang/test/CodeGen/packed-nest-unpacked.c
    clang/test/CodeGen/padding-init.c
    clang/test/CodeGen/partial-reinitialization2.c
    clang/test/CodeGen/pascal-wchar-string.c
    clang/test/CodeGen/pass-object-size.c
    clang/test/CodeGen/patchable-function-entry.c
    clang/test/CodeGen/pr23258.c
    clang/test/CodeGen/pr34021.c
    clang/test/CodeGen/pragma-visibility.c
    clang/test/CodeGen/pragma-weak.c
    clang/test/CodeGen/predefined-expr.c
    clang/test/CodeGen/preserve-call-conv.c
    clang/test/CodeGen/private-extern-redef.c
    clang/test/CodeGen/profile-filter.c
    clang/test/CodeGen/profile-sample-accurate.c
    clang/test/CodeGen/ps4-dllimport-dllexport.c
    clang/test/CodeGen/pseudo-probe-emit.c
    clang/test/CodeGen/redefine_extname.c
    clang/test/CodeGen/regparm-flag.c
    clang/test/CodeGen/regparm-struct.c
    clang/test/CodeGen/renderscript.c
    clang/test/CodeGen/rounding-math.c
    clang/test/CodeGen/sanitize-atomic-int-overflow.c
    clang/test/CodeGen/sanitize-recover.c
    clang/test/CodeGen/sanitizer-module-constructor.c
    clang/test/CodeGen/sanitizer-special-case-list.c
    clang/test/CodeGen/semantic-interposition.c
    clang/test/CodeGen/set-visibility-for-decls.c
    clang/test/CodeGen/setjmp.c
    clang/test/CodeGen/shared-string-literals.c
    clang/test/CodeGen/sparc-arguments.c
    clang/test/CodeGen/sparcv9-abi.c
    clang/test/CodeGen/sparcv9-dwarf.c
    clang/test/CodeGen/split-debug-output.c
    clang/test/CodeGen/split-lto-unit.c
    clang/test/CodeGen/split-stacks.c
    clang/test/CodeGen/stack-arg-probe.c
    clang/test/CodeGen/stack-clash-protection.c
    clang/test/CodeGen/stack-size-section.c
    clang/test/CodeGen/stackrealign.c
    clang/test/CodeGen/static-local-union.c
    clang/test/CodeGen/static-order.c
    clang/test/CodeGen/staticinit.c
    clang/test/CodeGen/string-literal-short-wstring.c
    clang/test/CodeGen/string-literal-unicode-conversion.c
    clang/test/CodeGen/string-literal.c
    clang/test/CodeGen/struct-init.c
    clang/test/CodeGen/struct-union-BE.c
    clang/test/CodeGen/struct.c
    clang/test/CodeGen/switch-dce.c
    clang/test/CodeGen/switch.c
    clang/test/CodeGen/sysv_abi.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/debug-prefix-map.c b/clang/test/CodeGen/debug-prefix-map.c
index 354110d1b0da7..1c5d3a6e78bb2 100644
--- a/clang/test/CodeGen/debug-prefix-map.c
+++ b/clang/test/CodeGen/debug-prefix-map.c
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
   return 0;
 }
 
-void test_rewrite_includes() {
+void test_rewrite_includes(void) {
   __builtin_va_list argp;
   vprintf("string", argp);
 }

diff  --git a/clang/test/CodeGen/decl-in-prototype.c b/clang/test/CodeGen/decl-in-prototype.c
index 9d361238410b3..7b5941b633731 100644
--- a/clang/test/CodeGen/decl-in-prototype.c
+++ b/clang/test/CodeGen/decl-in-prototype.c
@@ -15,7 +15,7 @@ int f2(enum {AA=7,BB} E) {
 }
 
 // Check nested function declarators work.
-int f(void (*g)(), enum {AA,BB} h) {
+int f(void (*g)(void), enum {AA,BB} h) {
     // CHECK: ret i32 0
     return AA;
 }

diff  --git a/clang/test/CodeGen/decl.c b/clang/test/CodeGen/decl.c
index 1ceb8fa9e3105..1c18396a1acc8 100644
--- a/clang/test/CodeGen/decl.c
+++ b/clang/test/CodeGen/decl.c
@@ -9,7 +9,7 @@
 
 // CHECK: @test7 = {{(dso_local )?}}global [2 x %struct.test7s] [%struct.test7s { i32 1, i32 2 }, %struct.test7s { i32 4, i32 0 }]
 
-void test1() {
+void test1(void) {
   // This should codegen as a "@test1.x" global.
   const int x[] = { 1, 2, 3, 4, 6, 8, 9, 10, 123, 231, 123,23 };
   foo(x);
@@ -20,7 +20,7 @@ void test1() {
 
 
 // rdar://7346691
-void test2() {
+void test2(void) {
   // This should codegen as a "@test2.x" global + memcpy.
   int x[] = { 1, 2, 3, 4, 6, 8, 9, 10, 123, 231, 123,23, 24 };
   foo(x);
@@ -32,7 +32,7 @@ void test2() {
 }
 
 
-void test3() {
+void test3(void) {
   // This should codegen as a memset.
   int x[100] = { 0 };
   foo(x);
@@ -55,7 +55,7 @@ void test4(void) {
 
 union test5u { int i; double d; };
 
-void test5() {
+void test5(void) {
   union test5u ola = (union test5u) 351;
   union test5u olb = (union test5u) 1.0;
 }
@@ -73,7 +73,7 @@ struct SelectDest {
   int iMem;
 };
 
-void test6() {
+void test6(void) {
   struct SelectDest x = {1, 2, 3};
   test6f(&x);
 }

diff  --git a/clang/test/CodeGen/default-address-space.c b/clang/test/CodeGen/default-address-space.c
index fd719df3d8c3e..0dcf1782a27b9 100644
--- a/clang/test/CodeGen/default-address-space.c
+++ b/clang/test/CodeGen/default-address-space.c
@@ -13,7 +13,7 @@ int *B;
 
 // CHECK-LABEL: define{{.*}} i32 @test1()
 // CHECK: load i32, i32* addrspacecast{{[^@]+}} @foo
-int test1() { return foo; }
+int test1(void) { return foo; }
 
 // CHECK-LABEL: define{{.*}} i32 @test2(i32 noundef %i)
 // CHECK: %[[addr:.*]] = getelementptr
@@ -26,7 +26,7 @@ int test2(int i) { return ban[i]; }
 // CHECK: load i32, i32*
 // CHECK: load i32*, i32** addrspacecast{{.*}} @A
 // CHECK: store i32 {{.*}}, i32*
-void test3() {
+void test3(void) {
   *A = *B;
 }
 

diff  --git a/clang/test/CodeGen/default-function-attr.c b/clang/test/CodeGen/default-function-attr.c
index 0944828864880..a312be46dc45f 100644
--- a/clang/test/CodeGen/default-function-attr.c
+++ b/clang/test/CodeGen/default-function-attr.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-linux -default-function-attr foo=bar -emit-llvm %s -o - | FileCheck %s
 
 // CHECK: define{{.*}} void @foo() #[[X:[0-9]+]]
-void foo() {}
+void foo(void) {}
 
 // CHECK: attributes #[[X]] = {{.*}} "foo"="bar"

diff  --git a/clang/test/CodeGen/denormalfpmode.c b/clang/test/CodeGen/denormalfpmode.c
index 7fd2b0b42e9d8..6213454a675dc 100644
--- a/clang/test/CodeGen/denormalfpmode.c
+++ b/clang/test/CodeGen/denormalfpmode.c
@@ -9,6 +9,6 @@
 // CHECK-PS: attributes #0 = {{.*}}"denormal-fp-math"="preserve-sign,preserve-sign"{{.*}}
 // CHECK-PZ: attributes #0 = {{.*}}"denormal-fp-math"="positive-zero,positive-zero"{{.*}}
 
-int main() {
+int main(void) {
   return 0;
 }

diff  --git a/clang/test/CodeGen/dependent-lib.c b/clang/test/CodeGen/dependent-lib.c
index fdd2ff3957be8..9f3960094e884 100644
--- a/clang/test/CodeGen/dependent-lib.c
+++ b/clang/test/CodeGen/dependent-lib.c
@@ -9,4 +9,4 @@
 // LINUX: !llvm.dependent-libraries = !{![[msvcrt:[0-9]+]]}
 // LINUX: ![[msvcrt]] = !{!"msvcrt"}
 
-int f();
+int f(void);

diff  --git a/clang/test/CodeGen/designated-initializers.c b/clang/test/CodeGen/designated-initializers.c
index 7d7d87f7485dd..caf2761a54364 100644
--- a/clang/test/CodeGen/designated-initializers.c
+++ b/clang/test/CodeGen/designated-initializers.c
@@ -181,7 +181,7 @@ struct S {
   };
 };
 
-void test2() {
+void test2(void) {
   struct S *btkr;
   
   *btkr = (struct S) {

diff  --git a/clang/test/CodeGen/dllexport-1.c b/clang/test/CodeGen/dllexport-1.c
index 01e4c1cfdaf86..921021ad1a4a7 100644
--- a/clang/test/CodeGen/dllexport-1.c
+++ b/clang/test/CodeGen/dllexport-1.c
@@ -18,7 +18,7 @@ __declspec(dllexport) const int y;
 // expected-warning at +1 {{'extern' variable has an initializer}}
 extern int const z = 4;
 
-int main() {
+int main(void) {
   int a = x + y + z;
   return a;
 }

diff  --git a/clang/test/CodeGen/dllimport.c b/clang/test/CodeGen/dllimport.c
index 8a67716fd9cf0..4940a5271255a 100644
--- a/clang/test/CodeGen/dllimport.c
+++ b/clang/test/CodeGen/dllimport.c
@@ -7,8 +7,8 @@
 
 #define JOIN2(x, y) x##y
 #define JOIN(x, y) JOIN2(x, y)
-#define USEVAR(var) int JOIN(use, __LINE__)() { return var; }
-#define USE(func) void JOIN(use, __LINE__)() { func(); }
+#define USEVAR(var) int JOIN(use, __LINE__)(void) { return var; }
+#define USE(func) void JOIN(use, __LINE__)(void) { func(); }
 
 
 
@@ -61,7 +61,7 @@ USEVAR(GlobalRedecl5)
 // Redeclaration in local context.
 // CHECK: @GlobalRedecl6 = external dllimport global i32
 __declspec(dllimport) int GlobalRedecl6;
-int functionScope() {
+int functionScope(void) {
   extern int GlobalRedecl6; // still dllimport
   return GlobalRedecl6;
 }

diff  --git a/clang/test/CodeGen/dostmt.c b/clang/test/CodeGen/dostmt.c
index 67ef64e42d4cf..88533312ae1a2 100644
--- a/clang/test/CodeGen/dostmt.c
+++ b/clang/test/CodeGen/dostmt.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
 
-int bar();
-int test0() {
+int bar(void);
+int test0(void) {
   int i;
   i = 1 + 2;
   do {
@@ -12,7 +12,7 @@ int test0() {
 }
 
 
-int test1() {
+int test1(void) {
   int i;
   i = 1 + 2;
   do {
@@ -25,7 +25,7 @@ int test1() {
 }
 
 
-int test2() {
+int test2(void) {
   int i;
   i = 1 + 2;
   do {
@@ -38,7 +38,7 @@ int test2() {
 }
 
 
-int test3() {
+int test3(void) {
   int i;
   i = 1 + 2;
   do {
@@ -50,7 +50,7 @@ int test3() {
 }
 
 
-int test4() {
+int test4(void) {
   int i;
   i = 1 + 2;
   do {
@@ -62,13 +62,13 @@ int test4() {
 }
 
 // rdar://6103124
-void test5() {
+void test5(void) {
   do { break; } while(0);
 }
 
 // PR14191
 void test6f(void);
-void test6() {
+void test6(void) {
   do {
   } while (test6f(), 0);
   // CHECK: call {{.*}}void @test6f()

diff  --git a/clang/test/CodeGen/dso-local-executable.c b/clang/test/CodeGen/dso-local-executable.c
index e16b8db9d4ede..25a5147444a8d 100644
--- a/clang/test/CodeGen/dso-local-executable.c
+++ b/clang/test/CodeGen/dso-local-executable.c
@@ -122,14 +122,14 @@ __attribute__((weak)) extern int weak_bar;
 extern int bar;
 __attribute__((dllimport)) void import_func(void);
 
-int *use_import() {
+int *use_import(void) {
   import_func();
   return &import_var;
 }
 
 void foo(void);
 
-int *zed() {
+int *zed(void) {
   foo();
   return baz ? &weak_bar : &bar;
 }

diff  --git a/clang/test/CodeGen/dump-struct-builtin.c b/clang/test/CodeGen/dump-struct-builtin.c
index 6464d7fa70d89..d49613136fe06 100644
--- a/clang/test/CodeGen/dump-struct-builtin.c
+++ b/clang/test/CodeGen/dump-struct-builtin.c
@@ -117,7 +117,7 @@ int printf(const char *fmt, ...) {
     return 0;
 }
 
-void unit1() {
+void unit1(void) {
   struct U1A {
     short a;
   };
@@ -134,7 +134,7 @@ void unit1() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit2() {
+void unit2(void) {
   struct U2A {
     unsigned short a;
   };
@@ -152,7 +152,7 @@ void unit2() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit3() {
+void unit3(void) {
   struct U3A {
     int a;
   };
@@ -170,7 +170,7 @@ void unit3() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit4() {
+void unit4(void) {
   struct U4A {
     unsigned int a;
   };
@@ -188,7 +188,7 @@ void unit4() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit5() {
+void unit5(void) {
   struct U5A {
     long a;
   };
@@ -206,7 +206,7 @@ void unit5() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit6() {
+void unit6(void) {
   struct U6A {
     unsigned long a;
   };
@@ -224,7 +224,7 @@ void unit6() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit7() {
+void unit7(void) {
   struct U7A {
     long long a;
   };
@@ -242,7 +242,7 @@ void unit7() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit8() {
+void unit8(void) {
   struct U8A {
     unsigned long long a;
   };
@@ -260,7 +260,7 @@ void unit8() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit9() {
+void unit9(void) {
   struct U9A {
     char a;
   };
@@ -278,7 +278,7 @@ void unit9() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit10() {
+void unit10(void) {
   struct U10A {
     char *a;
   };
@@ -296,7 +296,7 @@ void unit10() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit11() {
+void unit11(void) {
   struct U11A {
     void *a;
   };
@@ -314,7 +314,7 @@ void unit11() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit12() {
+void unit12(void) {
   struct U12A {
     const char *a;
   };
@@ -332,7 +332,7 @@ void unit12() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit13() {
+void unit13(void) {
   typedef char *charstar;
   struct U13A {
     const charstar a;
@@ -351,7 +351,7 @@ void unit13() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit14() {
+void unit14(void) {
   struct U14A {
     double a;
   };
@@ -369,7 +369,7 @@ void unit14() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit15() {
+void unit15(void) {
   struct U15A {
     int a[3];
   };
@@ -387,7 +387,7 @@ void unit15() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit16() {
+void unit16(void) {
   struct U16A {
     uint8_t a;
   };
@@ -405,7 +405,7 @@ void unit16() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit17() {
+void unit17(void) {
   struct U17A {
     int8_t a;
   };
@@ -423,7 +423,7 @@ void unit17() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void unit18() {
+void unit18(void) {
   struct U18A {
     long double a;
   };
@@ -441,7 +441,7 @@ void unit18() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void test1() {
+void test1(void) {
   struct T1A {
     int a;
     char *b;
@@ -465,7 +465,7 @@ void test1() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void test2() {
+void test2(void) {
   struct T2A {
     int a;
   };
@@ -497,7 +497,7 @@ void test2() {
   __builtin_dump_struct(&b, &printf);
 }
 
-void test3() {
+void test3(void) {
   struct T3A {
     union {
       int a;
@@ -522,7 +522,7 @@ void test3() {
   __builtin_dump_struct(&a, &printf);
 }
 
-void test4() {
+void test4(void) {
   struct T4A {
     union {
       struct {

diff  --git a/clang/test/CodeGen/emit-all-decls.c b/clang/test/CodeGen/emit-all-decls.c
index deeb573a385af..23ab91da961aa 100644
--- a/clang/test/CodeGen/emit-all-decls.c
+++ b/clang/test/CodeGen/emit-all-decls.c
@@ -3,6 +3,6 @@
 // RUN: %clang_cc1 -femit-all-decls -emit-llvm -o %t %s
 // RUN: grep "@foo" %t
 
-static void foo() {
+static void foo(void) {
   
 }

diff  --git a/clang/test/CodeGen/emit-summary-index.c b/clang/test/CodeGen/emit-summary-index.c
index 6126410206898..c407934e8f4ba 100644
--- a/clang/test/CodeGen/emit-summary-index.c
+++ b/clang/test/CodeGen/emit-summary-index.c
@@ -14,4 +14,4 @@
 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc -disable-llvm-passes < %s -o %t.bc
 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc -x ir < %t.bc | llvm-bcanalyzer -dump | FileCheck --check-prefix=LTOINDEX %s
 
-int main() {}
+int main(void) {}

diff  --git a/clang/test/CodeGen/empty-union-init.c b/clang/test/CodeGen/empty-union-init.c
index a58354b772f3d..f1cdfb12f6246 100644
--- a/clang/test/CodeGen/empty-union-init.c
+++ b/clang/test/CodeGen/empty-union-init.c
@@ -6,7 +6,7 @@ struct Mem {
         } u;
 };
 
-struct Mem *columnMem(){
+struct Mem *columnMem(void){
         static const struct Mem nullMem = { {} };
 }
 

diff  --git a/clang/test/CodeGen/enable_if.c b/clang/test/CodeGen/enable_if.c
index 327a201cdeba1..2edb6484246bc 100644
--- a/clang/test/CodeGen/enable_if.c
+++ b/clang/test/CodeGen/enable_if.c
@@ -7,7 +7,7 @@ void foo(int m) __attribute__((overloadable, enable_if(m > 0, "")));
 void foo(int m) __attribute__((overloadable));
 
 // CHECK-LABEL: define{{.*}} void @test1
-void test1() {
+void test1(void) {
   // CHECK: store void (i32)* @_Z3fooi
   void (*p)(int) = foo;
   // CHECK: store void (i32)* @_Z3fooi
@@ -30,7 +30,7 @@ void test1() {
 void bar(int m) __attribute__((overloadable, enable_if(m > 0, "")));
 void bar(int m) __attribute__((overloadable, enable_if(1, "")));
 // CHECK-LABEL: define{{.*}} void @test2
-void test2() {
+void test2(void) {
   // CHECK: store void (i32)* @_Z3barUa9enable_ifILi1EEi
   void (*p)(int) = bar;
   // CHECK: store void (i32)* @_Z3barUa9enable_ifILi1EEi
@@ -53,7 +53,7 @@ void test2() {
 void baz(int m) __attribute__((overloadable, enable_if(1, "")));
 void baz(int m) __attribute__((overloadable));
 // CHECK-LABEL: define{{.*}} void @test3
-void test3() {
+void test3(void) {
   // CHECK: store void (i32)* @_Z3bazUa9enable_ifILi1EEi
   void (*p)(int) = baz;
   // CHECK: store void (i32)* @_Z3bazUa9enable_ifILi1EEi
@@ -70,7 +70,7 @@ void qux(int m) __attribute__((overloadable, enable_if(1, ""),
                                enable_if(TRUEFACTS, "")));
 void qux(int m) __attribute__((overloadable, enable_if(1, "")));
 // CHECK-LABEL: define{{.*}} void @test4
-void test4() {
+void test4(void) {
   // CHECK: store void (i32)* @_Z3quxUa9enable_ifILi1ELi1EEi
   void (*p)(int) = qux;
   // CHECK: store void (i32)* @_Z3quxUa9enable_ifILi1ELi1EEi
@@ -85,7 +85,7 @@ void test4() {
 // wouldn't pay attention to lower-priority attributes.
 // (N.B. `foo` with pass_object_size should always be preferred)
 // CHECK-LABEL: define{{.*}} void @test5
-void test5() {
+void test5(void) {
   int foo(char *i) __attribute__((enable_if(1, ""), overloadable));
   int foo(char *i __attribute__((pass_object_size(0))))
       __attribute__((enable_if(1, ""), overloadable));

diff  --git a/clang/test/CodeGen/exceptions-seh-finally.c b/clang/test/CodeGen/exceptions-seh-finally.c
index cf123a6279ae0..eff5c8338393c 100644
--- a/clang/test/CodeGen/exceptions-seh-finally.c
+++ b/clang/test/CodeGen/exceptions-seh-finally.c
@@ -104,7 +104,7 @@ void use_abnormal_termination(void) {
 // CHECK: store i32 %[[abnormal_zext]], i32* @crashed
 // CHECK-NEXT: ret void
 
-void noreturn_noop_finally() {
+void noreturn_noop_finally(void) {
   __try {
     __noop();
   } __finally {
@@ -121,7 +121,7 @@ void noreturn_noop_finally() {
 // CHECK: call void @abort()
 // CHECK: unreachable
 
-void noreturn_finally() {
+void noreturn_finally(void) {
   __try {
     might_crash();
   } __finally {
@@ -147,7 +147,7 @@ void noreturn_finally() {
 // CHECK: call void @abort()
 // CHECK: unreachable
 
-int finally_with_return() {
+int finally_with_return(void) {
   __try {
     return 42;
   } __finally {
@@ -163,7 +163,7 @@ int finally_with_return() {
 // CHECK-NOT: br label
 // CHECK: ret void
 
-int nested___finally___finally() {
+int nested___finally___finally(void) {
   __try {
     __try {
     } __finally {
@@ -198,7 +198,7 @@ int nested___finally___finally() {
 
 // FIXME: Our behavior seems suspiciously 
diff erent.
 
-int nested___finally___finally_with_eh_edge() {
+int nested___finally___finally_with_eh_edge(void) {
   __try {
     __try {
       might_crash();
@@ -243,7 +243,7 @@ int nested___finally___finally_with_eh_edge() {
 // CHECK-SAME: [[finally_attrs]]
 // CHECK: unreachable
 
-void finally_within_finally() {
+void finally_within_finally(void) {
   __try {
     might_crash();
   } __finally {
@@ -271,7 +271,7 @@ void finally_within_finally() {
 // CHECK-SAME: [[finally_attrs]]
 
 void cleanup_with_func(const char *);
-void finally_with_func() {
+void finally_with_func(void) {
   __try {
     might_crash();
   } __finally {

diff  --git a/clang/test/CodeGen/exceptions-seh-leave.c b/clang/test/CodeGen/exceptions-seh-leave.c
index d8f60f2a874e5..ade68464caabc 100644
--- a/clang/test/CodeGen/exceptions-seh-leave.c
+++ b/clang/test/CodeGen/exceptions-seh-leave.c
@@ -6,7 +6,7 @@ void g(void);
 // __leave with __except
 
 // Nothing in the __try block can trap, so __try.cont isn't created.
-int __leave_with___except_simple() {
+int __leave_with___except_simple(void) {
   int myres = 0;
   __try {
     myres = 15;
@@ -26,7 +26,7 @@ int __leave_with___except_simple() {
 
 
 // The "normal" case.
-int __leave_with___except() {
+int __leave_with___except(void) {
   int myres = 0;
   __try {
     g();
@@ -58,7 +58,7 @@ void abort(void) __attribute__((noreturn));
 
 // Nothing in the __try block can trap, so __finally.cont and friends aren't
 // created.
-int __leave_with___finally_simple() {
+int __leave_with___finally_simple(void) {
   int myres = 0;
   __try {
     myres = 15;
@@ -78,7 +78,7 @@ int __leave_with___finally_simple() {
 // CHECK-NEXT: call void @"?fin$0 at 0@__leave_with___finally_simple@@"(i8 noundef 0, i8* noundef %[[fp]])
 
 // __finally block doesn't return, __finally.cont doesn't exist.
-int __leave_with___finally_noreturn() {
+int __leave_with___finally_noreturn(void) {
   int myres = 0;
   __try {
     myres = 15;
@@ -98,7 +98,7 @@ int __leave_with___finally_noreturn() {
 // CHECK-NEXT: call void @"?fin$0 at 0@__leave_with___finally_noreturn@@"(i8 noundef 0, i8* noundef %[[fp]])
 
 // The "normal" case.
-int __leave_with___finally() {
+int __leave_with___finally(void) {
   int myres = 0;
   __try {
     g();
@@ -125,7 +125,7 @@ int __leave_with___finally() {
 //////////////////////////////////////////////////////////////////////////////
 // Mixed, nested cases.
 
-int nested___except___finally() {
+int nested___except___finally(void) {
   int myres = 0;
   __try {
     __try {
@@ -175,7 +175,7 @@ int nested___except___finally() {
 // CHECK: call void @g()
 // CHECK: unreachable
 
-int nested___except___except() {
+int nested___except___except(void) {
   int myres = 0;
   __try {
     __try {
@@ -229,7 +229,7 @@ int nested___except___except() {
 // CHECK: [[tryleave]]
 // CHECK-NEXT: br label %[[trycont4]]
 
-int nested___finally___except() {
+int nested___finally___except(void) {
   int myres = 0;
   __try {
     __try {
@@ -283,7 +283,7 @@ int nested___finally___except() {
 // CHECK-LABEL: define internal void @"?fin$0 at 0@nested___finally___except@@"(i8 noundef %abnormal_termination, i8* noundef %frame_pointer)
 // CHECK: ret void
 
-int nested___finally___finally() {
+int nested___finally___finally(void) {
   int myres = 0;
   __try {
     __try {

diff  --git a/clang/test/CodeGen/exceptions-seh-nested-finally.c b/clang/test/CodeGen/exceptions-seh-nested-finally.c
index 332006ab7e221..07b3d400f5619 100644
--- a/clang/test/CodeGen/exceptions-seh-nested-finally.c
+++ b/clang/test/CodeGen/exceptions-seh-nested-finally.c
@@ -11,7 +11,7 @@
 // CHECK-LABEL: define internal void @"?fin$0 at 0@main@@"({{i8 noundef( zeroext)?}} %abnormal_termination, i8* noundef %frame_pointer)
 // CHECK: call void @"?fin$1 at 0@main@@"({{i8 noundef( zeroext)?}} 0, i8* noundef %frame_pointer)
 int
-main() {
+main(void) {
   int Check = 0;
   __try {
     Check = 3;

diff  --git a/clang/test/CodeGen/exceptions-strictfp.c b/clang/test/CodeGen/exceptions-strictfp.c
index 98d57214f503e..7d618a381d982 100644
--- a/clang/test/CodeGen/exceptions-strictfp.c
+++ b/clang/test/CodeGen/exceptions-strictfp.c
@@ -4,7 +4,7 @@
 // function definitions).
 
 // rdar://problem/8621849
-void test1() {
+void test1(void) {
   extern void test1_helper(void (^)(int));
 
   // CHECK: define{{.*}} arm_aapcscc void @test1() [[STRICTFP0:#[0-9]+]] personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*)
@@ -19,7 +19,7 @@ void test1() {
 }
 
 void test2_helper();
-void test2() {
+void test2(void) {
   // CHECK: define{{.*}} arm_aapcscc void @test2() [[STRICTFP0]] personality i8* bitcast (i32 (...)* @__gcc_personality_sj0 to i8*) {
   __block int x = 10;
   ^{ (void)x; };

diff  --git a/clang/test/CodeGen/exceptions.c b/clang/test/CodeGen/exceptions.c
index d69a55568d6e4..92100f19df991 100644
--- a/clang/test/CodeGen/exceptions.c
+++ b/clang/test/CodeGen/exceptions.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -triple armv7-apple-unknown -emit-llvm -o - %s -fexceptions -exception-model=sjlj -fblocks | FileCheck %s -check-prefix=CHECK-ARM
 
 // rdar://problem/8621849
-void test1() {
+void test1(void) {
   extern void test1_helper(void (^)(int));
 
   // CHECK-LABEL:     define{{.*}} void @test1() {{.*}} personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*)
@@ -21,7 +21,7 @@ void test1() {
 }
 
 void test2_helper();
-void test2() {
+void test2(void) {
   __block int x = 10;
   ^{ (void)x; };
   test2_helper(5, 6, 7);

diff  --git a/clang/test/CodeGen/exprs-strictfp.c b/clang/test/CodeGen/exprs-strictfp.c
index 194aa5d632dcd..3fb39ddba0c0c 100644
--- a/clang/test/CodeGen/exprs-strictfp.c
+++ b/clang/test/CodeGen/exprs-strictfp.c
@@ -8,7 +8,7 @@
 
 #pragma float_control(except, on)
 
-void eMaisUma() {
+void eMaisUma(void) {
   double t[1];
   if (*t)
     return;

diff  --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c
index 5d5a69d28f86d..5e1f3edc45b29 100644
--- a/clang/test/CodeGen/exprs.c
+++ b/clang/test/CodeGen/exprs.c
@@ -15,10 +15,10 @@ void *test(int *i) {
 }
 
 _Bool test2b; 
-int test2() { if (test2b); return 0; }
+int test2(void) { if (test2b); return 0; }
 
 // PR1921
-int test3() {
+int test3(void) {
   const unsigned char *bp;
   bp -= (short)1;
 }
@@ -26,7 +26,7 @@ int test3() {
 // PR2080 - sizeof void
 int t1 = sizeof(void);
 int t2 = __alignof__(void);
-void test4() {
+void test4(void) {
   t1 = sizeof(void);
   t2 = __alignof__(void);
   
@@ -40,14 +40,14 @@ int test5(const float x, float float_number) {
 }
 
 // this one shouldn't fold
-int ola() {
+int ola(void) {
   int a=2;
   if ((0, (int)a) & 2) { return 1; }
   return 2;
 }
 
 // this one shouldn't fold as well
-void eMaisUma() {
+void eMaisUma(void) {
   double t[1];
   if (*t)
     return;
@@ -63,7 +63,7 @@ struct X {
   int Y;
 };
 struct X foo();
-int bar() {
+int bar(void) {
   return ((struct X)foo()).Y + 1;
 }
 
@@ -80,14 +80,14 @@ unsigned f1(void) {
 }  
 
 union f3_x {int x; float y;};
-int f3() {return ((union f3_x)2).x;}
+int f3(void) {return ((union f3_x)2).x;}
 
 union f4_y {int x; _Complex float y;};
-_Complex float f4() {return ((union f4_y)(_Complex float)2.0).y;}
+_Complex float f4(void) {return ((union f4_y)(_Complex float)2.0).y;}
 
 struct f5_a { int a; } f5_a;
 union f5_z {int x; struct f5_a y;};
-struct f5_a f5() {return ((union f5_z)f5_a).y;}
+struct f5_a f5(void) {return ((union f5_z)f5_a).y;}
 
 // ?: in "lvalue"
 struct s6 { int f0; };
@@ -96,12 +96,12 @@ int f6(int a0, struct s6 a1, struct s6 a2) {
 }
 
 // PR4026
-void f7() {
+void f7(void) {
   __func__;
 }
 
 // PR4067
-int f8() {
+int f8(void) {
   return ({ foo(); }).Y;
 }
 
@@ -116,7 +116,7 @@ void f9(struct S *x) {
   foo(((void)1, x->c).tab[0]);
 }
 
-void f10() {
+void f10(void) {
   __builtin_sin(0);
 }
 
@@ -133,7 +133,7 @@ int f11(long X) {
 // CHECK-NEXT: load i32, i32* [[T0]], align 4
 }
 
-int f12() {
+int f12(void) {
   // PR3150
   // CHECK-LABEL: define{{.*}} i32 @f12
   // CHECK: ret i32 1
@@ -153,7 +153,7 @@ void f14(struct s14 *a) {
 }
 
 // CHECK-LABEL: define{{.*}} void @f15
-void f15() {
+void f15(void) {
   extern void f15_start(void);
   f15_start();
   // CHECK: call void @f15_start()
@@ -170,7 +170,7 @@ void f15() {
 
 // PR8967: this was crashing
 // CHECK-LABEL: define{{.*}} void @f16()
-void f16() {
+void f16(void) {
   __extension__({ goto lbl; });
  lbl:
   ;
@@ -178,7 +178,7 @@ void f16() {
 
 // PR13704: negative increment in i128 is not preserved.
 // CHECK-LABEL: define{{.*}} void @f17()
-void f17() {
+void f17(void) {
   extern void extfunc(__int128);
   __int128 x = 2;
   x--;
@@ -191,14 +191,14 @@ typedef union u {
     int i;
 } strct;
 int returns_int(void);
-void f18() {
+void f18(void) {
   (strct)returns_int();
 }
 // CHECK-LABEL: define{{.*}} void @f18()
 // CHECK: call i32 @returns_int()
 
 // Ensure the right stmt is returned
-int f19() {
+int f19(void) {
   return ({ 3;;4;; });
 }
 // CHECK-LABEL: define{{.*}} i32 @f19()

diff  --git a/clang/test/CodeGen/ext-int-cc.c b/clang/test/CodeGen/ext-int-cc.c
index 517e3cd2f8587..88b649934f4d7 100644
--- a/clang/test/CodeGen/ext-int-cc.c
+++ b/clang/test/CodeGen/ext-int-cc.c
@@ -152,7 +152,7 @@ void ParamPassing4(_BitInt(129) a) {}
 // ARM-NOT: define{{.*}} arm_aapcscc void @ParamPassing4(i129* byval(i129) align 8 %{{.+}})
 #endif
 
-_BitInt(63) ReturnPassing(){}
+_BitInt(63) ReturnPassing(void){}
 // LIN64: define{{.*}} i64 @ReturnPassing(
 // WIN64: define dso_local i63 @ReturnPassing(
 // LIN32: define{{.*}} i63 @ReturnPassing(
@@ -181,7 +181,7 @@ _BitInt(63) ReturnPassing(){}
 // AARCH64DARWIN: define{{.*}} i63 @ReturnPassing(
 // ARM: define{{.*}} arm_aapcscc i63 @ReturnPassing(
 
-_BitInt(64) ReturnPassing2(){}
+_BitInt(64) ReturnPassing2(void){}
 // LIN64: define{{.*}} i64 @ReturnPassing2(
 // WIN64: define dso_local i64 @ReturnPassing2(
 // LIN32: define{{.*}} i64 @ReturnPassing2(
@@ -210,7 +210,7 @@ _BitInt(64) ReturnPassing2(){}
 // AARCH64DARWIN: define{{.*}} i64 @ReturnPassing2(
 // ARM: define{{.*}} arm_aapcscc i64 @ReturnPassing2(
 
-_BitInt(127) ReturnPassing3(){}
+_BitInt(127) ReturnPassing3(void){}
 // LIN64: define{{.*}} { i64, i64 } @ReturnPassing3(
 // WIN64: define dso_local void @ReturnPassing3(i127* noalias sret
 // LIN32: define{{.*}} void @ReturnPassing3(i127* noalias sret
@@ -241,7 +241,7 @@ _BitInt(127) ReturnPassing3(){}
 // AARCH64DARWIN: define{{.*}} i127 @ReturnPassing3(
 // ARM: define{{.*}} arm_aapcscc void @ReturnPassing3(i127* noalias sret
 
-_BitInt(128) ReturnPassing4(){}
+_BitInt(128) ReturnPassing4(void){}
 // LIN64: define{{.*}} { i64, i64 } @ReturnPassing4(
 // WIN64: define dso_local void @ReturnPassing4(i128* noalias sret
 // LIN32: define{{.*}} void @ReturnPassing4(i128* noalias sret
@@ -271,7 +271,7 @@ _BitInt(128) ReturnPassing4(){}
 // ARM: define{{.*}} arm_aapcscc void @ReturnPassing4(i128* noalias sret
 
 #if __BITINT_MAXWIDTH__ > 128
-_BitInt(129) ReturnPassing5(){}
+_BitInt(129) ReturnPassing5(void){}
 // LIN64-NOT: define{{.*}} void @ReturnPassing5(i129* noalias sret
 // WIN64-NOT: define dso_local void @ReturnPassing5(i129* noalias sret
 // LIN32-NOT: define{{.*}} void @ReturnPassing5(i129* noalias sret
@@ -302,8 +302,8 @@ _BitInt(129) ReturnPassing5(){}
 
 // SparcV9 is odd in that it has a return-size limit of 256, not 128 or 64
 // like other platforms, so test to make sure this behavior will still work.
-_BitInt(256) ReturnPassing6() {}
+_BitInt(256) ReturnPassing6(void) {}
 // SPARCV9-NOT: define{{.*}} i256 @ReturnPassing6(
-_BitInt(257) ReturnPassing7() {}
+_BitInt(257) ReturnPassing7(void) {}
 // SPARCV9-NOT: define{{.*}} void @ReturnPassing7(i257* noalias sret
 #endif

diff  --git a/clang/test/CodeGen/ext-int.c b/clang/test/CodeGen/ext-int.c
index 295fa11cf57a4..c19935ae8631b 100644
--- a/clang/test/CodeGen/ext-int.c
+++ b/clang/test/CodeGen/ext-int.c
@@ -32,7 +32,7 @@ struct S {
   _BitInt(17) C;
 };
 
-void OffsetOfTest() {
+void OffsetOfTest(void) {
   // CHECK: define {{.*}}void @OffsetOfTest
   int A = __builtin_offsetof(struct S,A);
   // CHECK: store i32 0, i32* %{{.+}}

diff  --git a/clang/test/CodeGen/ext-vector-indexing.c b/clang/test/CodeGen/ext-vector-indexing.c
index fff1fa45464cc..07877613610a9 100644
--- a/clang/test/CodeGen/ext-vector-indexing.c
+++ b/clang/test/CodeGen/ext-vector-indexing.c
@@ -2,7 +2,7 @@
 
 typedef __attribute__(( ext_vector_type(4) )) float float4;
 // CHECK: @test
-void test()
+void test(void)
 {
   float4 va;
   va.hi[0] = 3.0;

diff  --git a/clang/test/CodeGen/ext-vector.c b/clang/test/CodeGen/ext-vector.c
index faa6ede6a24d3..2fce096e2531a 100644
--- a/clang/test/CodeGen/ext-vector.c
+++ b/clang/test/CodeGen/ext-vector.c
@@ -27,7 +27,7 @@ float f;
 // CHECK: shufflevector {{.*}} <i32 1, i32 1, i32 1, i32 1>
 // CHECK: insertelement
 // CHECK: shufflevector {{.*}} <i32 1, i32 0>
-void test2() {
+void test2(void) {
     vec2 = vec4.xy;  // shorten
     f = vec2.x;      // extract elt
     vec4 = vec4.yyyy;  // splat
@@ -228,8 +228,8 @@ int test10(int4 V) {
 
 // CHECK: @test11
 // CHECK: extractelement <4 x i32>
-int4 test11a();
-int test11() {
+int4 test11a(void);
+int test11(void) {
   return test11a().x;
 }
 
@@ -307,7 +307,7 @@ typedef __attribute__(( ext_vector_type(16) )) float float16;
 float16 vec16, vec16_2;
 
 // CHECK: @test_rgba
-void test_rgba() {
+void test_rgba(void) {
   // CHECK: fadd <4 x float>
   vec4_2 = vec4.abgr + vec4;
 

diff  --git a/clang/test/CodeGen/extend-arg-64.c b/clang/test/CodeGen/extend-arg-64.c
index 4018be6cb4fba..dc26965418b25 100644
--- a/clang/test/CodeGen/extend-arg-64.c
+++ b/clang/test/CodeGen/extend-arg-64.c
@@ -39,7 +39,7 @@ double dd;
 __int128 i128;
 #endif
 
-int test() {
+int test(void) {
   // CHECK: define{{.*}} i32 @test{{.*}}
 
   // CHECKEXT:  [[TAG_u32:%.*]] = load i32, i32* @u32{{.*}}

diff  --git a/clang/test/CodeGen/extern-block-var.c b/clang/test/CodeGen/extern-block-var.c
index 329f109568427..73ef9243919c0 100644
--- a/clang/test/CodeGen/extern-block-var.c
+++ b/clang/test/CodeGen/extern-block-var.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o %t
 
-int f() {
+int f(void) {
   extern int a;
   return a;
 }

diff  --git a/clang/test/CodeGen/extern-weak.c b/clang/test/CodeGen/extern-weak.c
index 6a78a33af65a3..5cee452979465 100644
--- a/clang/test/CodeGen/extern-weak.c
+++ b/clang/test/CodeGen/extern-weak.c
@@ -3,10 +3,10 @@
 
 #if !defined(__linux__) && !defined(__FreeBSD__) && \
     !defined(__OpenBSD__) && !defined(__CYGWIN__) && !defined(__DragonFly__)
-void foo() __attribute__((weak_import));
+void foo(void) __attribute__((weak_import));
 #else
-void foo() __attribute__((weak));
+void foo(void) __attribute__((weak));
 #endif
 
-void bar() { foo(); }
+void bar(void) { foo(); }
 

diff  --git a/clang/test/CodeGen/flip-dllimport.c b/clang/test/CodeGen/flip-dllimport.c
index d20479d8f6e84..fcc1689f6aa7c 100644
--- a/clang/test/CodeGen/flip-dllimport.c
+++ b/clang/test/CodeGen/flip-dllimport.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -emit-llvm -o - %s | FileCheck %s
 
-__declspec(dllimport) void f();
-void g() { f(); } // use it
+__declspec(dllimport) void f(void);
+void g(void) { f(); } // use it
 
 // CHECK: define dso_local dllexport void @f
-void f() { }
+void f(void) { }

diff  --git a/clang/test/CodeGen/forceinline.c b/clang/test/CodeGen/forceinline.c
index 9a21c0dd2c786..b7729cc516570 100644
--- a/clang/test/CodeGen/forceinline.c
+++ b/clang/test/CodeGen/forceinline.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -triple i686-win32 -emit-llvm -fms-extensions < %s | FileCheck %s
 
-void bar() {
+void bar(void) {
 }
 
 // CHECK-NOT: foo
-__forceinline void foo() {
+__forceinline void foo(void) {
   bar();
 }
 
-void i_want_bar() {
+void i_want_bar(void) {
 // CHECK: call void @bar
   foo();
 }

diff  --git a/clang/test/CodeGen/fpconstrained.c b/clang/test/CodeGen/fpconstrained.c
index 643c0120eac5a..dd853527c2155 100644
--- a/clang/test/CodeGen/fpconstrained.c
+++ b/clang/test/CodeGen/fpconstrained.c
@@ -8,7 +8,7 @@
 
 float f0, f1, f2;
 
-void foo() {
+void foo(void) {
   // CHECK-LABEL: define {{.*}}void @foo()
 
   // MAYTRAP: llvm.experimental.constrained.fadd.f32(float %{{.*}}, float %{{.*}}, metadata !"round.tonearest", metadata !"fpexcept.maytrap")

diff  --git a/clang/test/CodeGen/func-aligned.c b/clang/test/CodeGen/func-aligned.c
index 99067a8c7ee92..aec53b08c58c6 100644
--- a/clang/test/CodeGen/func-aligned.c
+++ b/clang/test/CodeGen/func-aligned.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck %s
 
 // rdar://7270273
-void foo() __attribute__((aligned (64)));
-void foo() {
+void foo(void) __attribute__((aligned (64)));
+void foo(void) {
 // CHECK: define{{.*}} void @foo() {{.*}} align 64
 }

diff  --git a/clang/test/CodeGen/func-in-block.c b/clang/test/CodeGen/func-in-block.c
index 937390c1cdb6b..d61b5791355d8 100644
--- a/clang/test/CodeGen/func-in-block.c
+++ b/clang/test/CodeGen/func-in-block.c
@@ -4,7 +4,7 @@
 extern void PRINTF(const char *);
 extern void B(void (^)(void));
 
-int main()
+int main(void)
 {
     PRINTF(__func__);
     B(

diff  --git a/clang/test/CodeGen/func-ptr-cast-decl.c b/clang/test/CodeGen/func-ptr-cast-decl.c
index 28364dec9aaec..f3f77576ac7b8 100644
--- a/clang/test/CodeGen/func-ptr-cast-decl.c
+++ b/clang/test/CodeGen/func-ptr-cast-decl.c
@@ -4,4 +4,4 @@
 
 int q_sk_num(void *a);
 typedef int (*fptr)(double);
-void a() { ((fptr)q_sk_num)(0); }
+void a(void) { ((fptr)q_sk_num)(0); }

diff  --git a/clang/test/CodeGen/function-min-vector-width.c b/clang/test/CodeGen/function-min-vector-width.c
index fb22a4fce6d9f..402e60781c694 100644
--- a/clang/test/CodeGen/function-min-vector-width.c
+++ b/clang/test/CodeGen/function-min-vector-width.c
@@ -2,6 +2,6 @@
 
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
 
-void __attribute((__min_vector_width__(128))) foo() {}
+void __attribute((__min_vector_width__(128))) foo(void) {}
 
 // CHECK: "min-legal-vector-width"="128"

diff  --git a/clang/test/CodeGen/function-sections.c b/clang/test/CodeGen/function-sections.c
index 60921cb4badaa..bf08f913f2d9a 100644
--- a/clang/test/CodeGen/function-sections.c
+++ b/clang/test/CodeGen/function-sections.c
@@ -12,7 +12,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -S -fdata-sections -o - | FileCheck %s --check-prefix=DATA_SECT
 
 const int hello = 123;
-void world() {}
+void world(void) {}
 
 // PLAIN-NOT: section
 // PLAIN: world:

diff  --git a/clang/test/CodeGen/function-target-features.c b/clang/test/CodeGen/function-target-features.c
index 6b32d3ddbcda6..0d8bfc7e4e44c 100644
--- a/clang/test/CodeGen/function-target-features.c
+++ b/clang/test/CodeGen/function-target-features.c
@@ -13,7 +13,7 @@
 // RUN: %clang_cc1 -triple arm-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=SOFT-FLOAT
 // RUN: %clang_cc1 -triple mips-unknown-unknown -emit-llvm -o - %s -target-feature +soft-float | FileCheck %s -check-prefix=SOFT-FLOAT
 
-void foo() {}
+void foo(void) {}
 
 // AVX-FEATURE: "target-features"{{.*}}+avx
 // AVX-NO-CPU-NOT: target-cpu

diff  --git a/clang/test/CodeGen/funique-sections.c b/clang/test/CodeGen/funique-sections.c
index 1473fe57db01a..e24d13c0a465b 100644
--- a/clang/test/CodeGen/funique-sections.c
+++ b/clang/test/CodeGen/funique-sections.c
@@ -4,7 +4,7 @@
 // RUN: %clang_cc1 -triple x86_64-pc-linux -S -ffunction-sections -fdata-sections -o - < %s | FileCheck %s --check-prefix=UNIQUE
 
 const int hello = 123;
-void world() {}
+void world(void) {}
 
 // CHECK: .section .text,"ax", at progbits,unique
 // CHECK: .section .rodata,"a", at progbits,unique

diff  --git a/clang/test/CodeGen/global-decls.c b/clang/test/CodeGen/global-decls.c
index 89e899f5baba8..b817c50a133b6 100644
--- a/clang/test/CodeGen/global-decls.c
+++ b/clang/test/CodeGen/global-decls.c
@@ -14,7 +14,7 @@ int g0_def __attribute__((weak)) = 52;
 int __attribute__((weak)) g1_def (void) { return 0; }
 
 // Force _ext references
-void f0() {
+void f0(void) {
   int a = g0_ext;
   int b = g1_ext();
 }

diff  --git a/clang/test/CodeGen/globalinit.c b/clang/test/CodeGen/globalinit.c
index e07a419418bc0..960b4cd6f0d49 100644
--- a/clang/test/CodeGen/globalinit.c
+++ b/clang/test/CodeGen/globalinit.c
@@ -4,9 +4,9 @@ int A[10] = { 1,2,3,4,5 };
 
 
 extern int x[];
-void foo() { x[0] = 1; }
+void foo(void) { x[0] = 1; }
 int x[10];
-void bar() { x[0] = 1; }
+void bar(void) { x[0] = 1; }
 
 
 extern int y[];
@@ -28,7 +28,7 @@ char *test(int c) {
 
 
 _Bool booltest = 0;
-void booltest2() {
+void booltest2(void) {
   static _Bool booltest3 = 4;
 }
 

diff  --git a/clang/test/CodeGen/guard_nocf.c b/clang/test/CodeGen/guard_nocf.c
index 2fe55736f2379..57013c4e26383 100644
--- a/clang/test/CodeGen/guard_nocf.c
+++ b/clang/test/CodeGen/guard_nocf.c
@@ -1,17 +1,17 @@
 // RUN: %clang_cc1 -triple %ms_abi_triple -fms-extensions -emit-llvm -O2 -o - %s | FileCheck %s
 
-void target_func();
-void (*func_ptr)() = &target_func;
+void target_func(void);
+void (*func_ptr)(void) = &target_func;
 
 // The "guard_nocf" attribute must be added.
-__declspec(guard(nocf)) void nocf0() {
+__declspec(guard(nocf)) void nocf0(void) {
   (*func_ptr)();
 }
 // CHECK-LABEL: nocf0
 // CHECK: call{{.*}}[[NOCF:#[0-9]+]]
 
 // The "guard_nocf" attribute must *not* be added.
-void cf0() {
+void cf0(void) {
   (*func_ptr)();
 }
 // CHECK-LABEL: cf0
@@ -19,15 +19,15 @@ void cf0() {
 
 // If the modifier is present on either the function declaration or definition,
 // the "guard_nocf" attribute must be added.
-__declspec(guard(nocf)) void nocf1();
-void nocf1() {
+__declspec(guard(nocf)) void nocf1(void);
+void nocf1(void) {
   (*func_ptr)();
 }
 // CHECK-LABEL: nocf1
 // CHECK: call{{.*}}[[NOCF:#[0-9]+]]
 
-void nocf2();
-__declspec(guard(nocf)) void nocf2() {
+void nocf2(void);
+__declspec(guard(nocf)) void nocf2(void) {
   (*func_ptr)();
 }
 // CHECK-LABEL: nocf2
@@ -35,7 +35,7 @@ __declspec(guard(nocf)) void nocf2() {
 
 // When inlining a function, the "guard_nocf" attribute on indirect calls must
 // be preserved.
-void nocf3() {
+void nocf3(void) {
   nocf0();
 }
 // CHECK-LABEL: nocf3
@@ -43,7 +43,7 @@ void nocf3() {
 
 // When inlining into a function marked as __declspec(guard(nocf)), the
 // "guard_nocf" attribute must *not* be added to the inlined calls.
-__declspec(guard(nocf)) void cf1() {
+__declspec(guard(nocf)) void cf1(void) {
   cf0();
 }
 // CHECK-LABEL: cf1

diff  --git a/clang/test/CodeGen/hexagon-inline-asm-reg-names.c b/clang/test/CodeGen/hexagon-inline-asm-reg-names.c
index 2a107eba613c7..234bd711a679c 100644
--- a/clang/test/CodeGen/hexagon-inline-asm-reg-names.c
+++ b/clang/test/CodeGen/hexagon-inline-asm-reg-names.c
@@ -1,921 +1,921 @@
 // RUN: %clang_cc1 -triple hexagon-unknown-elf -target-feature +hvx -target-feature +hvx-length128b -emit-llvm -o - %s | FileCheck %s
 
-void test_r0() {
+void test_r0(void) {
   // CHECK: define {{.*}}void @test_r0
   // CHECK: call void asm sideeffect "nop", "~{r0}"()
   asm("nop" ::: "r0");
 }
-void test_r1() {
+void test_r1(void) {
   // CHECK: define {{.*}}void @test_r1
   // CHECK: call void asm sideeffect "nop", "~{r1}"()
   asm("nop" ::: "r1");
 }
-void test_r2() {
+void test_r2(void) {
   // CHECK: define {{.*}}void @test_r2
   // CHECK: call void asm sideeffect "nop", "~{r2}"()
   asm("nop" ::: "r2");
 }
-void test_r3() {
+void test_r3(void) {
   // CHECK: define {{.*}}void @test_r3
   // CHECK: call void asm sideeffect "nop", "~{r3}"()
   asm("nop" ::: "r3");
 }
-void test_r4() {
+void test_r4(void) {
   // CHECK: define {{.*}}void @test_r4
   // CHECK: call void asm sideeffect "nop", "~{r4}"()
   asm("nop" ::: "r4");
 }
-void test_r5() {
+void test_r5(void) {
   // CHECK: define {{.*}}void @test_r5
   // CHECK: call void asm sideeffect "nop", "~{r5}"()
   asm("nop" ::: "r5");
 }
-void test_r6() {
+void test_r6(void) {
   // CHECK: define {{.*}}void @test_r6
   // CHECK: call void asm sideeffect "nop", "~{r6}"()
   asm("nop" ::: "r6");
 }
-void test_r7() {
+void test_r7(void) {
   // CHECK: define {{.*}}void @test_r7
   // CHECK: call void asm sideeffect "nop", "~{r7}"()
   asm("nop" ::: "r7");
 }
-void test_r8() {
+void test_r8(void) {
   // CHECK: define {{.*}}void @test_r8
   // CHECK: call void asm sideeffect "nop", "~{r8}"()
   asm("nop" ::: "r8");
 }
-void test_r9() {
+void test_r9(void) {
   // CHECK: define {{.*}}void @test_r9
   // CHECK: call void asm sideeffect "nop", "~{r9}"()
   asm("nop" ::: "r9");
 }
-void test_r10() {
+void test_r10(void) {
   // CHECK: define {{.*}}void @test_r10
   // CHECK: call void asm sideeffect "nop", "~{r10}"()
   asm("nop" ::: "r10");
 }
-void test_r11() {
+void test_r11(void) {
   // CHECK: define {{.*}}void @test_r11
   // CHECK: call void asm sideeffect "nop", "~{r11}"()
   asm("nop" ::: "r11");
 }
-void test_r12() {
+void test_r12(void) {
   // CHECK: define {{.*}}void @test_r12
   // CHECK: call void asm sideeffect "nop", "~{r12}"()
   asm("nop" ::: "r12");
 }
-void test_r13() {
+void test_r13(void) {
   // CHECK: define {{.*}}void @test_r13
   // CHECK: call void asm sideeffect "nop", "~{r13}"()
   asm("nop" ::: "r13");
 }
-void test_r14() {
+void test_r14(void) {
   // CHECK: define {{.*}}void @test_r14
   // CHECK: call void asm sideeffect "nop", "~{r14}"()
   asm("nop" ::: "r14");
 }
-void test_r15() {
+void test_r15(void) {
   // CHECK: define {{.*}}void @test_r15
   // CHECK: call void asm sideeffect "nop", "~{r15}"()
   asm("nop" ::: "r15");
 }
-void test_r16() {
+void test_r16(void) {
   // CHECK: define {{.*}}void @test_r16
   // CHECK: call void asm sideeffect "nop", "~{r16}"()
   asm("nop" ::: "r16");
 }
-void test_r17() {
+void test_r17(void) {
   // CHECK: define {{.*}}void @test_r17
   // CHECK: call void asm sideeffect "nop", "~{r17}"()
   asm("nop" ::: "r17");
 }
-void test_r18() {
+void test_r18(void) {
   // CHECK: define {{.*}}void @test_r18
   // CHECK: call void asm sideeffect "nop", "~{r18}"()
   asm("nop" ::: "r18");
 }
-void test_r19() {
+void test_r19(void) {
   // CHECK: define {{.*}}void @test_r19
   // CHECK: call void asm sideeffect "nop", "~{r19}"()
   asm("nop" ::: "r19");
 }
-void test_r20() {
+void test_r20(void) {
   // CHECK: define {{.*}}void @test_r20
   // CHECK: call void asm sideeffect "nop", "~{r20}"()
   asm("nop" ::: "r20");
 }
-void test_r21() {
+void test_r21(void) {
   // CHECK: define {{.*}}void @test_r21
   // CHECK: call void asm sideeffect "nop", "~{r21}"()
   asm("nop" ::: "r21");
 }
-void test_r22() {
+void test_r22(void) {
   // CHECK: define {{.*}}void @test_r22
   // CHECK: call void asm sideeffect "nop", "~{r22}"()
   asm("nop" ::: "r22");
 }
-void test_r23() {
+void test_r23(void) {
   // CHECK: define {{.*}}void @test_r23
   // CHECK: call void asm sideeffect "nop", "~{r23}"()
   asm("nop" ::: "r23");
 }
-void test_r24() {
+void test_r24(void) {
   // CHECK: define {{.*}}void @test_r24
   // CHECK: call void asm sideeffect "nop", "~{r24}"()
   asm("nop" ::: "r24");
 }
-void test_r25() {
+void test_r25(void) {
   // CHECK: define {{.*}}void @test_r25
   // CHECK: call void asm sideeffect "nop", "~{r25}"()
   asm("nop" ::: "r25");
 }
-void test_r26() {
+void test_r26(void) {
   // CHECK: define {{.*}}void @test_r26
   // CHECK: call void asm sideeffect "nop", "~{r26}"()
   asm("nop" ::: "r26");
 }
-void test_r27() {
+void test_r27(void) {
   // CHECK: define {{.*}}void @test_r27
   // CHECK: call void asm sideeffect "nop", "~{r27}"()
   asm("nop" ::: "r27");
 }
-void test_r28() {
+void test_r28(void) {
   // CHECK: define {{.*}}void @test_r28
   // CHECK: call void asm sideeffect "nop", "~{r28}"()
   asm("nop" ::: "r28");
 }
-void test_r29() {
+void test_r29(void) {
   // CHECK: define {{.*}}void @test_r29
   // CHECK: call void asm sideeffect "nop", "~{r29}"()
   asm("nop" ::: "r29");
 }
-void test_r30() {
+void test_r30(void) {
   // CHECK: define {{.*}}void @test_r30
   // CHECK: call void asm sideeffect "nop", "~{r30}"()
   asm("nop" ::: "r30");
 }
-void test_r31() {
+void test_r31(void) {
   // CHECK: define {{.*}}void @test_r31
   // CHECK: call void asm sideeffect "nop", "~{r31}"()
   asm("nop" ::: "r31");
 }
-void test_r1_0() {
+void test_r1_0(void) {
   // CHECK: define {{.*}}void @test_r1_0
   // CHECK: call void asm sideeffect "nop", "~{r1:0}"()
   asm("nop" ::: "r1:0");
 }
-void test_r3_2() {
+void test_r3_2(void) {
   // CHECK: define {{.*}}void @test_r3_2
   // CHECK: call void asm sideeffect "nop", "~{r3:2}"()
   asm("nop" ::: "r3:2");
 }
-void test_r5_4() {
+void test_r5_4(void) {
   // CHECK: define {{.*}}void @test_r5_4
   // CHECK: call void asm sideeffect "nop", "~{r5:4}"()
   asm("nop" ::: "r5:4");
 }
-void test_r7_6() {
+void test_r7_6(void) {
   // CHECK: define {{.*}}void @test_r7_6
   // CHECK: call void asm sideeffect "nop", "~{r7:6}"()
   asm("nop" ::: "r7:6");
 }
-void test_r9_8() {
+void test_r9_8(void) {
   // CHECK: define {{.*}}void @test_r9_8
   // CHECK: call void asm sideeffect "nop", "~{r9:8}"()
   asm("nop" ::: "r9:8");
 }
-void test_r11_10() {
+void test_r11_10(void) {
   // CHECK: define {{.*}}void @test_r11_10
   // CHECK: call void asm sideeffect "nop", "~{r11:10}"()
   asm("nop" ::: "r11:10");
 }
-void test_r13_12() {
+void test_r13_12(void) {
   // CHECK: define {{.*}}void @test_r13_12
   // CHECK: call void asm sideeffect "nop", "~{r13:12}"()
   asm("nop" ::: "r13:12");
 }
-void test_r15_14() {
+void test_r15_14(void) {
   // CHECK: define {{.*}}void @test_r15_14
   // CHECK: call void asm sideeffect "nop", "~{r15:14}"()
   asm("nop" ::: "r15:14");
 }
-void test_r17_16() {
+void test_r17_16(void) {
   // CHECK: define {{.*}}void @test_r17_16
   // CHECK: call void asm sideeffect "nop", "~{r17:16}"()
   asm("nop" ::: "r17:16");
 }
-void test_r19_18() {
+void test_r19_18(void) {
   // CHECK: define {{.*}}void @test_r19_18
   // CHECK: call void asm sideeffect "nop", "~{r19:18}"()
   asm("nop" ::: "r19:18");
 }
-void test_r21_20() {
+void test_r21_20(void) {
   // CHECK: define {{.*}}void @test_r21_20
   // CHECK: call void asm sideeffect "nop", "~{r21:20}"()
   asm("nop" ::: "r21:20");
 }
-void test_r23_22() {
+void test_r23_22(void) {
   // CHECK: define {{.*}}void @test_r23_22
   // CHECK: call void asm sideeffect "nop", "~{r23:22}"()
   asm("nop" ::: "r23:22");
 }
-void test_r25_24() {
+void test_r25_24(void) {
   // CHECK: define {{.*}}void @test_r25_24
   // CHECK: call void asm sideeffect "nop", "~{r25:24}"()
   asm("nop" ::: "r25:24");
 }
-void test_r27_26() {
+void test_r27_26(void) {
   // CHECK: define {{.*}}void @test_r27_26
   // CHECK: call void asm sideeffect "nop", "~{r27:26}"()
   asm("nop" ::: "r27:26");
 }
-void test_r29_28() {
+void test_r29_28(void) {
   // CHECK: define {{.*}}void @test_r29_28
   // CHECK: call void asm sideeffect "nop", "~{r29:28}"()
   asm("nop" ::: "r29:28");
 }
-void test_r31_30() {
+void test_r31_30(void) {
   // CHECK: define {{.*}}void @test_r31_30
   // CHECK: call void asm sideeffect "nop", "~{r31:30}"()
   asm("nop" ::: "r31:30");
 }
-void test_p0() {
+void test_p0(void) {
   // CHECK: define {{.*}}void @test_p0
   // CHECK: call void asm sideeffect "nop", "~{p0}"()
   asm("nop" ::: "p0");
 }
-void test_p1() {
+void test_p1(void) {
   // CHECK: define {{.*}}void @test_p1
   // CHECK: call void asm sideeffect "nop", "~{p1}"()
   asm("nop" ::: "p1");
 }
-void test_p2() {
+void test_p2(void) {
   // CHECK: define {{.*}}void @test_p2
   // CHECK: call void asm sideeffect "nop", "~{p2}"()
   asm("nop" ::: "p2");
 }
-void test_p3() {
+void test_p3(void) {
   // CHECK: define {{.*}}void @test_p3
   // CHECK: call void asm sideeffect "nop", "~{p3}"()
   asm("nop" ::: "p3");
 }
-void test_c0() {
+void test_c0(void) {
   // CHECK: define {{.*}}void @test_c0
   // CHECK: call void asm sideeffect "nop", "~{c0}"()
   asm("nop" ::: "c0");
 }
-void test_c1() {
+void test_c1(void) {
   // CHECK: define {{.*}}void @test_c1
   // CHECK: call void asm sideeffect "nop", "~{c1}"()
   asm("nop" ::: "c1");
 }
-void test_c2() {
+void test_c2(void) {
   // CHECK: define {{.*}}void @test_c2
   // CHECK: call void asm sideeffect "nop", "~{c2}"()
   asm("nop" ::: "c2");
 }
-void test_c3() {
+void test_c3(void) {
   // CHECK: define {{.*}}void @test_c3
   // CHECK: call void asm sideeffect "nop", "~{c3}"()
   asm("nop" ::: "c3");
 }
-void test_c4() {
+void test_c4(void) {
   // CHECK: define {{.*}}void @test_c4
   // CHECK: call void asm sideeffect "nop", "~{c4}"()
   asm("nop" ::: "c4");
 }
-void test_c5() {
+void test_c5(void) {
   // CHECK: define {{.*}}void @test_c5
   // CHECK: call void asm sideeffect "nop", "~{c5}"()
   asm("nop" ::: "c5");
 }
-void test_c6() {
+void test_c6(void) {
   // CHECK: define {{.*}}void @test_c6
   // CHECK: call void asm sideeffect "nop", "~{c6}"()
   asm("nop" ::: "c6");
 }
-void test_c7() {
+void test_c7(void) {
   // CHECK: define {{.*}}void @test_c7
   // CHECK: call void asm sideeffect "nop", "~{c7}"()
   asm("nop" ::: "c7");
 }
-void test_c8() {
+void test_c8(void) {
   // CHECK: define {{.*}}void @test_c8
   // CHECK: call void asm sideeffect "nop", "~{c8}"()
   asm("nop" ::: "c8");
 }
-void test_c9() {
+void test_c9(void) {
   // CHECK: define {{.*}}void @test_c9
   // CHECK: call void asm sideeffect "nop", "~{c9}"()
   asm("nop" ::: "c9");
 }
-void test_c10() {
+void test_c10(void) {
   // CHECK: define {{.*}}void @test_c10
   // CHECK: call void asm sideeffect "nop", "~{c10}"()
   asm("nop" ::: "c10");
 }
-void test_c11() {
+void test_c11(void) {
   // CHECK: define {{.*}}void @test_c11
   // CHECK: call void asm sideeffect "nop", "~{c11}"()
   asm("nop" ::: "c11");
 }
-void test_c12() {
+void test_c12(void) {
   // CHECK: define {{.*}}void @test_c12
   // CHECK: call void asm sideeffect "nop", "~{c12}"()
   asm("nop" ::: "c12");
 }
-void test_c13() {
+void test_c13(void) {
   // CHECK: define {{.*}}void @test_c13
   // CHECK: call void asm sideeffect "nop", "~{c13}"()
   asm("nop" ::: "c13");
 }
-void test_c14() {
+void test_c14(void) {
   // CHECK: define {{.*}}void @test_c14
   // CHECK: call void asm sideeffect "nop", "~{c14}"()
   asm("nop" ::: "c14");
 }
-void test_c15() {
+void test_c15(void) {
   // CHECK: define {{.*}}void @test_c15
   // CHECK: call void asm sideeffect "nop", "~{c15}"()
   asm("nop" ::: "c15");
 }
-void test_c16() {
+void test_c16(void) {
   // CHECK: define {{.*}}void @test_c16
   // CHECK: call void asm sideeffect "nop", "~{c16}"()
   asm("nop" ::: "c16");
 }
-void test_c17() {
+void test_c17(void) {
   // CHECK: define {{.*}}void @test_c17
   // CHECK: call void asm sideeffect "nop", "~{c17}"()
   asm("nop" ::: "c17");
 }
-void test_c18() {
+void test_c18(void) {
   // CHECK: define {{.*}}void @test_c18
   // CHECK: call void asm sideeffect "nop", "~{c18}"()
   asm("nop" ::: "c18");
 }
-void test_c19() {
+void test_c19(void) {
   // CHECK: define {{.*}}void @test_c19
   // CHECK: call void asm sideeffect "nop", "~{c19}"()
   asm("nop" ::: "c19");
 }
-void test_c20() {
+void test_c20(void) {
   // CHECK: define {{.*}}void @test_c20
   // CHECK: call void asm sideeffect "nop", "~{c20}"()
   asm("nop" ::: "c20");
 }
-void test_c21() {
+void test_c21(void) {
   // CHECK: define {{.*}}void @test_c21
   // CHECK: call void asm sideeffect "nop", "~{c21}"()
   asm("nop" ::: "c21");
 }
-void test_c22() {
+void test_c22(void) {
   // CHECK: define {{.*}}void @test_c22
   // CHECK: call void asm sideeffect "nop", "~{c22}"()
   asm("nop" ::: "c22");
 }
-void test_c23() {
+void test_c23(void) {
   // CHECK: define {{.*}}void @test_c23
   // CHECK: call void asm sideeffect "nop", "~{c23}"()
   asm("nop" ::: "c23");
 }
-void test_c24() {
+void test_c24(void) {
   // CHECK: define {{.*}}void @test_c24
   // CHECK: call void asm sideeffect "nop", "~{c24}"()
   asm("nop" ::: "c24");
 }
-void test_c25() {
+void test_c25(void) {
   // CHECK: define {{.*}}void @test_c25
   // CHECK: call void asm sideeffect "nop", "~{c25}"()
   asm("nop" ::: "c25");
 }
-void test_c26() {
+void test_c26(void) {
   // CHECK: define {{.*}}void @test_c26
   // CHECK: call void asm sideeffect "nop", "~{c26}"()
   asm("nop" ::: "c26");
 }
-void test_c27() {
+void test_c27(void) {
   // CHECK: define {{.*}}void @test_c27
   // CHECK: call void asm sideeffect "nop", "~{c27}"()
   asm("nop" ::: "c27");
 }
-void test_c28() {
+void test_c28(void) {
   // CHECK: define {{.*}}void @test_c28
   // CHECK: call void asm sideeffect "nop", "~{c28}"()
   asm("nop" ::: "c28");
 }
-void test_c29() {
+void test_c29(void) {
   // CHECK: define {{.*}}void @test_c29
   // CHECK: call void asm sideeffect "nop", "~{c29}"()
   asm("nop" ::: "c29");
 }
-void test_c30() {
+void test_c30(void) {
   // CHECK: define {{.*}}void @test_c30
   // CHECK: call void asm sideeffect "nop", "~{c30}"()
   asm("nop" ::: "c30");
 }
-void test_c31() {
+void test_c31(void) {
   // CHECK: define {{.*}}void @test_c31
   // CHECK: call void asm sideeffect "nop", "~{c31}"()
   asm("nop" ::: "c31");
 }
-void test_c1_0() {
+void test_c1_0(void) {
   // CHECK: define {{.*}}void @test_c1_0
   // CHECK: call void asm sideeffect "nop", "~{c1:0}"()
   asm("nop" ::: "c1:0");
 }
-void test_c3_2() {
+void test_c3_2(void) {
   // CHECK: define {{.*}}void @test_c3_2
   // CHECK: call void asm sideeffect "nop", "~{c3:2}"()
   asm("nop" ::: "c3:2");
 }
-void test_c5_4() {
+void test_c5_4(void) {
   // CHECK: define {{.*}}void @test_c5_4
   // CHECK: call void asm sideeffect "nop", "~{c5:4}"()
   asm("nop" ::: "c5:4");
 }
-void test_c7_6() {
+void test_c7_6(void) {
   // CHECK: define {{.*}}void @test_c7_6
   // CHECK: call void asm sideeffect "nop", "~{c7:6}"()
   asm("nop" ::: "c7:6");
 }
-void test_c9_8() {
+void test_c9_8(void) {
   // CHECK: define {{.*}}void @test_c9_8
   // CHECK: call void asm sideeffect "nop", "~{c9:8}"()
   asm("nop" ::: "c9:8");
 }
-void test_c11_10() {
+void test_c11_10(void) {
   // CHECK: define {{.*}}void @test_c11_10
   // CHECK: call void asm sideeffect "nop", "~{c11:10}"()
   asm("nop" ::: "c11:10");
 }
-void test_c13_12() {
+void test_c13_12(void) {
   // CHECK: define {{.*}}void @test_c13_12
   // CHECK: call void asm sideeffect "nop", "~{c13:12}"()
   asm("nop" ::: "c13:12");
 }
-void test_c15_14() {
+void test_c15_14(void) {
   // CHECK: define {{.*}}void @test_c15_14
   // CHECK: call void asm sideeffect "nop", "~{c15:14}"()
   asm("nop" ::: "c15:14");
 }
-void test_c17_16() {
+void test_c17_16(void) {
   // CHECK: define {{.*}}void @test_c17_16
   // CHECK: call void asm sideeffect "nop", "~{c17:16}"()
   asm("nop" ::: "c17:16");
 }
-void test_c19_18() {
+void test_c19_18(void) {
   // CHECK: define {{.*}}void @test_c19_18
   // CHECK: call void asm sideeffect "nop", "~{c19:18}"()
   asm("nop" ::: "c19:18");
 }
-void test_c21_20() {
+void test_c21_20(void) {
   // CHECK: define {{.*}}void @test_c21_20
   // CHECK: call void asm sideeffect "nop", "~{c21:20}"()
   asm("nop" ::: "c21:20");
 }
-void test_c23_22() {
+void test_c23_22(void) {
   // CHECK: define {{.*}}void @test_c23_22
   // CHECK: call void asm sideeffect "nop", "~{c23:22}"()
   asm("nop" ::: "c23:22");
 }
-void test_c25_24() {
+void test_c25_24(void) {
   // CHECK: define {{.*}}void @test_c25_24
   // CHECK: call void asm sideeffect "nop", "~{c25:24}"()
   asm("nop" ::: "c25:24");
 }
-void test_c27_26() {
+void test_c27_26(void) {
   // CHECK: define {{.*}}void @test_c27_26
   // CHECK: call void asm sideeffect "nop", "~{c27:26}"()
   asm("nop" ::: "c27:26");
 }
-void test_c29_28() {
+void test_c29_28(void) {
   // CHECK: define {{.*}}void @test_c29_28
   // CHECK: call void asm sideeffect "nop", "~{c29:28}"()
   asm("nop" ::: "c29:28");
 }
-void test_c31_30() {
+void test_c31_30(void) {
   // CHECK: define {{.*}}void @test_c31_30
   // CHECK: call void asm sideeffect "nop", "~{c31:30}"()
   asm("nop" ::: "c31:30");
 }
-void test_sa0() {
+void test_sa0(void) {
   // CHECK: define {{.*}}void @test_sa0
   // CHECK: call void asm sideeffect "nop", "~{sa0}"()
   asm("nop" ::: "sa0");
 }
-void test_lc0() {
+void test_lc0(void) {
   // CHECK: define {{.*}}void @test_lc0
   // CHECK: call void asm sideeffect "nop", "~{lc0}"()
   asm("nop" ::: "lc0");
 }
-void test_sa1() {
+void test_sa1(void) {
   // CHECK: define {{.*}}void @test_sa1
   // CHECK: call void asm sideeffect "nop", "~{sa1}"()
   asm("nop" ::: "sa1");
 }
-void test_lc1() {
+void test_lc1(void) {
   // CHECK: define {{.*}}void @test_lc1
   // CHECK: call void asm sideeffect "nop", "~{lc1}"()
   asm("nop" ::: "lc1");
 }
-void test_p3_0() {
+void test_p3_0(void) {
   // CHECK: define {{.*}}void @test_p3_0
   // CHECK: call void asm sideeffect "nop", "~{p3:0}"()
   asm("nop" ::: "p3:0");
 }
-void test_m0() {
+void test_m0(void) {
   // CHECK: define {{.*}}void @test_m0
   // CHECK: call void asm sideeffect "nop", "~{m0}"()
   asm("nop" ::: "m0");
 }
-void test_m1() {
+void test_m1(void) {
   // CHECK: define {{.*}}void @test_m1
   // CHECK: call void asm sideeffect "nop", "~{m1}"()
   asm("nop" ::: "m1");
 }
-void test_usr() {
+void test_usr(void) {
   // CHECK: define {{.*}}void @test_usr
   // CHECK: call void asm sideeffect "nop", "~{usr}"()
   asm("nop" ::: "usr");
 }
-void test_pc() {
+void test_pc(void) {
   // CHECK: define {{.*}}void @test_pc
   // CHECK: call void asm sideeffect "nop", "~{pc}"()
   asm("nop" ::: "pc");
 }
-void test_ugp() {
+void test_ugp(void) {
   // CHECK: define {{.*}}void @test_ugp
   // CHECK: call void asm sideeffect "nop", "~{ugp}"()
   asm("nop" ::: "ugp");
 }
-void test_gp() {
+void test_gp(void) {
   // CHECK: define {{.*}}void @test_gp
   // CHECK: call void asm sideeffect "nop", "~{gp}"()
   asm("nop" ::: "gp");
 }
-void test_cs0() {
+void test_cs0(void) {
   // CHECK: define {{.*}}void @test_cs0
   // CHECK: call void asm sideeffect "nop", "~{cs0}"()
   asm("nop" ::: "cs0");
 }
-void test_cs1() {
+void test_cs1(void) {
   // CHECK: define {{.*}}void @test_cs1
   // CHECK: call void asm sideeffect "nop", "~{cs1}"()
   asm("nop" ::: "cs1");
 }
-void test_upcyclelo() {
+void test_upcyclelo(void) {
   // CHECK: define {{.*}}void @test_upcyclelo
   // CHECK: call void asm sideeffect "nop", "~{upcyclelo}"()
   asm("nop" ::: "upcyclelo");
 }
-void test_upcyclehi() {
+void test_upcyclehi(void) {
   // CHECK: define {{.*}}void @test_upcyclehi
   // CHECK: call void asm sideeffect "nop", "~{upcyclehi}"()
   asm("nop" ::: "upcyclehi");
 }
-void test_framelimit() {
+void test_framelimit(void) {
   // CHECK: define {{.*}}void @test_framelimit
   // CHECK: call void asm sideeffect "nop", "~{framelimit}"()
   asm("nop" ::: "framelimit");
 }
-void test_framekey() {
+void test_framekey(void) {
   // CHECK: define {{.*}}void @test_framekey
   // CHECK: call void asm sideeffect "nop", "~{framekey}"()
   asm("nop" ::: "framekey");
 }
-void test_pktcountlo() {
+void test_pktcountlo(void) {
   // CHECK: define {{.*}}void @test_pktcountlo
   // CHECK: call void asm sideeffect "nop", "~{pktcountlo}"()
   asm("nop" ::: "pktcountlo");
 }
-void test_pktcounthi() {
+void test_pktcounthi(void) {
   // CHECK: define {{.*}}void @test_pktcounthi
   // CHECK: call void asm sideeffect "nop", "~{pktcounthi}"()
   asm("nop" ::: "pktcounthi");
 }
-void test_utimerlo() {
+void test_utimerlo(void) {
   // CHECK: define {{.*}}void @test_utimerlo
   // CHECK: call void asm sideeffect "nop", "~{utimerlo}"()
   asm("nop" ::: "utimerlo");
 }
-void test_utimerhi() {
+void test_utimerhi(void) {
   // CHECK: define {{.*}}void @test_utimerhi
   // CHECK: call void asm sideeffect "nop", "~{utimerhi}"()
   asm("nop" ::: "utimerhi");
 }
-void test_upcycle() {
+void test_upcycle(void) {
   // CHECK: define {{.*}}void @test_upcycle
   // CHECK: call void asm sideeffect "nop", "~{upcycle}"()
   asm("nop" ::: "upcycle");
 }
-void test_pktcount() {
+void test_pktcount(void) {
   // CHECK: define {{.*}}void @test_pktcount
   // CHECK: call void asm sideeffect "nop", "~{pktcount}"()
   asm("nop" ::: "pktcount");
 }
-void test_utimer() {
+void test_utimer(void) {
   // CHECK: define {{.*}}void @test_utimer
   // CHECK: call void asm sideeffect "nop", "~{utimer}"()
   asm("nop" ::: "utimer");
 }
-void test_v0() {
+void test_v0(void) {
   // CHECK: define {{.*}}void @test_v0
   // CHECK: call void asm sideeffect "nop", "~{v0}"()
   asm("nop" ::: "v0");
 }
-void test_v1() {
+void test_v1(void) {
   // CHECK: define {{.*}}void @test_v1
   // CHECK: call void asm sideeffect "nop", "~{v1}"()
   asm("nop" ::: "v1");
 }
-void test_v2() {
+void test_v2(void) {
   // CHECK: define {{.*}}void @test_v2
   // CHECK: call void asm sideeffect "nop", "~{v2}"()
   asm("nop" ::: "v2");
 }
-void test_v3() {
+void test_v3(void) {
   // CHECK: define {{.*}}void @test_v3
   // CHECK: call void asm sideeffect "nop", "~{v3}"()
   asm("nop" ::: "v3");
 }
-void test_v4() {
+void test_v4(void) {
   // CHECK: define {{.*}}void @test_v4
   // CHECK: call void asm sideeffect "nop", "~{v4}"()
   asm("nop" ::: "v4");
 }
-void test_v5() {
+void test_v5(void) {
   // CHECK: define {{.*}}void @test_v5
   // CHECK: call void asm sideeffect "nop", "~{v5}"()
   asm("nop" ::: "v5");
 }
-void test_v6() {
+void test_v6(void) {
   // CHECK: define {{.*}}void @test_v6
   // CHECK: call void asm sideeffect "nop", "~{v6}"()
   asm("nop" ::: "v6");
 }
-void test_v7() {
+void test_v7(void) {
   // CHECK: define {{.*}}void @test_v7
   // CHECK: call void asm sideeffect "nop", "~{v7}"()
   asm("nop" ::: "v7");
 }
-void test_v8() {
+void test_v8(void) {
   // CHECK: define {{.*}}void @test_v8
   // CHECK: call void asm sideeffect "nop", "~{v8}"()
   asm("nop" ::: "v8");
 }
-void test_v9() {
+void test_v9(void) {
   // CHECK: define {{.*}}void @test_v9
   // CHECK: call void asm sideeffect "nop", "~{v9}"()
   asm("nop" ::: "v9");
 }
-void test_v10() {
+void test_v10(void) {
   // CHECK: define {{.*}}void @test_v10
   // CHECK: call void asm sideeffect "nop", "~{v10}"()
   asm("nop" ::: "v10");
 }
-void test_v11() {
+void test_v11(void) {
   // CHECK: define {{.*}}void @test_v11
   // CHECK: call void asm sideeffect "nop", "~{v11}"()
   asm("nop" ::: "v11");
 }
-void test_v12() {
+void test_v12(void) {
   // CHECK: define {{.*}}void @test_v12
   // CHECK: call void asm sideeffect "nop", "~{v12}"()
   asm("nop" ::: "v12");
 }
-void test_v13() {
+void test_v13(void) {
   // CHECK: define {{.*}}void @test_v13
   // CHECK: call void asm sideeffect "nop", "~{v13}"()
   asm("nop" ::: "v13");
 }
-void test_v14() {
+void test_v14(void) {
   // CHECK: define {{.*}}void @test_v14
   // CHECK: call void asm sideeffect "nop", "~{v14}"()
   asm("nop" ::: "v14");
 }
-void test_v15() {
+void test_v15(void) {
   // CHECK: define {{.*}}void @test_v15
   // CHECK: call void asm sideeffect "nop", "~{v15}"()
   asm("nop" ::: "v15");
 }
-void test_v16() {
+void test_v16(void) {
   // CHECK: define {{.*}}void @test_v16
   // CHECK: call void asm sideeffect "nop", "~{v16}"()
   asm("nop" ::: "v16");
 }
-void test_v17() {
+void test_v17(void) {
   // CHECK: define {{.*}}void @test_v17
   // CHECK: call void asm sideeffect "nop", "~{v17}"()
   asm("nop" ::: "v17");
 }
-void test_v18() {
+void test_v18(void) {
   // CHECK: define {{.*}}void @test_v18
   // CHECK: call void asm sideeffect "nop", "~{v18}"()
   asm("nop" ::: "v18");
 }
-void test_v19() {
+void test_v19(void) {
   // CHECK: define {{.*}}void @test_v19
   // CHECK: call void asm sideeffect "nop", "~{v19}"()
   asm("nop" ::: "v19");
 }
-void test_v20() {
+void test_v20(void) {
   // CHECK: define {{.*}}void @test_v20
   // CHECK: call void asm sideeffect "nop", "~{v20}"()
   asm("nop" ::: "v20");
 }
-void test_v21() {
+void test_v21(void) {
   // CHECK: define {{.*}}void @test_v21
   // CHECK: call void asm sideeffect "nop", "~{v21}"()
   asm("nop" ::: "v21");
 }
-void test_v22() {
+void test_v22(void) {
   // CHECK: define {{.*}}void @test_v22
   // CHECK: call void asm sideeffect "nop", "~{v22}"()
   asm("nop" ::: "v22");
 }
-void test_v23() {
+void test_v23(void) {
   // CHECK: define {{.*}}void @test_v23
   // CHECK: call void asm sideeffect "nop", "~{v23}"()
   asm("nop" ::: "v23");
 }
-void test_v24() {
+void test_v24(void) {
   // CHECK: define {{.*}}void @test_v24
   // CHECK: call void asm sideeffect "nop", "~{v24}"()
   asm("nop" ::: "v24");
 }
-void test_v25() {
+void test_v25(void) {
   // CHECK: define {{.*}}void @test_v25
   // CHECK: call void asm sideeffect "nop", "~{v25}"()
   asm("nop" ::: "v25");
 }
-void test_v26() {
+void test_v26(void) {
   // CHECK: define {{.*}}void @test_v26
   // CHECK: call void asm sideeffect "nop", "~{v26}"()
   asm("nop" ::: "v26");
 }
-void test_v27() {
+void test_v27(void) {
   // CHECK: define {{.*}}void @test_v27
   // CHECK: call void asm sideeffect "nop", "~{v27}"()
   asm("nop" ::: "v27");
 }
-void test_v28() {
+void test_v28(void) {
   // CHECK: define {{.*}}void @test_v28
   // CHECK: call void asm sideeffect "nop", "~{v28}"()
   asm("nop" ::: "v28");
 }
-void test_v29() {
+void test_v29(void) {
   // CHECK: define {{.*}}void @test_v29
   // CHECK: call void asm sideeffect "nop", "~{v29}"()
   asm("nop" ::: "v29");
 }
-void test_v30() {
+void test_v30(void) {
   // CHECK: define {{.*}}void @test_v30
   // CHECK: call void asm sideeffect "nop", "~{v30}"()
   asm("nop" ::: "v30");
 }
-void test_v31() {
+void test_v31(void) {
   // CHECK: define {{.*}}void @test_v31
   // CHECK: call void asm sideeffect "nop", "~{v31}"()
   asm("nop" ::: "v31");
 }
-void test_v1_0() {
+void test_v1_0(void) {
   // CHECK: define {{.*}}void @test_v1_0
   // CHECK: call void asm sideeffect "nop", "~{v1:0}"()
   asm("nop" ::: "v1:0");
 }
-void test_v3_2() {
+void test_v3_2(void) {
   // CHECK: define {{.*}}void @test_v3_2
   // CHECK: call void asm sideeffect "nop", "~{v3:2}"()
   asm("nop" ::: "v3:2");
 }
-void test_v5_4() {
+void test_v5_4(void) {
   // CHECK: define {{.*}}void @test_v5_4
   // CHECK: call void asm sideeffect "nop", "~{v5:4}"()
   asm("nop" ::: "v5:4");
 }
-void test_v7_6() {
+void test_v7_6(void) {
   // CHECK: define {{.*}}void @test_v7_6
   // CHECK: call void asm sideeffect "nop", "~{v7:6}"()
   asm("nop" ::: "v7:6");
 }
-void test_v9_8() {
+void test_v9_8(void) {
   // CHECK: define {{.*}}void @test_v9_8
   // CHECK: call void asm sideeffect "nop", "~{v9:8}"()
   asm("nop" ::: "v9:8");
 }
-void test_v11_10() {
+void test_v11_10(void) {
   // CHECK: define {{.*}}void @test_v11_10
   // CHECK: call void asm sideeffect "nop", "~{v11:10}"()
   asm("nop" ::: "v11:10");
 }
-void test_v13_12() {
+void test_v13_12(void) {
   // CHECK: define {{.*}}void @test_v13_12
   // CHECK: call void asm sideeffect "nop", "~{v13:12}"()
   asm("nop" ::: "v13:12");
 }
-void test_v15_14() {
+void test_v15_14(void) {
   // CHECK: define {{.*}}void @test_v15_14
   // CHECK: call void asm sideeffect "nop", "~{v15:14}"()
   asm("nop" ::: "v15:14");
 }
-void test_v17_16() {
+void test_v17_16(void) {
   // CHECK: define {{.*}}void @test_v17_16
   // CHECK: call void asm sideeffect "nop", "~{v17:16}"()
   asm("nop" ::: "v17:16");
 }
-void test_v19_18() {
+void test_v19_18(void) {
   // CHECK: define {{.*}}void @test_v19_18
   // CHECK: call void asm sideeffect "nop", "~{v19:18}"()
   asm("nop" ::: "v19:18");
 }
-void test_v21_20() {
+void test_v21_20(void) {
   // CHECK: define {{.*}}void @test_v21_20
   // CHECK: call void asm sideeffect "nop", "~{v21:20}"()
   asm("nop" ::: "v21:20");
 }
-void test_v23_22() {
+void test_v23_22(void) {
   // CHECK: define {{.*}}void @test_v23_22
   // CHECK: call void asm sideeffect "nop", "~{v23:22}"()
   asm("nop" ::: "v23:22");
 }
-void test_v25_24() {
+void test_v25_24(void) {
   // CHECK: define {{.*}}void @test_v25_24
   // CHECK: call void asm sideeffect "nop", "~{v25:24}"()
   asm("nop" ::: "v25:24");
 }
-void test_v27_26() {
+void test_v27_26(void) {
   // CHECK: define {{.*}}void @test_v27_26
   // CHECK: call void asm sideeffect "nop", "~{v27:26}"()
   asm("nop" ::: "v27:26");
 }
-void test_v29_28() {
+void test_v29_28(void) {
   // CHECK: define {{.*}}void @test_v29_28
   // CHECK: call void asm sideeffect "nop", "~{v29:28}"()
   asm("nop" ::: "v29:28");
 }
-void test_v31_30() {
+void test_v31_30(void) {
   // CHECK: define {{.*}}void @test_v31_30
   // CHECK: call void asm sideeffect "nop", "~{v31:30}"()
   asm("nop" ::: "v31:30");
 }
-void test_v3_0() {
+void test_v3_0(void) {
   // CHECK: define {{.*}}void @test_v3_0
   // CHECK: call void asm sideeffect "nop", "~{v3:0}"()
   asm("nop" ::: "v3:0");
 }
-void test_v7_4() {
+void test_v7_4(void) {
   // CHECK: define {{.*}}void @test_v7_4
   // CHECK: call void asm sideeffect "nop", "~{v7:4}"()
   asm("nop" ::: "v7:4");
 }
-void test_v11_8() {
+void test_v11_8(void) {
   // CHECK: define {{.*}}void @test_v11_8
   // CHECK: call void asm sideeffect "nop", "~{v11:8}"()
   asm("nop" ::: "v11:8");
 }
-void test_v15_12() {
+void test_v15_12(void) {
   // CHECK: define {{.*}}void @test_v15_12
   // CHECK: call void asm sideeffect "nop", "~{v15:12}"()
   asm("nop" ::: "v15:12");
 }
-void test_v19_16() {
+void test_v19_16(void) {
   // CHECK: define {{.*}}void @test_v19_16
   // CHECK: call void asm sideeffect "nop", "~{v19:16}"()
   asm("nop" ::: "v19:16");
 }
-void test_v23_20() {
+void test_v23_20(void) {
   // CHECK: define {{.*}}void @test_v23_20
   // CHECK: call void asm sideeffect "nop", "~{v23:20}"()
   asm("nop" ::: "v23:20");
 }
-void test_v27_24() {
+void test_v27_24(void) {
   // CHECK: define {{.*}}void @test_v27_24
   // CHECK: call void asm sideeffect "nop", "~{v27:24}"()
   asm("nop" ::: "v27:24");
 }
-void test_v31_28() {
+void test_v31_28(void) {
   // CHECK: define {{.*}}void @test_v31_28
   // CHECK: call void asm sideeffect "nop", "~{v31:28}"()
   asm("nop" ::: "v31:28");
 }
-void test_q0() {
+void test_q0(void) {
   // CHECK: define {{.*}}void @test_q0
   // CHECK: call void asm sideeffect "nop", "~{q0}"()
   asm("nop" ::: "q0");
 }
-void test_q1() {
+void test_q1(void) {
   // CHECK: define {{.*}}void @test_q1
   // CHECK: call void asm sideeffect "nop", "~{q1}"()
   asm("nop" ::: "q1");
 }
-void test_q2() {
+void test_q2(void) {
   // CHECK: define {{.*}}void @test_q2
   // CHECK: call void asm sideeffect "nop", "~{q2}"()
   asm("nop" ::: "q2");
 }
-void test_q3() {
+void test_q3(void) {
   // CHECK: define {{.*}}void @test_q3
   // CHECK: call void asm sideeffect "nop", "~{q3}"()
   asm("nop" ::: "q3");

diff  --git a/clang/test/CodeGen/iamcu-abi.c b/clang/test/CodeGen/iamcu-abi.c
index a5d220b07eb90..0cd8bddab3322 100644
--- a/clang/test/CodeGen/iamcu-abi.c
+++ b/clang/test/CodeGen/iamcu-abi.c
@@ -10,28 +10,28 @@ void foold(long double *ld);
 
 // CHECK-LABEL: define{{.*}} void @testdouble()
 // CHECK: alloca double, align 4
-void testdouble() {
+void testdouble(void) {
   double d = 2.0;
   food(&d);
 }
 
 // CHECK-LABEL: define{{.*}} void @testlonglong()
 // CHECK: alloca i64, align 4
-void testlonglong() {
+void testlonglong(void) {
   long long ll = 2;
   fooll(&ll);
 }
 
 // CHECK-LABEL: define{{.*}} void @testunsignedlonglong()
 // CHECK: alloca i64, align 4
-void testunsignedlonglong() {
+void testunsignedlonglong(void) {
   unsigned long long ull = 2;
   fooull(&ull);	
 }
 
 // CHECK-LABEL: define{{.*}} void @testlongdouble()
 // CHECK: alloca double, align 4
-void testlongdouble() {
+void testlongdouble(void) {
   long double ld = 2.0;
   foold(&ld);
 }

diff  --git a/clang/test/CodeGen/ifunc.c b/clang/test/CodeGen/ifunc.c
index fee9cc3dee99e..6840900c16169 100644
--- a/clang/test/CodeGen/ifunc.c
+++ b/clang/test/CodeGen/ifunc.c
@@ -15,11 +15,11 @@ typedef int (*foo_t)(int);
 
 int global;
 
-static foo_t foo_ifunc() {
+static foo_t foo_ifunc(void) {
   return global ? f1 : f2;
 }
 
-int bar() {
+int bar(void) {
   return foo(1);
 }
 

diff  --git a/clang/test/CodeGen/incomplete-function-type-2.c b/clang/test/CodeGen/incomplete-function-type-2.c
index 20f5ad32040f5..4ae828ba5bebf 100644
--- a/clang/test/CodeGen/incomplete-function-type-2.c
+++ b/clang/test/CodeGen/incomplete-function-type-2.c
@@ -7,7 +7,7 @@ struct test10_B;
 typedef struct test10_B test10_F3(double);
 void test10_foo(test10_F3 p1);
 struct test10_B test10_b(double);
-void test10_bar() {
+void test10_bar(void) {
   test10_foo(test10_b);
 }
 struct test10_B {};

diff  --git a/clang/test/CodeGen/indirect-goto.c b/clang/test/CodeGen/indirect-goto.c
index a3b45e49af90a..3da43b0fe7e63 100644
--- a/clang/test/CodeGen/indirect-goto.c
+++ b/clang/test/CodeGen/indirect-goto.c
@@ -26,6 +26,6 @@ L1: res *= 2;
   return res;
 }
 
-int main() {
+int main(void) {
   return foo(3)+foo2(4);
 }

diff  --git a/clang/test/CodeGen/indirect-tls-seg-refs.c b/clang/test/CodeGen/indirect-tls-seg-refs.c
index de6f3cda7d3c6..4c9378ad441c0 100644
--- a/clang/test/CodeGen/indirect-tls-seg-refs.c
+++ b/clang/test/CodeGen/indirect-tls-seg-refs.c
@@ -6,5 +6,5 @@
 // NO-TLSDIRECT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs"
 // TLSDIRECT-NOT: attributes #{{[0-9]+}} = {{{.*}} "indirect-tls-seg-refs"
 
-void test1() {
+void test1(void) {
 }

diff  --git a/clang/test/CodeGen/init-memset.c b/clang/test/CodeGen/init-memset.c
index d032277c1d635..4d9df3cdf0caa 100644
--- a/clang/test/CodeGen/init-memset.c
+++ b/clang/test/CodeGen/init-memset.c
@@ -2,42 +2,42 @@
 
 void use(void *);
 
-void test_small() {
+void test_small(void) {
   // CHECK-LABEL: define{{.*}} void @test_small()
   int a[] = {1, 2, 3, 4};
   // CHECK: call void @llvm.memcpy.{{.*}}
   use(a);
 }
 
-void test_small_same() {
+void test_small_same(void) {
   // CHECK-LABEL: define{{.*}} void @test_small_same()
   char a[] = {'a', 'a', 'a', 'a'};
   // CHECK: call void @llvm.memcpy.{{.*}}
   use(a);
 }
 
-void test_
diff erent() {
+void test_
diff erent(void) {
   // CHECK-LABEL: define{{.*}} void @test_
diff erent()
   int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
   // CHECK: call void @llvm.memcpy.{{.*}}
   use(a);
 }
 
-void test_all_zeros() {
+void test_all_zeros(void) {
   // CHECK-LABEL: define{{.*}} void @test_all_zeros()
   int a[16] = {};
   // CHECK: call void @llvm.memset.{{.*}}
   use(a);
 }
 
-void test_all_a() {
+void test_all_a(void) {
   // CHECK-LABEL: define{{.*}} void @test_all_a()
   char a[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
   // CHECK: call void @llvm.memcpy.{{.*}}
   use(a);
 }
 
-void test_most_zeros() {
+void test_most_zeros(void) {
   // CHECK-LABEL: define{{.*}} void @test_most_zeros()
   int a[16] = {0, 0, 1};
   // CHECK: call void @llvm.memset.{{.*}}
@@ -45,14 +45,14 @@ void test_most_zeros() {
   use(a);
 }
 
-void test_most_a() {
+void test_most_a(void) {
   // CHECK-LABEL: define{{.*}} void @test_most_a()
   char a[] = "aaaaazaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
   // CHECK: call void @llvm.memcpy.{{.*}}
   use(a);
 }
 
-void test_pointers() {
+void test_pointers(void) {
   // CHECK-LABEL: define{{.*}} void @test_pointers()
   void *a[] = {&use, &use, &use, &use, &use, &use};
   // CHECK: call void @llvm.memset.{{.*}}

diff  --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c
index a21b5f4c09f5d..fea34379c52ff 100644
--- a/clang/test/CodeGen/init.c
+++ b/clang/test/CodeGen/init.c
@@ -12,12 +12,12 @@ unsigned v2[2][3] = {[0 ... 1][0 ... 1] = 2222, 3333};
 // CHECK-DAG: [2 x [3 x i32]] {{[[][[]}}3 x i32] [i32 2222, i32 2222, i32 0], [3 x i32] [i32 2222, i32 2222, i32 3333]],
 // CHECK-DAG: [[INIT14:.*]] = private global [16 x i32] [i32 0, i32 0, i32 0, i32 0, i32 0, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 0, i32 0, i32 0, i32 0], align 4
 
-void f1() {
+void f1(void) {
   // Scalars in braces.
   int a = { 1 };
 }
 
-void f2() {
+void f2(void) {
   int a[2][2] = { { 1, 2 }, { 3, 4 } };
   int b[3][3] = { { 1, 2 }, { 3, 4 } };
   int *c[2] = { &a[1][1], &b[2][2] };
@@ -29,7 +29,7 @@ void f2() {
 typedef void (* F)(void);
 extern void foo(void);
 struct S { F f; };
-void f3() {
+void f3(void) {
   struct S a[1] = { { foo } };
 }
 
@@ -37,7 +37,7 @@ void f3() {
 // CHECK-DAG: @g3 ={{.*}} constant i32 10
 // CHECK-DAG: @f4.g4 = internal constant i32 12
 const int g3 = 10;
-int f4() {
+int f4(void) {
   static const int g4 = 12;
   return g4;
 }
@@ -54,7 +54,7 @@ vec3 f5(vec3 value) {
 }
 
 // rdar://problem/8154689
-void f6() {
+void f6(void) {
   int x;
   long ids[] = { (long) &x };  
 }
@@ -140,7 +140,7 @@ void test10(int X) {
   // CHECK: call void @bar
 }
 
-void nonzeroMemseti8() {
+void nonzeroMemseti8(void) {
   char arr[33] = { 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, };
   // CHECK-LABEL: @nonzeroMemseti8(
   // CHECK-NOT: store
@@ -148,7 +148,7 @@ void nonzeroMemseti8() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 42, i32 33, i1 false)
 }
 
-void nonzeroMemseti16() {
+void nonzeroMemseti16(void) {
   unsigned short arr[17] = { 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, 0x4242, };
   // CHECK-LABEL: @nonzeroMemseti16(
   // CHECK-NOT: store
@@ -156,7 +156,7 @@ void nonzeroMemseti16() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 66, i32 34, i1 false)
 }
 
-void nonzeroMemseti32() {
+void nonzeroMemseti32(void) {
   unsigned arr[9] = { 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, 0xF0F0F0F0, };
   // CHECK-LABEL: @nonzeroMemseti32(
   // CHECK-NOT: store
@@ -164,7 +164,7 @@ void nonzeroMemseti32() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16, i32 36, i1 false)
 }
 
-void nonzeroMemseti64() {
+void nonzeroMemseti64(void) {
   unsigned long long arr[7] = { 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA, 0xAAAAAAAAAAAAAAAA,  0xAAAAAAAAAAAAAAAA,  0xAAAAAAAAAAAAAAAA,  };
   // CHECK-LABEL: @nonzeroMemseti64(
   // CHECK-NOT: store
@@ -172,7 +172,7 @@ void nonzeroMemseti64() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -86, i32 56, i1 false)
 }
 
-void nonzeroMemsetf32() {
+void nonzeroMemsetf32(void) {
   float arr[9] = { 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, 0x1.cacacap+75, };
   // CHECK-LABEL: @nonzeroMemsetf32(
   // CHECK-NOT: store
@@ -180,7 +180,7 @@ void nonzeroMemsetf32() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 101, i32 36, i1 false)
 }
 
-void nonzeroMemsetf64() {
+void nonzeroMemsetf64(void) {
   double arr[7] = { 0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69, 0x1.4444444444444p+69, };
   // CHECK-LABEL: @nonzeroMemsetf64(
   // CHECK-NOT: store
@@ -188,7 +188,7 @@ void nonzeroMemsetf64() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 68, i32 56, i1 false)
 }
 
-void nonzeroPaddedUnionMemset() {
+void nonzeroPaddedUnionMemset(void) {
   union U { char c; int i; };
   union U arr[9] = { 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, };
   // CHECK-LABEL: @nonzeroPaddedUnionMemset(
@@ -197,7 +197,7 @@ void nonzeroPaddedUnionMemset() {
   // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16, i32 36, i1 false)
 }
 
-void nonzeroNestedMemset() {
+void nonzeroNestedMemset(void) {
   union U { char c; int i; };
   struct S { union U u; short i; };
   struct S arr[5] = { { {0xF0}, 0xF0F0 }, { {0xF0}, 0xF0F0 }, { {0xF0}, 0xF0F0 }, { {0xF0}, 0xF0F0 }, { {0xF0}, 0xF0F0 }, };
@@ -237,7 +237,7 @@ void test13(int x) {
 }
 
 // CHECK-LABEL: @PR20473(
-void PR20473() {
+void PR20473(void) {
   // CHECK: memcpy{{.*}}getelementptr inbounds ([2 x i8], [2 x i8]* @
   bar((char[2]) {""});
   // CHECK: memcpy{{.*}}getelementptr inbounds ([3 x i8], [3 x i8]* @

diff  --git a/clang/test/CodeGen/inline-asm-immediate-ubsan.c b/clang/test/CodeGen/inline-asm-immediate-ubsan.c
index 2b14e92fa9e37..45a7e5eefdb7a 100644
--- a/clang/test/CodeGen/inline-asm-immediate-ubsan.c
+++ b/clang/test/CodeGen/inline-asm-immediate-ubsan.c
@@ -14,14 +14,14 @@
 
 // CHECK-LABEL: @test_inlineasm_i
 // CHECK: call void asm sideeffect "int $0", "i{{.*}}"(i32 2)
-void test_inlineasm_i() {
+void test_inlineasm_i(void) {
   __asm__ __volatile__("int %0" :: "i"(1 + 1));
 }
 
 // CHECK-LABEL: @test_inlineasm_I
 // CHECK: call void asm sideeffect "int $0", "I{{.*}}"(i32 2)
 // CHECK: call void asm sideeffect "int $0", "I{{.*}}"(i32 3)
-void test_inlineasm_I() {
+void test_inlineasm_I(void) {
   __asm__ __volatile__("int %0" :: "I"(1 + 1));
 
   // Also check a C non-ICE.

diff  --git a/clang/test/CodeGen/inline-asm-intel.c b/clang/test/CodeGen/inline-asm-intel.c
index bf615e220782a..30f2352a5ab8b 100644
--- a/clang/test/CodeGen/inline-asm-intel.c
+++ b/clang/test/CodeGen/inline-asm-intel.c
@@ -20,7 +20,7 @@
 #include <x86intrin.h>
 #endif
 
-void f() {
+void f(void) {
   // Intrinsic headers contain macros and inline functions.
   // Inline assembly in both are checked only when they are
   // referenced, so reference a few intrinsics here.

diff  --git a/clang/test/CodeGen/inline-asm-mixed-style.c b/clang/test/CodeGen/inline-asm-mixed-style.c
index b139625b7e68e..97410f028ab5e 100644
--- a/clang/test/CodeGen/inline-asm-mixed-style.c
+++ b/clang/test/CodeGen/inline-asm-mixed-style.c
@@ -4,7 +4,7 @@
 
 #include <immintrin.h>
 
-void f() {
+void f(void) {
   __asm mov eax, ebx
   __asm mov ebx, ecx
   __asm__("movl %ecx, %edx");

diff  --git a/clang/test/CodeGen/inline-asm-x86-flag-output.c b/clang/test/CodeGen/inline-asm-x86-flag-output.c
index 36bffad7169ca..65459b609071d 100644
--- a/clang/test/CodeGen/inline-asm-x86-flag-output.c
+++ b/clang/test/CodeGen/inline-asm-x86-flag-output.c
@@ -364,7 +364,7 @@ int test_ccs(long nr, volatile long *addr) {
   return 1;
 }
 
-_Bool check_no_clobber_conflicts() {
+_Bool check_no_clobber_conflicts(void) {
   //CHECK-LABEL: @check_no_clobber_conflicts
   //CHECK:  = tail call i8 asm "", "={@cce},~{cx},~{dirflag},~{fpsr},~{flags}"()
   _Bool b;

diff  --git a/clang/test/CodeGen/inline-optim.c b/clang/test/CodeGen/inline-optim.c
index c6038de173f5f..306202a06a49e 100644
--- a/clang/test/CodeGen/inline-optim.c
+++ b/clang/test/CodeGen/inline-optim.c
@@ -18,7 +18,7 @@ int inline_no_hint(int a, int b) { return (a/b); }
 inline __attribute__ ((__always_inline__)) int inline_always(int a, int b) { return(a*b); }
 
 volatile int *pa = (int*) 0x1000;
-void foo() {
+void foo(void) {
 // NOINLINE-LABEL: @foo
 // HINT-LABEL: @foo
 // INLINE-LABEL: @foo

diff  --git a/clang/test/CodeGen/integer-overflow.c b/clang/test/CodeGen/integer-overflow.c
index a9288a25913e0..e22982539fe08 100644
--- a/clang/test/CodeGen/integer-overflow.c
+++ b/clang/test/CodeGen/integer-overflow.c
@@ -7,7 +7,7 @@
 
 // Tests for signed integer overflow stuff.
 // rdar://7432000 rdar://7221421
-void test1() {
+void test1(void) {
   // DEFAULT-LABEL: define{{.*}} void @test1
   // WRAPV-LABEL: define{{.*}} void @test1
   // TRAPV-LABEL: define{{.*}} void @test1

diff  --git a/clang/test/CodeGen/label-array-aggregate-init.c b/clang/test/CodeGen/label-array-aggregate-init.c
index 5cefd8d270c08..48c7e1c727381 100644
--- a/clang/test/CodeGen/label-array-aggregate-init.c
+++ b/clang/test/CodeGen/label-array-aggregate-init.c
@@ -4,7 +4,7 @@
 
 void receivePtrs(void **);
 
-int main() {
+int main(void) {
 L:
   receivePtrs((void *[]){ &&L, 0, 0 });
 }

diff  --git a/clang/test/CodeGen/lanai-arguments.c b/clang/test/CodeGen/lanai-arguments.c
index 52e9295273970..0f5657c840e66 100644
--- a/clang/test/CodeGen/lanai-arguments.c
+++ b/clang/test/CodeGen/lanai-arguments.c
@@ -17,7 +17,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;
 }
@@ -27,7 +27,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/lanai-regparm.c b/clang/test/CodeGen/lanai-regparm.c
index 12d1cb1102754..215d4de70e555 100644
--- a/clang/test/CodeGen/lanai-regparm.c
+++ b/clang/test/CodeGen/lanai-regparm.c
@@ -5,7 +5,7 @@ void f1(int a, int b, int c, int d,
 
 void f2(int a, int b) __attribute((regparm(0)));
 
-void f0() {
+void f0(void) {
 // CHECK: call void @f1(i32 inreg noundef 1, i32 inreg noundef 2, i32 inreg noundef 3, i32 inreg noundef 4,
 // CHECK: i32 noundef 5, i32 noundef 6, i32 noundef 7, i32 noundef 8)
   f1(1, 2, 3, 4, 5, 6, 7, 8);

diff  --git a/clang/test/CodeGen/lifetime-debuginfo-1.c b/clang/test/CodeGen/lifetime-debuginfo-1.c
index 955e14ce9e518..10b00f15b9ca9 100644
--- a/clang/test/CodeGen/lifetime-debuginfo-1.c
+++ b/clang/test/CodeGen/lifetime-debuginfo-1.c
@@ -6,7 +6,7 @@
 extern int x;
 
 // CHECK-LABEL: define{{.*}} i32 @f
-int f() {
+int f(void) {
   int *p = &x;
 // CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]]
 // CHECK: [[DI]] = !DILocation(line: [[@LINE+1]]

diff  --git a/clang/test/CodeGen/lifetime.c b/clang/test/CodeGen/lifetime.c
index 2203840d4b806..cabbe30a91b92 100644
--- a/clang/test/CodeGen/lifetime.c
+++ b/clang/test/CodeGen/lifetime.c
@@ -5,12 +5,12 @@
 
 extern void use(char *a);
 
-__attribute__((always_inline)) void helper_no_markers() {
+__attribute__((always_inline)) void helper_no_markers(void) {
   char a;
   use(&a);
 }
 
-void lifetime_test() {
+void lifetime_test(void) {
 // O0: lifetime_test
 // O1: lifetime_test
 // O2: lifetime_test

diff  --git a/clang/test/CodeGen/lifetime2.c b/clang/test/CodeGen/lifetime2.c
index fcdcff36017e8..74ce08c6543ab 100644
--- a/clang/test/CodeGen/lifetime2.c
+++ b/clang/test/CodeGen/lifetime2.c
@@ -20,7 +20,7 @@ int foo (int n) {
 }
 
 // CHECK-LABEL: @no_goto_bypass
-void no_goto_bypass() {
+void no_goto_bypass(void) {
   // O2: @llvm.lifetime.start.p0i8(i64 1
   char x;
 l1:
@@ -33,7 +33,7 @@ void no_goto_bypass() {
 }
 
 // CHECK-LABEL: @goto_bypass
-void goto_bypass() {
+void goto_bypass(void) {
   {
     // O2-NOT: @llvm.lifetime.start.p0i8(i64 1
     // O2-NOT: @llvm.lifetime.end.p0i8(i64 1

diff  --git a/clang/test/CodeGen/linkage-redecl.c b/clang/test/CodeGen/linkage-redecl.c
index 4767a94a45f6a..cca1d415dc3ce 100644
--- a/clang/test/CodeGen/linkage-redecl.c
+++ b/clang/test/CodeGen/linkage-redecl.c
@@ -2,7 +2,7 @@
 
 // CHECK: @test2_i = internal global i32 99
 static int test2_i = 99;
-int test2_f() {
+int test2_f(void) {
   extern int test2_i;
   return test2_i;
 }
@@ -11,7 +11,7 @@ int test2_f() {
 // PR3425
 static void f(int x);
 
-void g0() {
+void g0(void) {
   f(5);
 }
 

diff  --git a/clang/test/CodeGen/linker-option.c b/clang/test/CodeGen/linker-option.c
index 13bd981179b55..c56cd11b5b2e5 100644
--- a/clang/test/CodeGen/linker-option.c
+++ b/clang/test/CodeGen/linker-option.c
@@ -3,4 +3,4 @@
 // CHECK: !llvm.linker.options = !{![[msvcrt:[0-9]+]]}
 // CHECK: ![[msvcrt]] = !{!"/include:foo"}
 
-int f();
+int f(void);

diff  --git a/clang/test/CodeGen/loop-info-asan.c b/clang/test/CodeGen/loop-info-asan.c
index 86bf40565acd6..afec02437a2db 100644
--- a/clang/test/CodeGen/loop-info-asan.c
+++ b/clang/test/CodeGen/loop-info-asan.c
@@ -2,7 +2,7 @@
 
 // This test should not exhibit use-after-free in LoopInfo.
 
-int a() {
+int a(void) {
   for (;;)
     for (;;)
       for (;;)

diff  --git a/clang/test/CodeGen/loop-unroll.c b/clang/test/CodeGen/loop-unroll.c
index 7c79ed28b0e79..e02e684f93ab4 100644
--- a/clang/test/CodeGen/loop-unroll.c
+++ b/clang/test/CodeGen/loop-unroll.c
@@ -42,7 +42,7 @@
 
 int printf(const char * restrict format, ...);
 
-void for_test() {
+void for_test(void) {
   double A[1000], B[1000];
   int L = 500;
   for (int i = 0; i < L; i++) {

diff  --git a/clang/test/CodeGen/loop-vectorize.c b/clang/test/CodeGen/loop-vectorize.c
index c4c8715ffe8a5..b68cbba36bf02 100644
--- a/clang/test/CodeGen/loop-vectorize.c
+++ b/clang/test/CodeGen/loop-vectorize.c
@@ -13,7 +13,7 @@
 
 int printf(const char * restrict format, ...);
 
-void for_test() {
+void for_test(void) {
   double A[1000], B[1000];
   int L = 500;
   for (int i = 0; i < L; i++) {

diff  --git a/clang/test/CodeGen/lto-newpm-pipeline.c b/clang/test/CodeGen/lto-newpm-pipeline.c
index ff8d921151397..55bb9b153e66f 100644
--- a/clang/test/CodeGen/lto-newpm-pipeline.c
+++ b/clang/test/CodeGen/lto-newpm-pipeline.c
@@ -61,4 +61,4 @@
 // CHECK-THIN-OPTIMIZED: Running pass: NameAnonGlobalPass
 // CHECK-THIN-OPTIMIZED: Running pass: ThinLTOBitcodeWriterPass
 
-void Foo() {}
+void Foo(void) {}

diff  --git a/clang/test/CodeGen/mandel.c b/clang/test/CodeGen/mandel.c
index 8ecf8f2337a3e..5fd3013c57c0b 100644
--- a/clang/test/CodeGen/mandel.c
+++ b/clang/test/CodeGen/mandel.c
@@ -3,7 +3,7 @@
 /* Sparc is not C99-compliant */
 #if defined(sparc) || defined(__sparc__) || defined(__sparcv9)
 
-int main() { return 0; }
+int main(void) { return 0; }
 
 #else /* sparc */
 
@@ -29,7 +29,7 @@ int putchar(char c);
 
 volatile double __complex__ accum;
 
-void mandel() {
+void mandel(void) {
   int x, y, n;
   for (y = 0; y < IMAGE_HEIGHT; ++y) {
     for (x = 0; x < IMAGE_WIDTH; ++x) {
@@ -57,7 +57,7 @@ void mandel() {
   }
 }
 
-int main() {
+int main(void) {
   mandel();
   return 0;
 }

diff  --git a/clang/test/CodeGen/mangle-windows.c b/clang/test/CodeGen/mangle-windows.c
index c717439e67b3f..1fcac01fb0552 100644
--- a/clang/test/CodeGen/mangle-windows.c
+++ b/clang/test/CodeGen/mangle-windows.c
@@ -22,7 +22,7 @@ void __fastcall f2(void) {}
 // ELF32: define{{.*}} x86_fastcallcc void @"\01 at f2@0"
 // ELF64: define{{.*}} void @f2(
 
-void __stdcall f3() {}
+void __stdcall f3(void) {}
 // CHECK: define dso_local x86_stdcallcc void @"\01_f3 at 0"
 // X64: define dso_local void @f3(
 

diff  --git a/clang/test/CodeGen/matrix-type-builtins.c b/clang/test/CodeGen/matrix-type-builtins.c
index c2868fa267525..fb6e69bcd30fc 100644
--- a/clang/test/CodeGen/matrix-type-builtins.c
+++ b/clang/test/CodeGen/matrix-type-builtins.c
@@ -79,15 +79,14 @@ void transpose_transpose_struct_member(struct Foo *F) {
   F->in = __builtin_matrix_transpose(__builtin_matrix_transpose(F->in));
 }
 
-dx5x5_t get_matrix();
+dx5x5_t get_matrix(void);
 
-void transpose_rvalue() {
+void transpose_rvalue(void) {
   // COMMON-LABEL: define{{.*}} void @transpose_rvalue()
   // COMMON-NEXT:  entry:
   // CHECK32-NEXT:   [[M_T_ADDR:%.*]] = alloca [25 x double], align 4
   // CHECK64-NEXT:   [[M_T_ADDR:%.*]] = alloca [25 x double], align 8
-  // CHECK32-NEXT:   [[CALL:%.*]] = call <25 x double> bitcast (<25 x double> (...)* @get_matrix to <25 x double> ()*)()
-  // CHECK64-NEXT:   [[CALL:%.*]] = call <25 x double> (...) @get_matrix()
+  // COMMON-NEXT:    [[CALL:%.*]] = call <25 x double> @get_matrix()
   // COMMON-NEXT:    [[M_T:%.*]] = call <25 x double> @llvm.matrix.transpose.v25f64(<25 x double> [[CALL]], i32 5, i32 5)
   // COMMON-NEXT:    [[M_T_ADDR_C:%.*]] = bitcast [25 x double]* [[M_T_ADDR]] to <25 x double>*
   // CHECK32-NEXT:   store <25 x double> [[M_T]], <25 x double>* [[M_T_ADDR_C]], align 4
@@ -98,7 +97,7 @@ void transpose_rvalue() {
 
 const dx5x5_t global_matrix;
 
-void transpose_global() {
+void transpose_global(void) {
   // COMMON-LABEL: define{{.*}} void @transpose_global()
   // COMMON-NEXT:  entry:
   // CHECK32-NEXT:    [[M_T_ADDR:%.*]] = alloca [25 x double], align 4
@@ -187,7 +186,7 @@ void column_major_load_array1(double Ptr[25]) {
   dx5x5_t m = __builtin_matrix_column_major_load(Ptr, 5, 5, 5);
 }
 
-void column_major_load_array2() {
+void column_major_load_array2(void) {
   // COMMON-LABEL: define{{.*}} void @column_major_load_array2() #0 {
   // COMMON-NEXT:  entry:
   // CHECK32-NEXT:    [[PTR:%.*]] = alloca [25 x double], align 8
@@ -299,7 +298,7 @@ void column_major_store_array1(double Ptr[25]) {
   __builtin_matrix_column_major_store(m, Ptr, 5);
 }
 
-void column_major_store_array2() {
+void column_major_store_array2(void) {
   // COMMON-LABEL: define{{.*}} void @column_major_store_array2()
   // CHECK32:         [[M:%.*]] = load <25 x double>, <25 x double>* {{.*}}, align 4
   // CHECK32-NEXT:    [[PTR:%.*]] = getelementptr inbounds [25 x double], [25 x double]* %Ptr, i32 0, i32 0

diff  --git a/clang/test/CodeGen/matrix-type.c b/clang/test/CodeGen/matrix-type.c
index e338e1eb53028..1f22cb180f2bc 100644
--- a/clang/test/CodeGen/matrix-type.c
+++ b/clang/test/CodeGen/matrix-type.c
@@ -162,7 +162,7 @@ void matrix_struct(Matrix *a, Matrix *b) {
 }
 
 typedef double dx4x4_t __attribute__((matrix_type(4, 4)));
-void matrix_inline_asm_memory_readwrite() {
+void matrix_inline_asm_memory_readwrite(void) {
   // CHECK-LABEL: define{{.*}} void @matrix_inline_asm_memory_readwrite()
   // CHECK-NEXT:  entry:
   // CHECK-NEXT:    [[ALLOCA:%.+]] = alloca [16 x double], align 8

diff  --git a/clang/test/CodeGen/mcu-struct-return.c b/clang/test/CodeGen/mcu-struct-return.c
index 7db5bc553ea97..e516443fd500d 100644
--- a/clang/test/CodeGen/mcu-struct-return.c
+++ b/clang/test/CodeGen/mcu-struct-return.c
@@ -35,11 +35,11 @@ struct S2 {
 // CHECK: [[STRUCT1_TYPE:%.+]] = type {}
 // CHECK: [[STRUCT2_TYPE:%.+]] = type { i32 }
 
-union U1 foo1() { return u1; }
-union U2 foo2() { return u2; }
-union U3 foo3() { return u3; }
-struct S1 bar1() { return s1; }
-struct S2 bar2() { return s2; }
+union U1 foo1(void) { return u1; }
+union U2 foo2(void) { return u2; }
+union U3 foo3(void) { return u3; }
+struct S1 bar1(void) { return s1; }
+struct S2 bar2(void) { return s2; }
 struct S1 bar3(union U1 u) { return s1; }
 // CHECK: define{{.*}} void @foo1()
 // CHECK: define{{.*}} void @foo2([[UNION2_TYPE]]* noalias sret([[UNION2_TYPE]]) align 4 %{{.+}})
@@ -48,7 +48,7 @@ struct S1 bar3(union U1 u) { return s1; }
 // CHECK: define{{.*}} i32 @bar2()
 // CHECK: define{{.*}} void @bar3()
 
-void run() {
+void run(void) {
   union U1 x1 = foo1();
   union U2 x2 = foo2();
   union U3 x3 = foo3();

diff  --git a/clang/test/CodeGen/merge-attrs.c b/clang/test/CodeGen/merge-attrs.c
index 474b17225ab3c..0a606add556a7 100644
--- a/clang/test/CodeGen/merge-attrs.c
+++ b/clang/test/CodeGen/merge-attrs.c
@@ -8,6 +8,6 @@ inline static void __zend_malloc() {
 
 void *malloc(__SIZE_TYPE__ size) __attribute__ ((__nothrow__));
 
-void fontFetch() {
+void fontFetch(void) {
     __zend_malloc(1);
 }

diff  --git a/clang/test/CodeGen/mips-clobber-reg.c b/clang/test/CodeGen/mips-clobber-reg.c
index a87a3e7b2e66b..18b6a72c13645 100644
--- a/clang/test/CodeGen/mips-clobber-reg.c
+++ b/clang/test/CodeGen/mips-clobber-reg.c
@@ -12,7 +12,7 @@
     Any bad names will make the frontend choke.
  */
 
-main()
+main(void)
 {
 
     __asm__ __volatile__ (".set noat \n\t addi $7,$at,77":::"at");

diff  --git a/clang/test/CodeGen/mips-constraint-regs.c b/clang/test/CodeGen/mips-constraint-regs.c
index 4dfd62ddbfcf7..f6ee2a17f0abf 100644
--- a/clang/test/CodeGen/mips-constraint-regs.c
+++ b/clang/test/CodeGen/mips-constraint-regs.c
@@ -4,7 +4,7 @@
 // This checks that the frontend will accept inline asm constraints
 // c', 'l' and 'x'.
 
-int main()
+int main(void)
 {
   // 'c': 16 bit address register for Mips16, GPR for all others
   // I am using 'c' to constrain both the target and one of the source

diff  --git a/clang/test/CodeGen/mips-constraints-mem.c b/clang/test/CodeGen/mips-constraints-mem.c
index 676ccc120c796..a99a4d2d6b3ac 100644
--- a/clang/test/CodeGen/mips-constraints-mem.c
+++ b/clang/test/CodeGen/mips-constraints-mem.c
@@ -3,7 +3,7 @@
 
 // This checks that the frontend will accept inline asm memory constraints.
 
-int foo()
+int foo(void)
 {
 
  // 'R': An address that can be used in a non-macro load or stor'

diff  --git a/clang/test/CodeGen/mips-inline-asm-modifiers.c b/clang/test/CodeGen/mips-inline-asm-modifiers.c
index 413ba3bfa9c50..7353c492f8bbb 100644
--- a/clang/test/CodeGen/mips-inline-asm-modifiers.c
+++ b/clang/test/CodeGen/mips-inline-asm-modifiers.c
@@ -11,7 +11,7 @@ typedef int v4i32 __attribute__((vector_size(16)));
   // CHECK: %{{[0-9]+}} = call i32 asm "lw    $0,${1:D};\0A", "=r,*m,~{$1}"(i32* elementtype(i32) getelementptr inbounds ([8 x i32], [8 x i32]* @b, i32 {{[0-9]+}}, i32 {{[0-9]+}})) #2,
   // CHECK: %{{[0-9]+}} = call <4 x i32> asm "ldi.w ${0:w},1", "=f,~{$1}"
 int b[8] = {0,1,2,3,4,5,6,7};
-int  main()
+int  main(void)
 {
   int i;
   v4i32 v4i32_r;

diff  --git a/clang/test/CodeGen/mips-type-sizes-int128.c b/clang/test/CodeGen/mips-type-sizes-int128.c
index 85ad73df9b20b..6ca2907018de2 100644
--- a/clang/test/CodeGen/mips-type-sizes-int128.c
+++ b/clang/test/CodeGen/mips-type-sizes-int128.c
@@ -7,7 +7,7 @@
 // O32 does not support __int128 so it must be tested separately
 // N32/N64 behave the same way so their tests have been combined into NEW
 
-int check_int128() {
+int check_int128(void) {
   return sizeof(__int128); // O32: :[[@LINE]]:17: error: __int128 is not supported on this target
 // NEW: ret i32 16
 }

diff  --git a/clang/test/CodeGen/mips-type-sizes.c b/clang/test/CodeGen/mips-type-sizes.c
index 963b282c016b5..b89c91e5c8c8b 100644
--- a/clang/test/CodeGen/mips-type-sizes.c
+++ b/clang/test/CodeGen/mips-type-sizes.c
@@ -2,88 +2,88 @@
 // RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -target-abi n32 -o - %s | FileCheck --check-prefix=ALL --check-prefix=N32 %s
 // RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=ALL --check-prefix=N64 %s
 
-int check_char() {
+int check_char(void) {
   return sizeof(char);
 // ALL: ret i32 1
 }
 
-int check_short() {
+int check_short(void) {
   return sizeof(short);
 // ALL: ret i32 2
 }
 
-int check_int() {
+int check_int(void) {
   return sizeof(int);
 // ALL: ret i32 4
 }
 
-int check_long() {
+int check_long(void) {
   return sizeof(long);
 // O32: ret i32 4
 // N32: ret i32 4
 // N64: ret i32 8
 }
 
-int check_longlong() {
+int check_longlong(void) {
   return sizeof(long long);
 // ALL: ret i32 8
 }
 
-int check_fp16() {
+int check_fp16(void) {
   return sizeof(__fp16);
 // ALL: ret i32 2
 }
 
-int check_float() {
+int check_float(void) {
   return sizeof(float);
 // ALL: ret i32 4
 }
 
-int check_double() {
+int check_double(void) {
   return sizeof(double);
 // ALL: ret i32 8
 }
 
-int check_longdouble() {
+int check_longdouble(void) {
   return sizeof(long double);
 // O32: ret i32 8
 // N32: ret i32 16
 // N64: ret i32 16
 }
 
-int check_floatComplex() {
+int check_floatComplex(void) {
   return sizeof(float _Complex);
 // ALL: ret i32 8
 }
 
-int check_doubleComplex() {
+int check_doubleComplex(void) {
   return sizeof(double _Complex);
 // ALL: ret i32 16
 }
 
-int check_longdoubleComplex() {
+int check_longdoubleComplex(void) {
   return sizeof(long double _Complex);
 // O32: ret i32 16
 // N32: ret i32 32
 // N64: ret i32 32
 }
 
-int check_bool() {
+int check_bool(void) {
   return sizeof(_Bool);
 // ALL: ret i32 1
 }
 
-int check_wchar() {
+int check_wchar(void) {
   return sizeof(__WCHAR_TYPE__);
 // ALL: ret i32 4
 }
 
-int check_wchar_is_unsigned() {
+int check_wchar_is_unsigned(void) {
   return (__WCHAR_TYPE__)-1 > (__WCHAR_TYPE__)0;
 // ALL: ret i32 0
 }
 
-int check_ptr() {
+int check_ptr(void) {
   return sizeof(void *);
 // O32: ret i32 4
 // N32: ret i32 4

diff  --git a/clang/test/CodeGen/mips-unsigned-ext-var.c b/clang/test/CodeGen/mips-unsigned-ext-var.c
index 09e5a8f3b36ef..596b2b2fb1d32 100644
--- a/clang/test/CodeGen/mips-unsigned-ext-var.c
+++ b/clang/test/CodeGen/mips-unsigned-ext-var.c
@@ -12,7 +12,7 @@ unsigned foo(int x, ...) {
   return a;
 }
 
-void foo1() {
+void foo1(void) {
   unsigned f = 0xffffffe0;
   foo(1,f);
 }

diff  --git a/clang/test/CodeGen/mips-unsigned-extend.c b/clang/test/CodeGen/mips-unsigned-extend.c
index 51f0f95140fcc..00fae3d024333 100644
--- a/clang/test/CodeGen/mips-unsigned-extend.c
+++ b/clang/test/CodeGen/mips-unsigned-extend.c
@@ -5,7 +5,7 @@
 void foo(unsigned a) {
 }
 
-void foo1() {
+void foo1(void) {
   unsigned f = 0xffffffe0;
   foo(f);
 }

diff  --git a/clang/test/CodeGen/mips64-f128-literal.c b/clang/test/CodeGen/mips64-f128-literal.c
index 9121169b726e2..c519ca07f2743 100644
--- a/clang/test/CodeGen/mips64-f128-literal.c
+++ b/clang/test/CodeGen/mips64-f128-literal.c
@@ -4,6 +4,6 @@ typedef long double LD;
 
 // CHECK: ret fp128
 
-LD foo0() {
+LD foo0(void) {
   return 2.625L;
 }

diff  --git a/clang/test/CodeGen/ms-anonymous-struct.c b/clang/test/CodeGen/ms-anonymous-struct.c
index bf33406d779c0..1258975c85d00 100644
--- a/clang/test/CodeGen/ms-anonymous-struct.c
+++ b/clang/test/CodeGen/ms-anonymous-struct.c
@@ -21,7 +21,7 @@ struct test {
 };
 
 
-void foo()
+void foo(void)
 {
   // CHECK: %var = alloca %struct.test, align 4
   struct test var;

diff  --git a/clang/test/CodeGen/ms-barriers-intrinsics.c b/clang/test/CodeGen/ms-barriers-intrinsics.c
index e0e948209e3ee..3acb727ec8c57 100644
--- a/clang/test/CodeGen/ms-barriers-intrinsics.c
+++ b/clang/test/CodeGen/ms-barriers-intrinsics.c
@@ -11,26 +11,26 @@ typedef __SIZE_TYPE__ size_t;
 
 #include <intrin.h>
 
-void test_ReadWriteBarrier() { _ReadWriteBarrier(); }
+void test_ReadWriteBarrier(void) { _ReadWriteBarrier(); }
 // CHECK-LABEL: define dso_local void @test_ReadWriteBarrier
 // CHECK:   fence syncscope("singlethread") seq_cst
 // CHECK:   ret void
 // CHECK: }
 
-void test_ReadBarrier() { _ReadBarrier(); }
+void test_ReadBarrier(void) { _ReadBarrier(); }
 // CHECK-LABEL: define dso_local void @test_ReadBarrier
 // CHECK:   fence syncscope("singlethread") seq_cst
 // CHECK:   ret void
 // CHECK: }
 
-void test_WriteBarrier() { _WriteBarrier(); }
+void test_WriteBarrier(void) { _WriteBarrier(); }
 // CHECK-LABEL: define dso_local void @test_WriteBarrier
 // CHECK:   fence syncscope("singlethread") seq_cst
 // CHECK:   ret void
 // CHECK: }
 
 #if defined(__x86_64__)
-void test__faststorefence() { __faststorefence(); }
+void test__faststorefence(void) { __faststorefence(); }
 // CHECK-X64-LABEL: define dso_local void @test__faststorefence
 // CHECK-X64:   fence seq_cst
 // CHECK-X64:   ret void

diff  --git a/clang/test/CodeGen/ms-declspecs.c b/clang/test/CodeGen/ms-declspecs.c
index 68d964003ec89..ff9a143f241ec 100644
--- a/clang/test/CodeGen/ms-declspecs.c
+++ b/clang/test/CodeGen/ms-declspecs.c
@@ -20,14 +20,14 @@ union { struct S s; } u;
 
 
 // CHECK: define dso_local void @t3() [[NAKED:#[0-9]+]] {
-__declspec(naked) void t3() {}
+__declspec(naked) void t3(void) {}
 
 // CHECK: define dso_local void @t22() [[NUW:#[0-9]+]]
-void __declspec(nothrow) t22();
-void t22() {}
+void __declspec(nothrow) t22(void);
+void t22(void) {}
 
 // CHECK: define dso_local void @t2() [[NI:#[0-9]+]] {
-__declspec(noinline) void t2() {}
+__declspec(noinline) void t2(void) {}
 
 // CHECK: call void @f20_t() [[NR:#[0-9]+]]
 __declspec(noreturn) void f20_t(void);

diff  --git a/clang/test/CodeGen/ms-inline-asm-64.c b/clang/test/CodeGen/ms-inline-asm-64.c
index 7fbafaee3fd61..87c4af9aa1eda 100644
--- a/clang/test/CodeGen/ms-inline-asm-64.c
+++ b/clang/test/CodeGen/ms-inline-asm-64.c
@@ -1,7 +1,7 @@
 // REQUIRES: x86-registered-target
 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
 
-void t1() {
+void t1(void) {
   int var = 10;
   __asm mov rax, offset var ; rax = address of myvar
 // CHECK: t1
@@ -10,7 +10,7 @@ void t1() {
 // CHECK-SAME: "r,~{rax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
 }
 
-void t2() {
+void t2(void) {
   int var = 10;
   __asm mov qword ptr [eax], offset var
 // CHECK: t2
@@ -21,7 +21,7 @@ void t2() {
 
 struct t3_type { int a, b; };
 
-int t3() {
+int t3(void) {
   struct t3_type foo;
   foo.a = 1;
   foo.b = 2;
@@ -39,7 +39,7 @@ int t3() {
 // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(%struct.t3_type* elementtype(%struct.t3_type) %{{.*}})
 }
 
-int t4() {
+int t4(void) {
   struct t3_type foo;
   foo.a = 1;
   foo.b = 2;
@@ -61,7 +61,7 @@ int t4() {
 
 void bar() {}
 
-void t5() {
+void t5(void) {
   __asm {
     call bar
     jmp bar

diff  --git a/clang/test/CodeGen/ms-inline-asm-EVEN.c b/clang/test/CodeGen/ms-inline-asm-EVEN.c
index a188af30910ad..572f43540d397 100644
--- a/clang/test/CodeGen/ms-inline-asm-EVEN.c
+++ b/clang/test/CodeGen/ms-inline-asm-EVEN.c
@@ -5,7 +5,7 @@
 // CHECK: .byte 64
 // CHECK: .byte 64
 // CHECK:  .even
-void t1() {
+void t1(void) {
   __asm {
     .byte 64
     .byte 64

diff  --git a/clang/test/CodeGen/ms-inline-asm-align.c b/clang/test/CodeGen/ms-inline-asm-align.c
index 2eed0aee3ee02..4a00cba2a1a3e 100644
--- a/clang/test/CodeGen/ms-inline-asm-align.c
+++ b/clang/test/CodeGen/ms-inline-asm-align.c
@@ -6,7 +6,7 @@
 // Intel inline assembly parser should rewrite to the appropriate form depending
 // on the platform.
 
-void align_test() {
+void align_test(void) {
   __asm align 8
   __asm align 16;
   __asm align 128;

diff  --git a/clang/test/CodeGen/ms-inline-asm-avx512.c b/clang/test/CodeGen/ms-inline-asm-avx512.c
index 76c0a57250b35..a21bf4e190fc9 100644
--- a/clang/test/CodeGen/ms-inline-asm-avx512.c
+++ b/clang/test/CodeGen/ms-inline-asm-avx512.c
@@ -1,7 +1,7 @@
 // REQUIRES: x86-registered-target
 // RUN: %clang_cc1 %s -triple x86_64-pc-windows-msvc -target-cpu skylake-avx512 -fasm-blocks -emit-llvm -o - | FileCheck %s
 
-void t1() {
+void t1(void) {
 // CHECK: @t1
 // CHECK: call void asm sideeffect inteldialect "vaddpd zmm8, zmm27, zmm6", "~{zmm8},~{dirflag},~{fpsr},~{flags}"()
 // CHECK: ret void
@@ -11,7 +11,7 @@ void t1() {
 }
 
 
-void t2() {
+void t2(void) {
 // CHECK: @t2
 // CHECK: call void asm sideeffect inteldialect "vaddpd zmm8 {k1}, zmm27, zmm6", "~{zmm8},~{dirflag},~{fpsr},~{flags}"()
 // CHECK: ret void
@@ -20,7 +20,7 @@ void t2() {
   }
 }
 
-void ignore_fe_size() {
+void ignore_fe_size(void) {
   // CHECK-LABEL: define dso_local void @ignore_fe_size()
   char c;
   // CHECK: vaddps xmm1, xmm2, $1{1to4}

diff  --git a/clang/test/CodeGen/ms-inline-asm-functions.c b/clang/test/CodeGen/ms-inline-asm-functions.c
index 1a6ead9286dff..ad6a385279dc1 100644
--- a/clang/test/CodeGen/ms-inline-asm-functions.c
+++ b/clang/test/CodeGen/ms-inline-asm-functions.c
@@ -8,9 +8,9 @@
 int k(int);
 __declspec(dllimport) int kimport(int);
 int (*kptr)(int);
-int (*gptr())(int);
+int (*gptr(void))(int);
 
-int foo() {
+int foo(void) {
   // CHECK-LABEL: _foo:
   int (*r)(int) = gptr();
 
@@ -30,13 +30,13 @@ int foo() {
   // CHECK-FIXME: calll   *_kptr
 }
 
-int bar() {
+int bar(void) {
   // CHECK-LABEL: _bar:
   __asm jmp k;
   // CHECK:     jmp     _k
 }
 
-int baz() {
+int baz(void) {
   // CHECK-LABEL: _baz:
   __asm mov eax, k;
   // CHECK: movl    _k, %eax
@@ -47,7 +47,7 @@ int baz() {
 // Test that this asm blob doesn't require more registers than available.  This
 // has to be an LLVM code generation test.
 
-void __declspec(naked) naked() {
+void __declspec(naked) naked(void) {
   __asm pusha
   __asm call k
   __asm popa

diff  --git a/clang/test/CodeGen/ms-inline-asm-static-variable.c b/clang/test/CodeGen/ms-inline-asm-static-variable.c
index 67334cb5d0f7c..46b5201c9e290 100644
--- a/clang/test/CodeGen/ms-inline-asm-static-variable.c
+++ b/clang/test/CodeGen/ms-inline-asm-static-variable.c
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 %s -fasm-blocks -triple i386-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 static int arr[10];
-void t1() {
+void t1(void) {
   // CHECK: @arr = internal global [10 x i32]
   // CHECK: call void asm sideeffect inteldialect "mov dword ptr arr[edx * $$4],edx", "=*m,{{.*}}([10 x i32]* elementtype([10 x i32]) @arr)
   __asm mov  dword ptr arr[edx*4],edx

diff  --git a/clang/test/CodeGen/ms-inline-asm-variables.c b/clang/test/CodeGen/ms-inline-asm-variables.c
index 0997c55c559bf..c5e56b3349d64 100644
--- a/clang/test/CodeGen/ms-inline-asm-variables.c
+++ b/clang/test/CodeGen/ms-inline-asm-variables.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 %s -fasm-blocks -triple i386-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 int gVar;
-void t1() {
+void t1(void) {
   // CHECK: add eax, dword ptr gVar[eax]
   __asm add eax, dword ptr gVar[eax]
   // CHECK: add dword ptr gVar[eax], eax
@@ -19,7 +19,7 @@ void t1() {
   __asm add 1 + 1 + 2 + 3[gVar + ecx + ebx], eax
 }
 
-void t2() {
+void t2(void) {
   int lVar;
   // CHECK: mov eax, dword ptr ${{[0-9]}}[eax]
   __asm mov eax, dword ptr lVar[eax]

diff  --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 4869f2f6dbbf9..e973aa38ecea1 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -1,14 +1,14 @@
 // REQUIRES: x86-registered-target
 // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
 
-void t1() {
+void t1(void) {
 // CHECK: @t1
 // CHECK: call void asm sideeffect inteldialect "", "~{dirflag},~{fpsr},~{flags}"()
 // CHECK: ret void
   __asm {}
 }
 
-void t2() {
+void t2(void) {
 // CHECK: @t2
 // CHECK: call void asm sideeffect inteldialect "nop\0A\09nop\0A\09nop", "~{dirflag},~{fpsr},~{flags}"()
 // CHECK: ret void
@@ -17,7 +17,7 @@ void t2() {
   __asm nop
 }
 
-void t3() {
+void t3(void) {
 // CHECK: @t3
 // CHECK: call void asm sideeffect inteldialect "nop\0A\09nop\0A\09nop", "~{dirflag},~{fpsr},~{flags}"()
 // CHECK: ret void
@@ -45,7 +45,7 @@ void t6(void) {
 // CHECK: call void asm sideeffect inteldialect "int $$44", "~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t7() {
+void t7(void) {
   __asm {
     int 0x2cU ; } asm comments are fun! }{
   }
@@ -66,7 +66,7 @@ void t7() {
 // CHECK: call void asm sideeffect inteldialect "mov eax, ebx", "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-int t8() {
+int t8(void) {
   __asm int 4 ; } comments for single-line asm
   __asm {}
   __asm { int 5}
@@ -85,7 +85,7 @@ int t8() {
 // CHECK: ret i32 10
 }
 
-void t9() {
+void t9(void) {
   __asm {
     push ebx
     { mov ebx, 0x07 }
@@ -143,7 +143,7 @@ unsigned t12(void) {
 // CHECK-SAME: "=*m,=*m,=&{eax},*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}})
 }
 
-void t13() {
+void t13(void) {
   char i = 1;
   short j = 2;
   __asm movzx eax, i
@@ -155,7 +155,7 @@ void t13() {
 // CHECK-SAME: "*m,*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %{{.*}}i, i16* elementtype(i16) %{{.*}}j)
 }
 
-void t13_brac() {
+void t13_brac(void) {
   char i = 1;
   short j = 2;
   __asm movzx eax, [i]
@@ -167,7 +167,7 @@ void t13_brac() {
 // CHECK-SAME: "*m,*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %{{.*}}i, i16* elementtype(i16) %{{.*}}j)
 }
 
-void t14() {
+void t14(void) {
   unsigned i = 1, j = 2;
   __asm {
     .if 1
@@ -181,7 +181,7 @@ void t14() {
 }
 
 int gvar = 10;
-void t15() {
+void t15(void) {
 // CHECK: t15
   int lvar = 10;
   __asm mov eax, lvar        ; eax = 10
@@ -199,14 +199,14 @@ void t15() {
 // CHECK: "*m,r,i,i,i,i,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %{{.*}}, i32* %{{.*}}, i32* @{{.*}}, i32* @{{.*}}, i32* @{{.*}}, i32* @{{.*}})
 }
 
-void t16() {
+void t16(void) {
   int var = 10;
   __asm mov dword ptr [eax], offset var
 // CHECK: t16
 // CHECK: call void asm sideeffect inteldialect "mov dword ptr [eax], $0", "r,~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
 }
 
-void t17() {
+void t17(void) {
 // CHECK: t17
   __asm _emit 0x4A
 // CHECK: .byte 0x4A
@@ -219,7 +219,7 @@ void t17() {
 // CHECK:  "~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t20() {
+void t20(void) {
 // CHECK: t20
   char bar;
   int foo;
@@ -262,7 +262,7 @@ void t20() {
 
 }
 
-void t21() {
+void t21(void) {
   __asm {
     __asm push ebx
     __asm mov ebx, 07H
@@ -277,7 +277,7 @@ void t21() {
 }
 
 extern void t22_helper(int x);
-void t22() {
+void t22(void) {
   int x = 0;
   __asm {
     __asm push ebx
@@ -300,7 +300,7 @@ void t22() {
 // CHECK-SAME: "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t23() {
+void t23(void) {
   __asm {
   the_label:
   }
@@ -309,13 +309,13 @@ void t23() {
 }
 
 void t24_helper(void) {}
-void t24() {
+void t24(void) {
   __asm call t24_helper
 // CHECK: t24
 // CHECK: call void asm sideeffect inteldialect "call dword ptr ${0:P}", "*m,~{dirflag},~{fpsr},~{flags}"(void ()* elementtype(void ()) @t24_helper)
 }
 
-void t25() {
+void t25(void) {
 // CHECK: t25
   __asm mov eax, 0ffffffffh
 // CHECK: mov eax, $$4294967295
@@ -330,7 +330,7 @@ void t25() {
 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t26() {
+void t26(void) {
 // CHECK: t26
   __asm pushad
 // CHECK: pushad
@@ -347,13 +347,13 @@ void t26() {
 // CHECK: "~{eax},~{ebp},~{ebx},~{ecx},~{edi},~{edx},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t27() {
+void t27(void) {
   __asm mov eax, fs:[0h]
 // CHECK: t27
 // CHECK: call void asm sideeffect inteldialect "mov eax, fs:[$$0]", "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t28() {
+void t28(void) {
 // CHECK: t28
   __asm align 8
 // CHECK: .align 3
@@ -366,7 +366,7 @@ void t28() {
 // CHECK: "~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t29() {
+void t29(void) {
 // CHECK: t29
   int arr[2] = {0, 0};
   int olen = 0, osize = 0, otype = 0;
@@ -380,7 +380,7 @@ void t29() {
 }
 
 int results[2] = {13, 37};
-int *t30()
+int *t30(void)
 // CHECK: t30
 {
   int *res;
@@ -392,7 +392,7 @@ int *t30()
 // CHECK: "=*m,={eax},*m,~{edi},~{dirflag},~{fpsr},~{flags}"(i32** elementtype(i32*) %{{.*}}, [2 x i32]* elementtype([2 x i32]) @{{.*}})
 }
 
-void t31() {
+void t31(void) {
 // CHECK: t31
   __asm pushad
 // CHECK: pushad
@@ -401,7 +401,7 @@ void t31() {
 // CHECK: "~{eax},~{ebp},~{ebx},~{ecx},~{edi},~{edx},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t32() {
+void t32(void) {
 // CHECK: t32
   int i;
   __asm mov eax, i
@@ -415,7 +415,7 @@ void t32() {
 // CHECK: "*m,*m,*m,*m,~{al},~{ax},~{eax},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}})
 }
 
-void t33() {
+void t33(void) {
 // CHECK: t33
   int i;
   __asm mov eax, [i]
@@ -429,7 +429,7 @@ void t33() {
 // CHECK: "*m,*m,*m,*m,~{al},~{ax},~{eax},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}}, i32* elementtype(i32) %{{.*}})
 }
 
-void t34() {
+void t34(void) {
 // CHECK: t34
   __asm prefetchnta 64[eax]
 // CHECK: prefetchnta [eax + $$64]
@@ -438,7 +438,7 @@ void t34() {
 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t35() {
+void t35(void) {
 // CHECK: t35
   __asm prefetchnta [eax + (200*64)]
 // CHECK: prefetchnta [eax + $$12800]
@@ -447,7 +447,7 @@ void t35() {
 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t36() {
+void t36(void) {
 // CHECK: t36
   int arr[4];
   // Work around PR20368: These should be single line blocks
@@ -479,7 +479,7 @@ void t36() {
 // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* elementtype([4 x i32]) %{{.*}})
 }
 
-void t37() {
+void t37(void) {
 // CHECK: t37
   __asm mov eax, 4 + 8
 // CHECK: mov eax, $$12
@@ -502,7 +502,7 @@ void t37() {
 // CHECK: "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t38() {
+void t38(void) {
 // CHECK: t38
   int arr[4];
   // Work around PR20368: These should be single line blocks
@@ -524,7 +524,7 @@ void t38() {
 // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* elementtype([4 x i32]) %{{.*}})
 }
 
-void cpuid() {
+void cpuid(void) {
   __asm cpuid
 // CHECK-LABEL: define{{.*}} void @cpuid
 // CHECK: call void asm sideeffect inteldialect "cpuid", "~{eax},~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"()
@@ -547,7 +547,7 @@ typedef struct {
   B   c4;
 } C, *pC;
 
-void t39() {
+void t39(void) {
 // CHECK-LABEL: define{{.*}} void @t39
   __asm mov eax, [eax].A.b
 // CHECK: mov eax, [eax + $$4]
@@ -597,7 +597,7 @@ void t41(unsigned short a) {
 // CHECK: "*m,*m,*m,*m,*m,*m,~{dirflag},~{fpsr},~{flags}"(i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}}, i16* {{.*}})
 }
 
-void t42() {
+void t42(void) {
 // CHECK-LABEL: define{{.*}} void @t42(
   int flags;
   __asm mov flags, eax
@@ -605,7 +605,7 @@ void t42() {
 // CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %flags)
 }
 
-void t42b() {
+void t42b(void) {
 // CHECK-LABEL: define{{.*}} void @t42b(
   int mxcsr;
   __asm mov mxcsr, eax
@@ -613,7 +613,7 @@ void t42b() {
 // CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %mxcsr)
 }
 
-void t43() {
+void t43(void) {
 // CHECK-LABEL: define{{.*}} void @t43
   C strct;
 // Work around PR20368: These should be single line blocks
@@ -645,7 +645,7 @@ void t43() {
 // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %{{.*}})
 }
 
-void t44() {
+void t44(void) {
   // CHECK-LABEL: define{{.*}} void @t44
   __asm {
     mov cr0, eax
@@ -656,7 +656,7 @@ void t44() {
   // CHECK: call void asm sideeffect inteldialect "mov cr0, eax\0A\09mov cr2, ebx\0A\09mov cr3, ecx\0A\09mov cr4, edx", "~{cr0},~{cr2},~{cr3},~{cr4},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t45() {
+void t45(void) {
   // CHECK-LABEL: define{{.*}} void @t45
   __asm {
     mov dr0, eax
@@ -669,31 +669,31 @@ void t45() {
   // CHECK: call void asm sideeffect inteldialect "mov dr0, eax\0A\09mov dr1, ebx\0A\09mov dr2, ebx\0A\09mov dr3, ecx\0A\09mov dr6, edx\0A\09mov dr7, ecx", "~{dr0},~{dr1},~{dr2},~{dr3},~{dr6},~{dr7},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void t46() {
+void t46(void) {
   // CHECK-LABEL: define{{.*}} void @t46
   __asm add eax, -128[eax]
   // CHECK: call void asm sideeffect inteldialect "add eax, [eax + $$-128]", "~{eax},~{flags},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void dot_operator(){
+void dot_operator(void){
   // CHECK-LABEL: define{{.*}} void @dot_operator
 	__asm { mov eax, 3[ebx]A.b}
   // CHECK: call void asm sideeffect inteldialect "mov eax, [ebx + $$7]", "~{eax},~{dirflag},~{fpsr},~{flags}"
 }
 
-void call_clobber() {
+void call_clobber(void) {
   __asm call t41
   // CHECK-LABEL: define{{.*}} void @call_clobber
   // CHECK: call void asm sideeffect inteldialect "call dword ptr ${0:P}", "*m,~{dirflag},~{fpsr},~{flags}"(void (i16)* elementtype(void (i16)) @t41)
 }
 
-void xgetbv() {
+void xgetbv(void) {
   __asm xgetbv
 }
 // CHECK-LABEL: define{{.*}} void @xgetbv()
 // CHECK: call void asm sideeffect inteldialect "xgetbv", "~{eax},~{edx},~{dirflag},~{fpsr},~{flags}"()
 
-void label1() {
+void label1(void) {
   __asm {
     label:
     jmp label
@@ -702,7 +702,7 @@ void label1() {
   // CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09jmp {{.*}}__MSASMLABEL_.${:uid}__label", "~{dirflag},~{fpsr},~{flags}"() [[ATTR1:#[0-9]+]]
 }
 
-void label2() {
+void label2(void) {
   __asm {
     jmp label
     label:
@@ -711,7 +711,7 @@ void label2() {
   // CHECK: call void asm sideeffect inteldialect "jmp {{.*}}__MSASMLABEL_.${:uid}__label\0A\09{{.*}}__MSASMLABEL_.${:uid}__label:", "~{dirflag},~{fpsr},~{flags}"()
 }
 
-void label3() {
+void label3(void) {
   __asm {
     label:
     mov eax, label
@@ -720,7 +720,7 @@ void label3() {
   // CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09mov eax, {{.*}}__MSASMLABEL_.${:uid}__label", "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void label4() {
+void label4(void) {
   __asm {
     label:
     mov eax, [label]
@@ -729,7 +729,7 @@ void label4() {
   // CHECK: call void asm sideeffect inteldialect "{{.*}}__MSASMLABEL_.${:uid}__label:\0A\09mov eax, {{.*}}__MSASMLABEL_.${:uid}__label", "~{eax},~{dirflag},~{fpsr},~{flags}"()
 }
 
-void label5() {
+void label5(void) {
   __asm {
     jmp dollar_label$
     dollar_label$:
@@ -738,7 +738,7 @@ void label5() {
   // CHECK: call void asm sideeffect inteldialect "jmp {{.*}}__MSASMLABEL_.${:uid}__dollar_label$$\0A\09{{.*}}__MSASMLABEL_.${:uid}__dollar_label$$:", "~{dirflag},~{fpsr},~{flags}"()
 }
 
-void label6(){
+void label6(void){
   __asm {
       jmp short label
       jc  short label
@@ -750,7 +750,7 @@ void label6(){
 }
 
 // Don't include mxcsr in the clobber list.
-void mxcsr() {
+void mxcsr(void) {
   char buf[4096];
   __asm fxrstor buf
 }
@@ -758,7 +758,7 @@ void mxcsr() {
 // CHECK: call void asm sideeffect inteldialect "fxrstor $0", "=*m,~{fpcr},~{dirflag},~{fpsr},~{flags}"
 
 // Make sure we can find the register for the dirflag for popfd
-void dirflag() {
+void dirflag(void) {
   __asm popfd
 }
 // CHECK-LABEL: define{{.*}} void @dirflag

diff  --git a/clang/test/CodeGen/ms-intrinsics.c b/clang/test/CodeGen/ms-intrinsics.c
index 0b5d9e19cbf39..21dd5e23f93b4 100644
--- a/clang/test/CodeGen/ms-intrinsics.c
+++ b/clang/test/CodeGen/ms-intrinsics.c
@@ -130,7 +130,7 @@ void test__int2c(void) {
 
 #endif
 
-void *test_ReturnAddress() {
+void *test_ReturnAddress(void) {
   return _ReturnAddress();
 }
 // CHECK-LABEL: define{{.*}}i8* @test_ReturnAddress()
@@ -138,7 +138,7 @@ void *test_ReturnAddress() {
 // CHECK: ret i8*
 
 #if defined(__i386__) || defined(__x86_64__) || defined (__aarch64__)
-void *test_AddressOfReturnAddress() {
+void *test_AddressOfReturnAddress(void) {
   return _AddressOfReturnAddress();
 }
 // CHECK-INTEL-LABEL: define dso_local i8* @test_AddressOfReturnAddress()
@@ -1402,7 +1402,7 @@ __int64 test_InterlockedDecrement64_nf(__int64 volatile *Addend) {
 // CHECK-ARM-ARM64: }
 #endif
 
-void test__fastfail() {
+void test__fastfail(void) {
   __fastfail(42);
 }
 // CHECK-LABEL: define{{.*}} void @test__fastfail()

diff  --git a/clang/test/CodeGen/ms-setjmp.c b/clang/test/CodeGen/ms-setjmp.c
index d1edf3ab0f84b..a7c0c4880a4e9 100644
--- a/clang/test/CodeGen/ms-setjmp.c
+++ b/clang/test/CodeGen/ms-setjmp.c
@@ -13,7 +13,7 @@ int _setjmpex(jmp_buf env);
 
 jmp_buf jb;
 
-int test_setjmp() {
+int test_setjmp(void) {
   return _setjmp(jb);
   // I386-LABEL: define dso_local i32 @test_setjmp
   // I386:       %[[call:.*]] = call i32 (i8*, i32, ...) @_setjmp3(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @jb, i32 0, i32 0), i32 0)
@@ -30,7 +30,7 @@ int test_setjmp() {
   // AARCH64-NEXT:  ret i32 %[[call]]
 }
 
-int test_setjmpex() {
+int test_setjmpex(void) {
   return _setjmpex(jb);
   // X64-LABEL: define dso_local i32 @test_setjmpex
   // X64:       %[[addr:.*]] = call i8* @llvm.frameaddress.p0i8(i32 0)

diff  --git a/clang/test/CodeGen/ms_struct-bitfield-init.c b/clang/test/CodeGen/ms_struct-bitfield-init.c
index 7a483fb84b8bd..933293838c603 100644
--- a/clang/test/CodeGen/ms_struct-bitfield-init.c
+++ b/clang/test/CodeGen/ms_struct-bitfield-init.c
@@ -42,7 +42,7 @@ struct {
   int i4;
 } t3 = {1,2,3,4};
 
-int main() {
+int main(void) {
   if (sizeof(t1) != 2)
     abort();
   if (t1.foo != 'a')

diff  --git a/clang/test/CodeGen/mult-alt-generic.c b/clang/test/CodeGen/mult-alt-generic.c
index 433f2763472a4..75bb9aa472945 100644
--- a/clang/test/CodeGen/mult-alt-generic.c
+++ b/clang/test/CodeGen/mult-alt-generic.c
@@ -15,14 +15,14 @@ int min1;
 int marray[2];
 
 // CHECK: @single_m
-void single_m()
+void single_m(void)
 {
   // CHECK: call void asm "foo $1,$0", "=*m,*m[[CLOBBERS:[a-zA-Z0-9@%{},~_$ ]*\"]](i32* elementtype(i32) {{[a-zA-Z0-9@%]+}}, i32* elementtype(i32) {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=m" (mout0) : "m" (min1));
 }
 
 // CHECK: @single_o
-void single_o()
+void single_o(void)
 {
   register int out0 = 0;
   register int index = 1;
@@ -31,13 +31,13 @@ void single_o()
 }
 
 // CHECK: @single_V
-void single_V()
+void single_V(void)
 {
 //  asm("foo %1,%0" : "=m" (mout0) : "V" (min1));
 }
 
 // CHECK: @single_lt
-void single_lt()
+void single_lt(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -48,7 +48,7 @@ void single_lt()
 }
 
 // CHECK: @single_gt
-void single_gt()
+void single_gt(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -59,7 +59,7 @@ void single_gt()
 }
 
 // CHECK: @single_r
-void single_r()
+void single_r(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -68,7 +68,7 @@ void single_r()
 }
 
 // CHECK: @single_i
-void single_i()
+void single_i(void)
 {
   register int out0 = 0;
   // CHECK: call i32 asm "foo $1,$0", "=r,i[[CLOBBERS]](i32 1)
@@ -76,7 +76,7 @@ void single_i()
 }
 
 // CHECK: @single_n
-void single_n()
+void single_n(void)
 {
   register int out0 = 0;
   // CHECK: call i32 asm "foo $1,$0", "=r,n[[CLOBBERS]](i32 1)
@@ -84,7 +84,7 @@ void single_n()
 }
 
 // CHECK: @single_E
-void single_E()
+void single_E(void)
 {
   register double out0 = 0.0;
   // CHECK: call double asm "foo $1,$0", "=r,E[[CLOBBERS]](double {{[0-9.eE+-]+}})
@@ -92,7 +92,7 @@ void single_E()
 }
 
 // CHECK: @single_F
-void single_F()
+void single_F(void)
 {
   register double out0 = 0.0;
   // CHECK: call double asm "foo $1,$0", "=r,F[[CLOBBERS]](double {{[0-9.eE+-]+}})
@@ -100,14 +100,14 @@ void single_F()
 }
 
 // CHECK: @single_s
-void single_s()
+void single_s(void)
 {
   register int out0 = 0;
   //asm("foo %1,%0" : "=r" (out0) : "s" (single_s));
 }
 
 // CHECK: @single_g
-void single_g()
+void single_g(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -120,7 +120,7 @@ void single_g()
 }
 
 // CHECK: @single_X
-void single_X()
+void single_X(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -139,7 +139,7 @@ void single_X()
 }
 
 // CHECK: @single_p
-void single_p()
+void single_p(void)
 {
   register int out0 = 0;
   // Constraint converted 
diff erently on 
diff erent platforms moved to platform-specific.
@@ -148,14 +148,14 @@ void single_p()
 }
 
 // CHECK: @multi_m
-void multi_m()
+void multi_m(void)
 {
   // CHECK: call void asm "foo $1,$0", "=*m|r,m|r[[CLOBBERS]](i32* elementtype(i32) {{[a-zA-Z0-9@%]+}}, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=m,r" (mout0) : "m,r" (min1));
 }
 
 // CHECK: @multi_o
-void multi_o()
+void multi_o(void)
 {
   register int out0 = 0;
   register int index = 1;
@@ -164,13 +164,13 @@ void multi_o()
 }
 
 // CHECK: @multi_V
-void multi_V()
+void multi_V(void)
 {
 //  asm("foo %1,%0" : "=m,r" (mout0) : "r,V" (min1));
 }
 
 // CHECK: @multi_lt
-void multi_lt()
+void multi_lt(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -181,7 +181,7 @@ void multi_lt()
 }
 
 // CHECK: @multi_gt
-void multi_gt()
+void multi_gt(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -192,7 +192,7 @@ void multi_gt()
 }
 
 // CHECK: @multi_r
-void multi_r()
+void multi_r(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -201,7 +201,7 @@ void multi_r()
 }
 
 // CHECK: @multi_i
-void multi_i()
+void multi_i(void)
 {
   register int out0 = 0;
   // CHECK: call i32 asm "foo $1,$0", "=r|r,r|i[[CLOBBERS]](i32 1)
@@ -209,7 +209,7 @@ void multi_i()
 }
 
 // CHECK: @multi_n
-void multi_n()
+void multi_n(void)
 {
   register int out0 = 0;
   // CHECK: call i32 asm "foo $1,$0", "=r|r,r|n[[CLOBBERS]](i32 1)
@@ -217,7 +217,7 @@ void multi_n()
 }
 
 // CHECK: @multi_E
-void multi_E()
+void multi_E(void)
 {
   register double out0 = 0.0;
   // CHECK: call double asm "foo $1,$0", "=r|r,r|E[[CLOBBERS]](double {{[0-9.eE+-]+}})
@@ -225,7 +225,7 @@ void multi_E()
 }
 
 // CHECK: @multi_F
-void multi_F()
+void multi_F(void)
 {
   register double out0 = 0.0;
   // CHECK: call double asm "foo $1,$0", "=r|r,r|F[[CLOBBERS]](double {{[0-9.eE+-]+}})
@@ -233,14 +233,14 @@ void multi_F()
 }
 
 // CHECK: @multi_s
-void multi_s()
+void multi_s(void)
 {
   register int out0 = 0;
   //asm("foo %1,%0" : "=r,r" (out0) : "r,s" (multi_s));
 }
 
 // CHECK: @multi_g
-void multi_g()
+void multi_g(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -253,7 +253,7 @@ void multi_g()
 }
 
 // CHECK: @multi_X
-void multi_X()
+void multi_X(void)
 {
   register int out0 = 0;
   register int in1 = 1;
@@ -272,7 +272,7 @@ void multi_X()
 }
 
 // CHECK: @multi_p
-void multi_p()
+void multi_p(void)
 {
   register int out0 = 0;
   // Constraint converted 
diff erently on 
diff erent platforms moved to platform-specific.

diff  --git a/clang/test/CodeGen/mult-alt-x86.c b/clang/test/CodeGen/mult-alt-x86.c
index 85e65bf88168b..db457e173943b 100644
--- a/clang/test/CodeGen/mult-alt-x86.c
+++ b/clang/test/CodeGen/mult-alt-x86.c
@@ -8,109 +8,109 @@ double dout0;
 double din1;
 
 // CHECK: @single_R
-void single_R()
+void single_R(void)
 {
   // CHECK: asm "foo $1,$0", "=R,R[[CLOBBERS:[a-zA-Z0-9@%{},~_ ]*\"]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=R" (mout0) : "R" (min1));
 }
 
 // CHECK: @single_q
-void single_q()
+void single_q(void)
 {
   // CHECK: asm "foo $1,$0", "=q,q[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=q" (mout0) : "q" (min1));
 }
 
 // CHECK: @single_Q
-void single_Q()
+void single_Q(void)
 {
   // CHECK: asm "foo $1,$0", "=Q,Q[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=Q" (mout0) : "Q" (min1));
 }
 
 // CHECK: @single_a
-void single_a()
+void single_a(void)
 {
   // CHECK: asm "foo $1,$0", "={ax},{ax}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=a" (mout0) : "a" (min1));
 }
 
 // CHECK: @single_b
-void single_b()
+void single_b(void)
 {
   // CHECK: asm "foo $1,$0", "={bx},{bx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=b" (mout0) : "b" (min1));
 }
 
 // CHECK: @single_c
-void single_c()
+void single_c(void)
 {
   // CHECK: asm "foo $1,$0", "={cx},{cx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=c" (mout0) : "c" (min1));
 }
 
 // CHECK: @single_d
-void single_d()
+void single_d(void)
 {
   // CHECK: asm "foo $1,$0", "={dx},{dx}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=d" (mout0) : "d" (min1));
 }
 
 // CHECK: @single_S
-void single_S()
+void single_S(void)
 {
   // CHECK: asm "foo $1,$0", "={si},{si}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=S" (mout0) : "S" (min1));
 }
 
 // CHECK: @single_D
-void single_D()
+void single_D(void)
 {
   // CHECK: asm "foo $1,$0", "={di},{di}[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=D" (mout0) : "D" (min1));
 }
 
 // CHECK: @single_A
-void single_A()
+void single_A(void)
 {
   // CHECK: asm "foo $1,$0", "=A,A[[CLOBBERS]](i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=A" (mout0) : "A" (min1));
 }
 
 // CHECK: @single_f
-void single_f()
+void single_f(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @single_t
-void single_t()
+void single_t(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @single_u
-void single_u()
+void single_u(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @single_y
-void single_y()
+void single_y(void)
 {
   // CHECK: call double asm "foo $1,$0", "=y,y[[CLOBBERS]](double {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=y" (dout0) : "y" (din1));
 }
 
 // CHECK: @single_x
-void single_x()
+void single_x(void)
 {
   // CHECK: asm "foo $1,$0", "=x,x[[CLOBBERS]](double {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=x" (dout0) : "x" (din1));
 }
 
 // CHECK: @single_Y
-void single_Y()
+void single_Y(void)
 {
   // 'Y' constraint currently broken.
   //asm("foo %1,%0" : "=Y0" (mout0) : "Y0" (min1));
@@ -121,28 +121,28 @@ void single_Y()
 }
 
 // CHECK: @single_I
-void single_I()
+void single_I(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,I[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "I" (1));
 }
 
 // CHECK: @single_J
-void single_J()
+void single_J(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,J[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "J" (1));
 }
 
 // CHECK: @single_K
-void single_K()
+void single_K(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,K[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "K" (1));
 }
 
 // CHECK: @single_L
-void single_L()
+void single_L(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,L[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 255)
   asm("foo %1,%0" : "=m" (mout0) : "L" (0xff));
@@ -153,151 +153,151 @@ void single_L()
 }
 
 // CHECK: @single_M
-void single_M()
+void single_M(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,M[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "M" (1));
 }
 
 // CHECK: @single_N
-void single_N()
+void single_N(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,N[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "N" (1));
 }
 
 // CHECK: @single_G
-void single_G()
+void single_G(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,G[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
   asm("foo %1,%0" : "=m" (mout0) : "G" (1.0));
 }
 
 // CHECK: @single_C
-void single_C()
+void single_C(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,C[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
   asm("foo %1,%0" : "=m" (mout0) : "C" (1.0));
 }
 
 // CHECK: @single_e
-void single_e()
+void single_e(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,e[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "e" (1));
 }
 
 // CHECK: @single_Z
-void single_Z()
+void single_Z(void)
 {
   // CHECK: asm "foo $1,$0", "=*m,Z[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=m" (mout0) : "Z" (1));
 }
 
 // CHECK: @multi_R
-void multi_R()
+void multi_R(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|R|m,r|R|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,R,m" (mout0) : "r,R,m" (min1));
 }
 
 // CHECK: @multi_q
-void multi_q()
+void multi_q(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|q|m,r|q|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,q,m" (mout0) : "r,q,m" (min1));
 }
 
 // CHECK: @multi_Q
-void multi_Q()
+void multi_Q(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|Q|m,r|Q|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,Q,m" (mout0) : "r,Q,m" (min1));
 }
 
 // CHECK: @multi_a
-void multi_a()
+void multi_a(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{ax}|m,r|{ax}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,a,m" (mout0) : "r,a,m" (min1));
 }
 
 // CHECK: @multi_b
-void multi_b()
+void multi_b(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{bx}|m,r|{bx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,b,m" (mout0) : "r,b,m" (min1));
 }
 
 // CHECK: @multi_c
-void multi_c()
+void multi_c(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{cx}|m,r|{cx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,c,m" (mout0) : "r,c,m" (min1));
 }
 
 // CHECK: @multi_d
-void multi_d()
+void multi_d(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{dx}|m,r|{dx}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,d,m" (mout0) : "r,d,m" (min1));
 }
 
 // CHECK: @multi_S
-void multi_S()
+void multi_S(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{si}|m,r|{si}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,S,m" (mout0) : "r,S,m" (min1));
 }
 
 // CHECK: @multi_D
-void multi_D()
+void multi_D(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|{di}|m,r|{di}|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,D,m" (mout0) : "r,D,m" (min1));
 }
 
 // CHECK: @multi_A
-void multi_A()
+void multi_A(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|A|m,r|A|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,A,m" (mout0) : "r,A,m" (min1));
 }
 
 // CHECK: @multi_f
-void multi_f()
+void multi_f(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @multi_t
-void multi_t()
+void multi_t(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @multi_u
-void multi_u()
+void multi_u(void)
 {
 //FIXME: I don't know how to do an 80387 floating point stack register operation, which I think is fp80.
 }
 
 // CHECK: @multi_y
-void multi_y()
+void multi_y(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|y|m,r|y|m[[CLOBBERS]](double* elementtype(double) @dout0, double {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,y,m" (dout0) : "r,y,m" (din1));
 }
 
 // CHECK: @multi_x
-void multi_x()
+void multi_x(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|x|m,r|x|m[[CLOBBERS]](double* elementtype(double) @dout0, double {{[a-zA-Z0-9@%]+}})
   asm("foo %1,%0" : "=r,x,m" (dout0) : "r,x,m" (din1));
 }
 
 // CHECK: @multi_Y
-void multi_Y0()
+void multi_Y0(void)
 {
   // Y constraint currently broken.
   //asm("foo %1,%0" : "=r,Y0,m" (mout0) : "r,Y0,m" (min1));
@@ -308,70 +308,70 @@ void multi_Y0()
 }
 
 // CHECK: @multi_I
-void multi_I()
+void multi_I(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|I|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,I,m" (1));
 }
 
 // CHECK: @multi_J
-void multi_J()
+void multi_J(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|J|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,J,m" (1));
 }
 
 // CHECK: @multi_K
-void multi_K()
+void multi_K(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|K|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,K,m" (1));
 }
 
 // CHECK: @multi_L
-void multi_L()
+void multi_L(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|L|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,L,m" (1));
 }
 
 // CHECK: @multi_M
-void multi_M()
+void multi_M(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|M|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,M,m" (1));
 }
 
 // CHECK: @multi_N
-void multi_N()
+void multi_N(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|N|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,N,m" (1));
 }
 
 // CHECK: @multi_G
-void multi_G()
+void multi_G(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|G|m[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,G,m" (1.0));
 }
 
 // CHECK: @multi_C
-void multi_C()
+void multi_C(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|C|m[[CLOBBERS]](i32* elementtype(i32) @mout0, double {{1.[0]+e[+]*[0]+}})
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,C,m" (1.0));
 }
 
 // CHECK: @multi_e
-void multi_e()
+void multi_e(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|e|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,e,m" (1));
 }
 
 // CHECK: @multi_Z
-void multi_Z()
+void multi_Z(void)
 {
   // CHECK: asm "foo $1,$0", "=*r|m|m,r|Z|m[[CLOBBERS]](i32* elementtype(i32) @mout0, i32 1)
   asm("foo %1,%0" : "=r,m,m" (mout0) : "r,Z,m" (1));

diff  --git a/clang/test/CodeGen/named_reg_global.c b/clang/test/CodeGen/named_reg_global.c
index 719e61a97a9db..542c7120d9ccd 100644
--- a/clang/test/CodeGen/named_reg_global.c
+++ b/clang/test/CodeGen/named_reg_global.c
@@ -25,7 +25,7 @@ register struct p4_Thread *p4TH asm("sp");
 // CHECK: define{{.*}} i[[bits:[0-9]+]] @get_stack_pointer_addr()
 // CHECK: [[ret:%[0-9]+]] = call i[[bits]] @llvm.read_register.i[[bits]](metadata !0)
 // CHECK: ret i[[bits]] [[ret]]
-unsigned long get_stack_pointer_addr() {
+unsigned long get_stack_pointer_addr(void) {
   return current_stack_pointer;
 }
 // CHECK: declare{{.*}} i[[bits]] @llvm.read_register.i[[bits]](metadata)
@@ -40,7 +40,7 @@ void set_stack_pointer_addr(unsigned long addr) {
 // CHECK: declare{{.*}} void @llvm.write_register.i[[bits]](metadata, i[[bits]])
 
 // CHECK: define {{.*}}@fn1
-int fn1() {
+int fn1(void) {
   return (*p4TH).word.len;
 }
 // CHECK: %[[regr:[0-9]+]] = call i[[bits]] @llvm.read_register.i[[bits]](metadata !0)

diff  --git a/clang/test/CodeGen/no-junk-ftrunc.c b/clang/test/CodeGen/no-junk-ftrunc.c
index 62491fbfa7cd4..ad1219391843b 100644
--- a/clang/test/CodeGen/no-junk-ftrunc.c
+++ b/clang/test/CodeGen/no-junk-ftrunc.c
@@ -17,7 +17,7 @@
 // STRICT-NOT: strict-float-cast-overflow
 
 
-int main() {
+int main(void) {
   double d = 1e20;
   return (int)d != 1e20 && (unsigned)d != 1e20;
 }

diff  --git a/clang/test/CodeGen/no_profile.c b/clang/test/CodeGen/no_profile.c
index 9c9524338fe59..dde3da12755fc 100644
--- a/clang/test/CodeGen/no_profile.c
+++ b/clang/test/CodeGen/no_profile.c
@@ -8,7 +8,7 @@
 // RUN:   -emit-llvm -o - %s | FileCheck %s
 int g(int);
 
-void __attribute__((no_profile_instrument_function)) no_instr() {
+void __attribute__((no_profile_instrument_function)) no_instr(void) {
 // CHECK: define {{.*}}void @no_instr() [[ATTR:#[0-9]+]]
 }
 

diff  --git a/clang/test/CodeGen/nobuiltin.c b/clang/test/CodeGen/nobuiltin.c
index 543918f67491b..de996300beba7 100644
--- a/clang/test/CodeGen/nobuiltin.c
+++ b/clang/test/CodeGen/nobuiltin.c
@@ -8,7 +8,7 @@
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin -O1 -fexperimental-new-pass-manager -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin-memset -O1 -fexperimental-new-pass-manager -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=NOMEMSET %s
 
-void PR13497() {
+void PR13497(void) {
   char content[2];
   // make sure we don't optimize this call to strcpy()
   // STRCPY-NOT: __strcpy_chk

diff  --git a/clang/test/CodeGen/noexceptionsfpmath.c b/clang/test/CodeGen/noexceptionsfpmath.c
index f468e98eb7a6d..13a02b957705d 100644
--- a/clang/test/CodeGen/noexceptionsfpmath.c
+++ b/clang/test/CodeGen/noexceptionsfpmath.c
@@ -3,6 +3,6 @@
 // CHECK-LABEL: main
 // CHECK: attributes #0 = {{.*}}"no-trapping-math"="true"{{.*}}
 
-int main() {
+int main(void) {
   return 0;
 }

diff  --git a/clang/test/CodeGen/noinline.c b/clang/test/CodeGen/noinline.c
index bd5a9d8c35ff5..41d7bd3dad3bf 100644
--- a/clang/test/CodeGen/noinline.c
+++ b/clang/test/CodeGen/noinline.c
@@ -8,7 +8,7 @@ inline int dont_inline_me(int a, int b) { return(a+b); }
 inline __attribute__ ((__always_inline__)) int inline_me(int a, int b) { return(a*b); }
 
 volatile int *pa = (int*) 0x1000;
-void foo() {
+void foo(void) {
 // NOINLINE: @foo
 // NOINLINE: dont_inline_me
 // NOINLINE-NOT: inlinehint

diff  --git a/clang/test/CodeGen/nonnull.c b/clang/test/CodeGen/nonnull.c
index a36e29f8e2e92..89f00741ac4ff 100644
--- a/clang/test/CodeGen/nonnull.c
+++ b/clang/test/CodeGen/nonnull.c
@@ -22,7 +22,7 @@ void bar2(int * x, int * y) __attribute__((nonnull(2)))  {
 static int a;
 // NULL-INVALID: define{{.*}} nonnull i32* @bar3()
 // NULL-VALID: define{{.*}} i32* @bar3()
-int * bar3() __attribute__((returns_nonnull))  {
+int * bar3(void) __attribute__((returns_nonnull))  {
   return &a;
 }
 

diff  --git a/clang/test/CodeGen/noplt.c b/clang/test/CodeGen/noplt.c
index 20e2e07b0fd4a..6436306f6ca61 100644
--- a/clang/test/CodeGen/noplt.c
+++ b/clang/test/CodeGen/noplt.c
@@ -3,8 +3,8 @@
 // CHECK-NOPLT: Function Attrs: nonlazybind
 // CHECK-NOPLT-NEXT: declare {{.*}}i32 @foo
 // CHECK-NOPLT-METADATA: !"RtLibUseGOT"
-int foo();
+int foo(void);
 
-int bar() {
+int bar(void) {
   return foo();
 }

diff  --git a/clang/test/CodeGen/nousejumptable.c b/clang/test/CodeGen/nousejumptable.c
index 91ad5818570db..fb6a2a28339b0 100644
--- a/clang/test/CodeGen/nousejumptable.c
+++ b/clang/test/CodeGen/nousejumptable.c
@@ -3,6 +3,6 @@
 // CHECK-LABEL: main
 // CHECK: attributes #0 = {{.*}}"no-jump-tables"="true"{{.*}}
 
-int main() {
+int main(void) {
   return 0;
 }

diff  --git a/clang/test/CodeGen/nvptx-inlineasm-ptx.c b/clang/test/CodeGen/nvptx-inlineasm-ptx.c
index e5345d93de06d..ad1567fb3020f 100644
--- a/clang/test/CodeGen/nvptx-inlineasm-ptx.c
+++ b/clang/test/CodeGen/nvptx-inlineasm-ptx.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple nvptx-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s
 // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -O3 -S -o - %s -emit-llvm | FileCheck %s
 
-void constraints() {
+void constraints(void) {
   char           c;
   unsigned char  uc;
   short          s;

diff  --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c
index e82829d9a3af2..153b3d9e6047b 100644
--- a/clang/test/CodeGen/object-size.c
+++ b/clang/test/CodeGen/object-size.c
@@ -21,38 +21,38 @@ char *gp;
 int gi, gj;
 
 // CHECK-LABEL: define{{.*}} void @test1
-void test1() {
+void test1(void) {
   // CHECK:     = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 4), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 59)
   strcpy(&gbuf[4], "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test2
-void test2() {
+void test2(void) {
   // CHECK:     = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 63)
   strcpy(gbuf, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test3
-void test3() {
+void test3(void) {
   // CHECK:     = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0)
   strcpy(&gbuf[100], "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test4
-void test4() {
+void test4(void) {
   // CHECK:     = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 -1), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 0)
   strcpy((char*)(void*)&gbuf[-1], "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test5
-void test5() {
+void test5(void) {
   // CHECK:     = load i8*, i8** @gp
   // CHECK-NEXT:= call i64 @llvm.objectsize.i64.p0i8(i8* %{{.*}}, i1 false, i1 true, i1
   strcpy(gp, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test6
-void test6() {
+void test6(void) {
   char buf[57];
 
   // CHECK:       = call i8* @__strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 53)
@@ -60,7 +60,7 @@ void test6() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test7
-void test7() {
+void test7(void) {
   int i;
   // Ensure we only evaluate the side-effect once.
   // CHECK:     = add
@@ -70,7 +70,7 @@ void test7() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test8
-void test8() {
+void test8(void) {
   char *buf[50];
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
@@ -78,7 +78,7 @@ void test8() {
 }
 
 // CHECK-LABEL: define{{.*}} void @test9
-void test9() {
+void test9(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy((char *)((++gi) + gj), "Hi there");
@@ -86,56 +86,56 @@ void test9() {
 
 // CHECK-LABEL: define{{.*}} void @test10
 char **p;
-void test10() {
+void test10(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(*(++p), "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test11
-void test11() {
+void test11(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @gbuf, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(gp = gbuf, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test12
-void test12() {
+void test12(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(++gp, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test13
-void test13() {
+void test13(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(gp++, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test14
-void test14() {
+void test14(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(--gp, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test15
-void test15() {
+void test15(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(gp--, "Hi there");
 }
 
 // CHECK-LABEL: define{{.*}} void @test16
-void test16() {
+void test16(void) {
   // CHECK-NOT:   __strcpy_chk
   // CHECK:       = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
   strcpy(gp += 1, "Hi there");
 }
 
 // CHECK-LABEL: @test17
-void test17() {
+void test17(void) {
   // CHECK: store i32 -1
   gi = OBJECT_SIZE_BUILTIN(gp++, 0);
   // CHECK: store i32 -1
@@ -155,7 +155,7 @@ unsigned test18(int cond) {
 }
 
 // CHECK-LABEL: @test19
-void test19() {
+void test19(void) {
   struct {
     int a, b;
   } foo;
@@ -180,7 +180,7 @@ void test19() {
 }
 
 // CHECK-LABEL: @test20
-void test20() {
+void test20(void) {
   struct { int t[10]; } t[10];
 
   // CHECK: store i32 380
@@ -194,7 +194,7 @@ void test20() {
 }
 
 // CHECK-LABEL: @test21
-void test21() {
+void test21(void) {
   struct { int t; } t;
 
   // CHECK: store i32 0
@@ -217,7 +217,7 @@ void test21() {
 }
 
 // CHECK-LABEL: @test22
-void test22() {
+void test22(void) {
   struct { int t[10]; } t[10];
 
   // CHECK: store i32 0
@@ -293,7 +293,7 @@ void test23(struct Test23Ty *p) {
 
 // PR24493 -- ICE if OBJECT_SIZE_BUILTIN called with NULL and (Type & 1) != 0
 // CHECK-LABEL: @test24
-void test24() {
+void test24(void) {
   // CHECK: call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 true, i1
   gi = OBJECT_SIZE_BUILTIN((void*)0, 0);
   // CHECK: call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 true, i1
@@ -307,7 +307,7 @@ void test24() {
 }
 
 // CHECK-LABEL: @test25
-void test25() {
+void test25(void) {
   // CHECK: call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 true, i1
   gi = OBJECT_SIZE_BUILTIN((void*)0x1000, 0);
   // CHECK: call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 true, i1
@@ -332,7 +332,7 @@ void test25() {
 }
 
 // CHECK-LABEL: @test26
-void test26() {
+void test26(void) {
   struct { int v[10]; } t[10];
 
   // CHECK: store i32 316
@@ -375,7 +375,7 @@ void test27(struct Test27IncompleteTy *t) {
 // The intent of this test is to ensure that OBJECT_SIZE_BUILTIN treats `&foo`
 // and `(T*)&foo` identically, when used as the pointer argument.
 // CHECK-LABEL: @test28
-void test28() {
+void test28(void) {
   struct { int v[10]; } t[10];
 
 #define addCasts(s) ((char*)((short*)(s)))
@@ -460,7 +460,7 @@ void test29(struct DynStructVar *dv, struct DynStruct0 *d0,
 }
 
 // CHECK-LABEL: @test30
-void test30() {
+void test30(void) {
   struct { struct DynStruct1 fst, snd; } *nested;
 
   // CHECK: call i64 @llvm.objectsize.i64.p0i8(i8* %{{.*}}, i1 false, i1 true, i1
@@ -502,7 +502,7 @@ void test30() {
 }
 
 // CHECK-LABEL: @test31
-void test31() {
+void test31(void) {
   // Miscellaneous 'writing off the end' detection tests
   struct DynStructVar *dsv;
   struct DynStruct0 *ds0;
@@ -526,7 +526,7 @@ void test31() {
 }
 
 // CHECK-LABEL: @PR30346
-void PR30346() {
+void PR30346(void) {
   struct sa_family_t {};
   struct sockaddr {
     struct sa_family_t sa_family;
@@ -546,7 +546,7 @@ void PR30346() {
 
 extern char incomplete_char_array[];
 // CHECK-LABEL: @incomplete_and_function_types
-int incomplete_and_function_types() {
+int incomplete_and_function_types(void) {
   // CHECK: call i64 @llvm.objectsize.i64.p0i8
   gi = OBJECT_SIZE_BUILTIN(incomplete_char_array, 0);
   // CHECK: call i64 @llvm.objectsize.i64.p0i8
@@ -558,7 +558,7 @@ int incomplete_and_function_types() {
 }
 
 // Flips between the pointer and lvalue evaluator a lot.
-void deeply_nested() {
+void deeply_nested(void) {
   struct {
     struct {
       struct {

diff  --git a/clang/test/CodeGen/openmp_default_simd_align.c b/clang/test/CodeGen/openmp_default_simd_align.c
index dcab5abf8fcca..59fc7d699bfe9 100644
--- a/clang/test/CodeGen/openmp_default_simd_align.c
+++ b/clang/test/CodeGen/openmp_default_simd_align.c
@@ -5,7 +5,7 @@ struct s0 {
   enum e0         a:31;
 };
 
-int f0() {
+int f0(void) {
   return __builtin_omp_required_simd_align(struct s0);
   // CHECK: ret i32 16
 }

diff  --git a/clang/test/CodeGen/opt-record.c b/clang/test/CodeGen/opt-record.c
index 243d05d26e318..391c14b7bbcc2 100644
--- a/clang/test/CodeGen/opt-record.c
+++ b/clang/test/CodeGen/opt-record.c
@@ -11,8 +11,8 @@
 // RUN: not %clang_cc1 -O3 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 %s -o %t -opt-record-file %t.yaml -opt-record-format "unknown-format" -emit-obj 2>&1 | FileCheck -check-prefix=CHECK-FORMAT-ERROR %s
 // REQUIRES: x86-registered-target
 
-void bar();
-void foo() { bar(); }
+void bar(void);
+void foo(void) { bar(); }
 
 void Test(int *res, int *c, int *d, int *p, int n) {
   int i;

diff  --git a/clang/test/CodeGen/overloadable.c b/clang/test/CodeGen/overloadable.c
index f4fd0b36308b5..49a262303763f 100644
--- a/clang/test/CodeGen/overloadable.c
+++ b/clang/test/CodeGen/overloadable.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
 // CHECK: _Z1fPA10_1X
-// CHECK: _Z1fPFvE
+// CHECK: _Z1fPFvvE
 
 int __attribute__((overloadable)) f(int x) { return x; }
 float __attribute__((overloadable)) f(float x) { return x; }
@@ -14,9 +14,9 @@ void  __attribute__((overloadable)) f(struct X (*ptr)[10]) { }
 
 void __attribute__((overloadable)) f(int x, int y, ...) { }
 
-void __attribute__((overloadable)) f(void (*x)()) {}
+void __attribute__((overloadable)) f(void (*x)(void)) {}
 
-int main() {
+int main(void) {
   int iv = 17;
   float fv = 3.0f;
   double dv = 4.0;
@@ -42,7 +42,7 @@ void addrof_single(char *a) __attribute__((overloadable, enable_if(0, "")));
 void addrof_single(char *a) __attribute__((overloadable));
 
 // CHECK-LABEL: define {{(dso_local )?}}void @foo
-void foo() {
+void foo(void) {
   // CHECK: store void (i8*)* @_Z11addrof_manyPc
   void (*p1)(char *) = &addrof_many;
   // CHECK: store void (i8*)* @_Z11addrof_manyPv
@@ -65,7 +65,7 @@ void ovl_bar(char *) __attribute__((overloadable));
 void ovl_bar(int) __attribute__((overloadable));
 
 // CHECK-LABEL: define {{(dso_local )?}}void @bar
-void bar() {
+void bar(void) {
   char charbuf[1];
   unsigned char ucharbuf[1];
 
@@ -80,7 +80,7 @@ void ovl_baz(unsigned int *, unsigned int) __attribute__((overloadable));
 void ovl_baz2(int, int *) __attribute__((overloadable));
 void ovl_baz2(unsigned int, unsigned int *) __attribute__((overloadable));
 // CHECK-LABEL: define {{(dso_local )?}}void @baz
-void baz() {
+void baz(void) {
   unsigned int j;
   // Initial rules for incompatible pointer conversions made this overload
   // ambiguous.

diff  --git a/clang/test/CodeGen/override-layout.c b/clang/test/CodeGen/override-layout.c
index 9907fec31843e..f7f9aea14d01f 100644
--- a/clang/test/CodeGen/override-layout.c
+++ b/clang/test/CodeGen/override-layout.c
@@ -18,7 +18,7 @@ struct X0 {
   int x[6] PACKED; 
 };
 
-void use_X0() { struct X0 x0; x0.x[5] = sizeof(struct X0); };
+void use_X0(void) { struct X0 x0; x0.x[5] = sizeof(struct X0); };
 
 // CHECK: Type: struct X1
 struct X1 { 
@@ -26,7 +26,7 @@ struct X1 {
   struct X0 y; 
 } PACKED;
 
-void use_X1() { struct X1 x1; x1.x[5] = sizeof(struct X1); };
+void use_X1(void) { struct X1 x1; x1.x[5] = sizeof(struct X1); };
 
 // CHECK: Type: struct X2
 struct PACKED X2 {
@@ -34,7 +34,7 @@ struct PACKED X2 {
   int y;
 };
 
-void use_X2() { struct X2 x2; x2.y = sizeof(struct X2); };
+void use_X2(void) { struct X2 x2; x2.y = sizeof(struct X2); };
 
 // CHECK: Type: struct X3
 struct X3 {
@@ -42,7 +42,7 @@ struct X3 {
   int y;
 };
 
-void use_X3() { struct X3 x3; x3.y = sizeof(struct X3); };
+void use_X3(void) { struct X3 x3; x3.y = sizeof(struct X3); };
 
 #pragma pack(push,2)
 // CHECK: Type: struct X4
@@ -52,17 +52,17 @@ struct X4 {
 };
 #pragma pack(pop)
 
-void use_X4() { struct X4 x4; x4.y = sizeof(struct X4); };
+void use_X4(void) { struct X4 x4; x4.y = sizeof(struct X4); };
 
 // CHECK: Type: struct X5
 struct PACKED X5 { double a[19];  signed char b; };
 
-void use_X5() { struct X5 x5; x5.b = sizeof(struct X5); };
+void use_X5(void) { struct X5 x5; x5.b = sizeof(struct X5); };
 
 // CHECK: Type: struct X6
 struct PACKED X6 { long double a; char b; };
 
-void use_X6() { struct X6 x6; x6.b = sizeof(struct X6); };
+void use_X6(void) { struct X6 x6; x6.b = sizeof(struct X6); };
 
 // CHECK: Type: struct X7
 struct X7 {
@@ -70,7 +70,7 @@ struct X7 {
         unsigned char y;
 } PACKED;
 
-void use_X7() { struct X7 x7; x7.y = x7.x = sizeof(struct X7); }
+void use_X7(void) { struct X7 x7; x7.y = x7.x = sizeof(struct X7); }
 
 // CHECK: Type: union X8
 union X8 {
@@ -128,7 +128,7 @@ struct ALIGNED16 X16 {
   int y : 29;
 };
 
-void use_structs() {
+void use_structs(void) {
   union X8 x8;
   typedef int X8array[sizeof(union X8)];
   x8.y = sizeof(union X8);

diff  --git a/clang/test/CodeGen/packed-arrays.c b/clang/test/CodeGen/packed-arrays.c
index cb807e2c5ed9d..2b07a8d003d74 100644
--- a/clang/test/CodeGen/packed-arrays.c
+++ b/clang/test/CodeGen/packed-arrays.c
@@ -152,6 +152,6 @@ int f3_d(struct s3 *a) {
 // CHECK:   load double, double* {{.*}}, align 8
 // CHECK: }
 extern double g4[5] __attribute__((aligned(16)));
-double f4() {
+double f4(void) {
   return g4[1];
 }

diff  --git a/clang/test/CodeGen/packed-nest-unpacked.c b/clang/test/CodeGen/packed-nest-unpacked.c
index 4124a8ade86a0..cabe1eb1e86f9 100644
--- a/clang/test/CodeGen/packed-nest-unpacked.c
+++ b/clang/test/CodeGen/packed-nest-unpacked.c
@@ -7,12 +7,12 @@ void f(struct X);
 struct X foo(void);
 
 // <rdar://problem/10463337>
-struct X test1() {
+struct X test1(void) {
   // CHECK: @test1
   // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* align 1 bitcast (%struct.X* getelementptr inbounds (%struct.Y, %struct.Y* @g, i32 0, i32 1) to i8*), i64 24, i1 false)
   return g.y;
 }
-struct X test2() {
+struct X test2(void) {
   // CHECK: @test2
   // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* align 1 bitcast (%struct.X* getelementptr inbounds (%struct.Y, %struct.Y* @g, i32 0, i32 1) to i8*), i64 24, i1 false)
   struct X a = g.y;
@@ -26,21 +26,21 @@ void test3(struct X a) {
 }
 
 // <rdar://problem/10530444>
-void test4() {
+void test4(void) {
   // CHECK: @test4
   // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* align 1 bitcast (%struct.X* getelementptr inbounds (%struct.Y, %struct.Y* @g, i32 0, i32 1) to i8*), i64 24, i1 false)
   f(g.y);
 }
 
 // PR12395
-int test5() {
+int test5(void) {
   // CHECK: @test5
   // CHECK: load i32, i32* getelementptr inbounds (%struct.Y, %struct.Y* @g, i32 0, i32 1, i32 0, i64 0), align 1
   return g.y.x[0];
 }
 
 // <rdar://problem/11220251>
-void test6() {
+void test6(void) {
   // CHECK: @test6
   // CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 bitcast (%struct.X* getelementptr inbounds (%struct.Y, %struct.Y* @g, i32 0, i32 1) to i8*), i8* align 4 %{{.*}}, i64 24, i1 false)
   g.y = foo();
@@ -58,7 +58,7 @@ struct YBitfield {
 } __attribute((packed));
 struct YBitfield gbitfield;
 
-unsigned test7() {
+unsigned test7(void) {
   // CHECK: @test7
   // CHECK: load i32, i32* getelementptr inbounds (%struct.YBitfield, %struct.YBitfield* @gbitfield, i32 0, i32 1, i32 0), align 1
   return gbitfield.y.b2;
@@ -79,7 +79,7 @@ struct TBitfield
 };
 struct TBitfield tbitfield;
 
-unsigned test9() {
+unsigned test9(void) {
   // CHECK: @test9
   // CHECK: load i16, i16* getelementptr inbounds (%struct.TBitfield, %struct.TBitfield* @tbitfield, i32 0, i32 2), align 1
   return tbitfield.c;

diff  --git a/clang/test/CodeGen/padding-init.c b/clang/test/CodeGen/padding-init.c
index 4cec08974a9f8..bad5f07d635ce 100644
--- a/clang/test/CodeGen/padding-init.c
+++ b/clang/test/CodeGen/padding-init.c
@@ -25,7 +25,7 @@ void use(struct S*);
 // CHECK-NEXT:  %[[B:[0-9+]]] = bitcast %struct.S* %s to i8*
 // CHECK-NEXT:  call void @llvm.memset{{.*}}(i8* align 8 %[[B]], i8 0,
 // CHECK-NEXT:  call void @use(%struct.S* noundef %s)
-void empty_braces() {
+void empty_braces(void) {
   struct S s = {};
   return use(&s);
 }
@@ -35,7 +35,7 @@ void empty_braces() {
 // CHECK-NEXT:  %[[B:[0-9+]]] = bitcast %struct.S* %s to i8*
 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}(i8* align 8 %[[B]], {{.*}}@__const.partial_init.s
 // CHECK-NEXT:  call void @use(%struct.S* noundef %s)
-void partial_init() {
+void partial_init(void) {
   struct S s = { .c = 42 };
   return use(&s);
 }
@@ -45,7 +45,7 @@ void partial_init() {
 // CHECK-NEXT:  %[[B:[0-9+]]] = bitcast %struct.S* %s to i8*
 // CHECK-NEXT:  call void @llvm.memcpy{{.*}}(i8* align 8 %[[B]], {{.*}}@__const.init_all.s
 // CHECK-NEXT:  call void @use(%struct.S* noundef %s)
-void init_all() {
+void init_all(void) {
   struct S s = { .c = 42, .l = 0xdeadbeefc0fedead };
   return use(&s);
 }

diff  --git a/clang/test/CodeGen/partial-reinitialization2.c b/clang/test/CodeGen/partial-reinitialization2.c
index 9c3ce99b98dc5..7f59f5c58831f 100644
--- a/clang/test/CodeGen/partial-reinitialization2.c
+++ b/clang/test/CodeGen/partial-reinitialization2.c
@@ -40,21 +40,21 @@ void test3(void)
 }
 
 // CHECK-LABEL: get235
-struct P2 get235()
+struct P2 get235(void)
 {
   struct P2 p = { 2, 3, 5 };
   return p;
 }
 
 // CHECK-LABEL: get456789
-struct LP2P2 get456789()
+struct LP2P2 get456789(void)
 {
   struct LP2P2 l = { { 4, 5, 6 }, { 7, 8, 9 } };
   return l;
 }
 
 // CHECK-LABEL: get123
-union UP2 get123()
+union UP2 get123(void)
 {
   union UP2 u = { { 1, 2, 3 } };
   return u;

diff  --git a/clang/test/CodeGen/pascal-wchar-string.c b/clang/test/CodeGen/pascal-wchar-string.c
index ac36e4028f4c2..558b42077bef1 100644
--- a/clang/test/CodeGen/pascal-wchar-string.c
+++ b/clang/test/CodeGen/pascal-wchar-string.c
@@ -36,6 +36,6 @@ int main(int argc, char* argv[])
 // PR8856 - -fshort-wchar makes wchar_t be unsigned.
 // CHECK: @test2
 // CHECK: store volatile i32 1, i32* %isUnsigned
-void test2() {
+void test2(void) {
   volatile int isUnsigned = (wchar_t)-1 > (wchar_t)0;
 }

diff  --git a/clang/test/CodeGen/pass-object-size.c b/clang/test/CodeGen/pass-object-size.c
index cdefeebdd587c..4f4082777c5ab 100644
--- a/clang/test/CodeGen/pass-object-size.c
+++ b/clang/test/CodeGen/pass-object-size.c
@@ -188,7 +188,7 @@ int NoViableOverloadObjectSize3(void *const p PS(3))
 }
 
 // CHECK-LABEL: define{{.*}} void @test3
-void test3() {
+void test3(void) {
   struct Foo t[10];
 
   // CHECK: call i32 @_Z27NoViableOverloadObjectSize0PvU17pass_object_size0(i8* noundef %{{.*}}, i64 noundef 360)
@@ -235,7 +235,7 @@ void test4(struct Foo *t) {
   gi = NoViableOverloadObjectSize3(&t[1].t[1]);
 }
 
-void test5() {
+void test5(void) {
   struct Foo t[10];
 
   int (*f)(void *) = &NoViableOverloadObjectSize0;
@@ -290,7 +290,7 @@ int OverloadedObjectSize(void *const p, void *const c)
     __attribute__((overloadable)) __asm__("OverloadNoSize");
 
 // CHECK-LABEL: define{{.*}} void @test6
-void test6() {
+void test6(void) {
   int known[10], *opaque;
 
   // CHECK: call i32 @"\01Overload0"
@@ -318,7 +318,7 @@ int AsmObjectSize2(void *const p PS(2)) __asm__("Identity");
 int AsmObjectSize3(void *const p PS(3)) __asm__("Identity");
 
 // CHECK-LABEL: define{{.*}} void @test7
-void test7() {
+void test7(void) {
   struct Foo t[10];
 
   // CHECK: call i32 @"\01Identity"(i8* noundef %{{.*}}, i64 noundef 360)
@@ -408,7 +408,7 @@ void test12(void *const p __attribute__((pass_object_size(3)))) {
 }
 
 // CHECK-LABEL: define{{.*}} void @test13
-void test13() {
+void test13(void) {
   char c[10];
   unsigned i = 0;
   char *p = c;

diff  --git a/clang/test/CodeGen/patchable-function-entry.c b/clang/test/CodeGen/patchable-function-entry.c
index 6e8d0d743cf45..2acd748758490 100644
--- a/clang/test/CodeGen/patchable-function-entry.c
+++ b/clang/test/CodeGen/patchable-function-entry.c
@@ -3,29 +3,29 @@
 // RUN: %clang_cc1 -triple x86_64 -emit-llvm %s -fms-hotpatch -o - | FileCheck --check-prefixes=HOTPATCH %s
 
 // CHECK: define{{.*}} void @f0() #0
-__attribute__((patchable_function_entry(0))) void f0() {}
+__attribute__((patchable_function_entry(0))) void f0(void) {}
 
 // CHECK: define{{.*}} void @f00() #0
-__attribute__((patchable_function_entry(0, 0))) void f00() {}
+__attribute__((patchable_function_entry(0, 0))) void f00(void) {}
 
 // CHECK: define{{.*}} void @f2() #1
-__attribute__((patchable_function_entry(2))) void f2() {}
+__attribute__((patchable_function_entry(2))) void f2(void) {}
 
 // CHECK: define{{.*}} void @f20() #1
-__attribute__((patchable_function_entry(2, 0))) void f20() {}
+__attribute__((patchable_function_entry(2, 0))) void f20(void) {}
 
 // CHECK: define{{.*}} void @f20decl() #1
-__attribute__((patchable_function_entry(2, 0))) void f20decl();
-void f20decl() {}
+__attribute__((patchable_function_entry(2, 0))) void f20decl(void);
+void f20decl(void) {}
 
 // CHECK: define{{.*}} void @f44() #2
-__attribute__((patchable_function_entry(4, 4))) void f44() {}
+__attribute__((patchable_function_entry(4, 4))) void f44(void) {}
 
 // CHECK: define{{.*}} void @f52() #3
-__attribute__((patchable_function_entry(5, 2))) void f52() {}
+__attribute__((patchable_function_entry(5, 2))) void f52(void) {}
 
 // OPT: define{{.*}} void @f() #4
-void f() {}
+void f(void) {}
 
 /// No need to emit "patchable-function-entry"="0"
 // CHECK: attributes #0 = { {{.*}}

diff  --git a/clang/test/CodeGen/pr23258.c b/clang/test/CodeGen/pr23258.c
index f67f48ac9c3e6..98d19e0d781cd 100644
--- a/clang/test/CodeGen/pr23258.c
+++ b/clang/test/CodeGen/pr23258.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=NO-SKIP
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -mskip-rax-setup -emit-llvm %s -o - | FileCheck %s -check-prefix=SKIP
 
-void f() {}
+void f(void) {}
 
 // SKIP: !"SkipRaxSetup", i32 1}
 // NO-SKIP-NOT: "SkipRaxSetup"

diff  --git a/clang/test/CodeGen/pr34021.c b/clang/test/CodeGen/pr34021.c
index 3ec0a12478cb2..439ca60ec826d 100644
--- a/clang/test/CodeGen/pr34021.c
+++ b/clang/test/CodeGen/pr34021.c
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -fms-extensions %s -triple=x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s --check-prefix=X64
 
 typedef int v4si __attribute__ ((vector_size (16)));
-v4si rep() {
+v4si rep(void) {
 // X86-LABEL: define{{.*}} <4 x i32> @rep
 // X86: %[[ALLOCA0:.*]] = alloca <4 x i32>, align 16
 // X86: %[[ALLOCA1:.*]] = alloca <4 x i32>, align 16

diff  --git a/clang/test/CodeGen/pragma-visibility.c b/clang/test/CodeGen/pragma-visibility.c
index d9c79388bd6e9..748acf11d5791 100644
--- a/clang/test/CodeGen/pragma-visibility.c
+++ b/clang/test/CodeGen/pragma-visibility.c
@@ -16,9 +16,9 @@ int z = 0;
 #pragma GCC visibility pop
 
 #pragma GCC visibility push(hidden)
-void f() {}
+void f(void) {}
 // CHECK-LABEL: define hidden void @f
 
-__attribute((visibility("default"))) void g();
-void g() {}
+__attribute((visibility("default"))) void g(void);
+void g(void) {}
 // CHECK-LABEL: define{{.*}} void @g

diff  --git a/clang/test/CodeGen/pragma-weak.c b/clang/test/CodeGen/pragma-weak.c
index 8d69211adc96a..4fe8886a009f0 100644
--- a/clang/test/CodeGen/pragma-weak.c
+++ b/clang/test/CodeGen/pragma-weak.c
@@ -139,13 +139,13 @@ __attribute((pure,noinline,const)) void __xxx(void) { }
 ///////////// PR10878: Make sure we can call a weak alias
 void SHA512Pad(void *context) {}
 #pragma weak SHA384Pad = SHA512Pad
-void PR10878() { SHA384Pad(0); }
+void PR10878(void) { SHA384Pad(0); }
 // CHECK: call void @SHA384Pad(i8* noundef null)
 
 
 // PR14046: Parse #pragma weak in function-local context
 extern int PR14046e(void);
-void PR14046f() {
+void PR14046f(void) {
 #pragma weak PR14046e
   PR14046e();
 }

diff  --git a/clang/test/CodeGen/predefined-expr.c b/clang/test/CodeGen/predefined-expr.c
index 3ccdeb3b4ce3f..52bd319090726 100644
--- a/clang/test/CodeGen/predefined-expr.c
+++ b/clang/test/CodeGen/predefined-expr.c
@@ -2,37 +2,37 @@
 // RUN: %clang_cc1 -fms-extensions %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
 
 // CHECK: @__func__.plainFunction = private unnamed_addr constant [14 x i8] c"plainFunction\00"
-// CHECK: @__PRETTY_FUNCTION__.plainFunction = private unnamed_addr constant [21 x i8] c"void plainFunction()\00"
+// CHECK: @__PRETTY_FUNCTION__.plainFunction = private unnamed_addr constant [25 x i8] c"void plainFunction(void)\00"
 // CHECK: @__func__.externFunction = private unnamed_addr constant [15 x i8] c"externFunction\00"
-// CHECK: @__PRETTY_FUNCTION__.externFunction = private unnamed_addr constant [22 x i8] c"void externFunction()\00"
+// CHECK: @__PRETTY_FUNCTION__.externFunction = private unnamed_addr constant [26 x i8] c"void externFunction(void)\00"
 // CHECK: @__func__.privateExternFunction = private unnamed_addr constant [22 x i8] c"privateExternFunction\00"
-// CHECK: @__PRETTY_FUNCTION__.privateExternFunction = private unnamed_addr constant [29 x i8] c"void privateExternFunction()\00"
+// CHECK: @__PRETTY_FUNCTION__.privateExternFunction = private unnamed_addr constant [33 x i8] c"void privateExternFunction(void)\00"
 // CHECK: @__func__.__captured_stmt = private unnamed_addr constant [25 x i8] c"functionWithCapturedStmt\00"
-// CHECK: @__PRETTY_FUNCTION__.__captured_stmt = private unnamed_addr constant [32 x i8] c"void functionWithCapturedStmt()\00"
+// CHECK: @__PRETTY_FUNCTION__.__captured_stmt = private unnamed_addr constant [36 x i8] c"void functionWithCapturedStmt(void)\00"
 // CHECK: @__func__.staticFunction = private unnamed_addr constant [15 x i8] c"staticFunction\00"
-// CHECK: @__PRETTY_FUNCTION__.staticFunction = private unnamed_addr constant [22 x i8] c"void staticFunction()\00"
+// CHECK: @__PRETTY_FUNCTION__.staticFunction = private unnamed_addr constant [26 x i8] c"void staticFunction(void)\00"
 
 int printf(const char *, ...);
 
-void plainFunction() {
+void plainFunction(void) {
   printf("__func__ %s\n", __func__);
   printf("__FUNCTION__ %s\n", __FUNCTION__);
   printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);
 }
 
-extern void externFunction() {
+extern void externFunction(void) {
   printf("__func__ %s\n", __func__);
   printf("__FUNCTION__ %s\n", __FUNCTION__);
   printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);
 }
 
-__private_extern__ void privateExternFunction() {
+__private_extern__ void privateExternFunction(void) {
   printf("__func__ %s\n", __func__);
   printf("__FUNCTION__ %s\n", __FUNCTION__);
   printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);
 }
 
-void functionWithCapturedStmt() {
+void functionWithCapturedStmt(void) {
   #pragma clang __debug captured
   {
     printf("__func__ %s\n", __func__);
@@ -41,13 +41,13 @@ void functionWithCapturedStmt() {
   }
 }
 
-static void staticFunction() {
+static void staticFunction(void) {
   printf("__func__ %s\n", __func__);
   printf("__FUNCTION__ %s\n", __FUNCTION__);
   printf("__PRETTY_FUNCTION__ %s\n\n", __PRETTY_FUNCTION__);
 }
 
-int main() {
+int main(void) {
   plainFunction();
   externFunction();
   privateExternFunction();

diff  --git a/clang/test/CodeGen/preserve-call-conv.c b/clang/test/CodeGen/preserve-call-conv.c
index 7a84fa2823140..e700c5cf12f53 100644
--- a/clang/test/CodeGen/preserve-call-conv.c
+++ b/clang/test/CodeGen/preserve-call-conv.c
@@ -8,14 +8,14 @@
 // Check that the preserve_most calling convention attribute at the source level
 // is lowered to the corresponding calling convention attrribute at the LLVM IR
 // level.
-void foo() __attribute__((preserve_most)) {
+void foo(void) __attribute__((preserve_most)) {
   // CHECK-LABEL: define {{(dso_local )?}}preserve_mostcc void @foo()
 }
 
 // Check that the preserve_most calling convention attribute at the source level
 // is lowered to the corresponding calling convention attrribute at the LLVM IR
 // level.
-void boo() __attribute__((preserve_all)) {
+void boo(void) __attribute__((preserve_all)) {
   // CHECK-LABEL: define {{(dso_local )?}}preserve_allcc void @boo()
 }
 

diff  --git a/clang/test/CodeGen/private-extern-redef.c b/clang/test/CodeGen/private-extern-redef.c
index 436fecc4d3458..78bab85415759 100644
--- a/clang/test/CodeGen/private-extern-redef.c
+++ b/clang/test/CodeGen/private-extern-redef.c
@@ -24,7 +24,7 @@ extern int P;
 
 void bar(int);
 
-void foo() {
+void foo(void) {
   bar(I);
 }
 

diff  --git a/clang/test/CodeGen/profile-filter.c b/clang/test/CodeGen/profile-filter.c
index 5d71657f8f2d7..e6d1fc18bb8f4 100644
--- a/clang/test/CodeGen/profile-filter.c
+++ b/clang/test/CodeGen/profile-filter.c
@@ -36,7 +36,7 @@ unsigned i;
 // SECTION: @test1
 // EXCLUDE: noprofile
 // EXCLUDE: @test1
-unsigned test1() {
+unsigned test1(void) {
   // CHECK: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test1, i32 0, i32 0)
   // FUNC: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test1, i32 0, i32 0)
   // FILE: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test1, i32 0, i32 0)
@@ -55,7 +55,7 @@ unsigned test1() {
 // SECTION: @test2
 // EXCLUDE-NOT: noprofile
 // EXCLUDE: @test2
-unsigned test2() {
+unsigned test2(void) {
   // CHECK: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test2, i32 0, i32 0)
   // FUNC-NOT: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test2, i32 0, i32 0)
   // FILE: %pgocount = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_test2, i32 0, i32 0)

diff  --git a/clang/test/CodeGen/profile-sample-accurate.c b/clang/test/CodeGen/profile-sample-accurate.c
index 556cad753c3c8..3e4a152e52740 100644
--- a/clang/test/CodeGen/profile-sample-accurate.c
+++ b/clang/test/CodeGen/profile-sample-accurate.c
@@ -3,5 +3,5 @@
 
 // CHECK: define{{.*}} void @foo()
 // CHECK: attributes{{.*}} "profile-sample-accurate"
-void foo() {
+void foo(void) {
 }

diff  --git a/clang/test/CodeGen/ps4-dllimport-dllexport.c b/clang/test/CodeGen/ps4-dllimport-dllexport.c
index 2c3a0be998ba6..a945000e7e323 100644
--- a/clang/test/CodeGen/ps4-dllimport-dllexport.c
+++ b/clang/test/CodeGen/ps4-dllimport-dllexport.c
@@ -9,14 +9,14 @@ __declspec(dllexport) int export_int;
 
 __declspec(dllimport) int import_int;
 
-__declspec(dllexport) void export_declared_function();
+__declspec(dllexport) void export_declared_function(void);
 
-__declspec(dllexport) void export_implemented_function() {
+__declspec(dllexport) void export_implemented_function(void) {
 }
 
 __declspec(dllimport) void import_function(int);
 
-void call_imported_function() {
+void call_imported_function(void) {
   export_declared_function();
   return import_function(import_int);
 }

diff  --git a/clang/test/CodeGen/pseudo-probe-emit.c b/clang/test/CodeGen/pseudo-probe-emit.c
index b4e6a014d474b..df2c8c78fdd4d 100644
--- a/clang/test/CodeGen/pseudo-probe-emit.c
+++ b/clang/test/CodeGen/pseudo-probe-emit.c
@@ -3,8 +3,8 @@
 
 // Check the generation of pseudoprobe intrinsic call
 
-void bar();
-void go();
+void bar(void);
+void go(void);
 
 void foo(int x) {
   // CHECK: call void @llvm.pseudoprobe(i64 [[#GUID:]], i64 1, i32 0, i64 -1)

diff  --git a/clang/test/CodeGen/redefine_extname.c b/clang/test/CodeGen/redefine_extname.c
index 022baa24200ec..778f49bb53037 100644
--- a/clang/test/CodeGen/redefine_extname.c
+++ b/clang/test/CodeGen/redefine_extname.c
@@ -8,7 +8,7 @@ extern int fake(void);
 int name;
 
 // __PRAGMA_REDEFINE_EXTNAME should be defined.  This will fail if it isn't...
-int fish() { return fake() + __PRAGMA_REDEFINE_EXTNAME + name; }
+int fish(void) { return fake() + __PRAGMA_REDEFINE_EXTNAME + name; }
 // Check that the call to fake() is emitted as a call to real()
 // CHECK:   call i32 @real()
 // Check that this also works with variables names
@@ -17,17 +17,17 @@ int fish() { return fake() + __PRAGMA_REDEFINE_EXTNAME + name; }
 // This is a case when redefenition is deferred *and* we have a local of the
 // same name. PR23923.
 #pragma redefine_extname foo bar
-int f() {
+int f(void) {
   int foo = 0;
   return foo;
 }
-extern int foo() { return 1; }
+extern int foo(void) { return 1; }
 // CHECK: define{{.*}} i32 @bar()
 
 // Check that pragma redefine_extname applies to external declarations only.
 #pragma redefine_extname foo_static bar_static
-static int foo_static() { return 1; }
-int baz() { return foo_static(); }
+static int foo_static(void) { return 1; }
+int baz(void) { return foo_static(); }
 // CHECK-NOT: call i32 @bar_static()
 
 // Check that pragma redefine_extname applies to builtin functions.

diff  --git a/clang/test/CodeGen/regparm-flag.c b/clang/test/CodeGen/regparm-flag.c
index 166864ee989e3..c35b53cd4e199 100644
--- a/clang/test/CodeGen/regparm-flag.c
+++ b/clang/test/CodeGen/regparm-flag.c
@@ -5,7 +5,7 @@ void f1(int a, int b, int c, int d,
 
 void f2(int a, int b) __attribute((regparm(0)));
 
-void f0() {
+void f0(void) {
 // CHECK: call void @f1(i32 inreg noundef 1, i32 inreg noundef 2, i32 inreg noundef 3, i32 inreg noundef 4,
 // CHECK: i32 noundef 5, i32 noundef 6, i32 noundef 7, i32 noundef 8)
   f1(1, 2, 3, 4, 5, 6, 7, 8);

diff  --git a/clang/test/CodeGen/regparm-struct.c b/clang/test/CodeGen/regparm-struct.c
index b0cb036413525..d67c0c719005e 100644
--- a/clang/test/CodeGen/regparm-struct.c
+++ b/clang/test/CodeGen/regparm-struct.c
@@ -2,7 +2,7 @@
 
 __attribute__((regparm(3))) void f1(int a, int b, int c, int d);
 // CHECK: declare void @f1(i32 inreg noundef, i32 inreg noundef, i32 inreg noundef, i32 noundef)
-void g1() {
+void g1(void) {
   f1(41, 42, 43, 44);
 }
 
@@ -11,7 +11,7 @@ struct s1 {
 };
 __attribute__((regparm(3))) void f2(int a, int b, struct s1 c, int d);
 // CHECK: declare void @f2(i32 inreg noundef, i32 inreg noundef, i32 inreg, i32 noundef)
-void g2() {
+void g2(void) {
   struct s1 x = {43};
   f2(41, 42, x, 44);
 }
@@ -22,13 +22,13 @@ struct s2 {
 };
 __attribute__((regparm(3))) void f3(int a, int b, struct s2 c, int d);
 // CHECK: declare void @f3(i32 inreg noundef, i32 inreg noundef, i32, i32, i32 noundef)
-void g3() {
+void g3(void) {
   struct s2 x = {43, 44};
   f3(41, 42, x, 45);
 }
 __attribute__((regparm(3))) void f4(int a, struct s2 b, int c);
 // CHECK: declare void @f4(i32 inreg noundef, i32 inreg, i32 inreg, i32 noundef)
-void g4() {
+void g4(void) {
   struct s2 x = {42, 43};
   f4(41, x, 44);
 }
@@ -40,13 +40,13 @@ struct s3 {
 };
 __attribute__((regparm(3))) void f5(int a, struct s3 b, int c);
 // CHECK: declare void @f5(i32 inreg noundef, i32, i32, i32, i32 noundef)
-void g5() {
+void g5(void) {
   struct s3 x = {42, 43, 44};
   f5(41, x, 45);
 }
 __attribute__((regparm(3))) void f6(struct s3 a, int b);
 // CHECK: declare void @f6(i32 inreg, i32 inreg, i32 inreg, i32 noundef)
-void g6() {
+void g6(void) {
   struct s3 x = {41, 42, 43};
   f6(x, 44);
 }
@@ -59,7 +59,7 @@ struct s4 {
 };
 __attribute__((regparm(3))) void f7(struct s4 a, int b);
 // CHECK: declare void @f7(i32, i32, i32, i32, i32 noundef)
-void g7() {
+void g7(void) {
   struct s4 x = {41, 42, 43, 44};
   f7(x, 45);
 }

diff  --git a/clang/test/CodeGen/renderscript.c b/clang/test/CodeGen/renderscript.c
index d735155394f81..88c82c48f8534 100644
--- a/clang/test/CodeGen/renderscript.c
+++ b/clang/test/CodeGen/renderscript.c
@@ -51,11 +51,11 @@ void argShortChar(sShortChar s) {}
 
 // CHECK-RS32: [3 x i8] @retChar3()
 // CHECK-RS64: [3 x i8] @retChar3()
-sChar3 retChar3() { sChar3 r; return r; }
+sChar3 retChar3(void) { sChar3 r; return r; }
 
 // CHECK-RS32: [2 x i16] @retShortChar()
 // CHECK-RS64: [2 x i16] @retShortChar()
-sShortChar retShortChar() { sShortChar r; return r; }
+sShortChar retShortChar(void) { sShortChar r; return r; }
 
 // =============================================================================
 // aggregate parameter <= 16 bytes: coerced to [a x iNN] for both 32-bit and
@@ -85,15 +85,15 @@ void argLongInt(sLongInt s) {}
 
 // CHECK-RS32: void @retShortCharShort(%struct.sShortCharShort* noalias sret(%struct.sShortCharShort) align 2 %agg.result)
 // CHECK-RS64: [3 x i16] @retShortCharShort()
-sShortCharShort retShortCharShort() { sShortCharShort r; return r; }
+sShortCharShort retShortCharShort(void) { sShortCharShort r; return r; }
 
 // CHECK-RS32: void @retIntShortChar(%struct.sIntShortChar* noalias sret(%struct.sIntShortChar) align 4 %agg.result)
 // CHECK-RS64: [2 x i32] @retIntShortChar()
-sIntShortChar retIntShortChar() { sIntShortChar r; return r; }
+sIntShortChar retIntShortChar(void) { sIntShortChar r; return r; }
 
 // CHECK-RS32: void @retLongInt(%struct.sLongInt* noalias sret(%struct.sLongInt) align 8 %agg.result)
 // CHECK-RS64: [2 x i64] @retLongInt()
-sLongInt retLongInt() { sLongInt r; return r; }
+sLongInt retLongInt(void) { sLongInt r; return r; }
 
 // =============================================================================
 // aggregate parameter <= 64 bytes: coerced to [a x iNN] for 32-bit RenderScript
@@ -118,11 +118,11 @@ void argLong2Char(sLong2Char s) {}
 
 // CHECK-RS32: void @retInt5(%struct.sInt5* noalias sret(%struct.sInt5) align 4 %agg.result)
 // CHECK-RS64: void @retInt5(%struct.sInt5* noalias sret(%struct.sInt5) align 4 %agg.result)
-sInt5 retInt5() { sInt5 r; return r;}
+sInt5 retInt5(void) { sInt5 r; return r;}
 
 // CHECK-RS32: void @retLong2Char(%struct.sLong2Char* noalias sret(%struct.sLong2Char) align 8 %agg.result)
 // CHECK-RS64: void @retLong2Char(%struct.sLong2Char* noalias sret(%struct.sLong2Char) align 8 %agg.result)
-sLong2Char retLong2Char() { sLong2Char r; return r;}
+sLong2Char retLong2Char(void) { sLong2Char r; return r;}
 
 // =============================================================================
 // aggregate parameters and return values > 64 bytes: passed and returned on the
@@ -137,4 +137,4 @@ void argLong9(sLong9 s) {}
 
 // CHECK-RS32: void @retLong9(%struct.sLong9* noalias sret(%struct.sLong9) align 8 %agg.result)
 // CHECK-RS64: void @retLong9(%struct.sLong9* noalias sret(%struct.sLong9) align 8 %agg.result)
-sLong9 retLong9() { sLong9 r; return r; }
+sLong9 retLong9(void) { sLong9 r; return r; }

diff  --git a/clang/test/CodeGen/rounding-math.c b/clang/test/CodeGen/rounding-math.c
index 13ec2fdcaa2e6..6673dfba8a953 100644
--- a/clang/test/CodeGen/rounding-math.c
+++ b/clang/test/CodeGen/rounding-math.c
@@ -10,13 +10,13 @@ struct S {
 };
 
 static struct S var_01 = {0x1.000001p0};
-struct S *func_01() {
+struct S *func_01(void) {
   return &var_01;
 }
 
 struct S var_02 = {0x1.000001p0};
 
-struct S *func_03() {
+struct S *func_03(void) {
   static struct S var_03 = {0x1.000001p0};
   return &var_03;
 }
@@ -28,13 +28,13 @@ struct S *func_03() {
 #pragma STDC FENV_ROUND FE_UPWARD
 
 static struct S var_04 = {0x1.000001p0};
-struct S *func_04() {
+struct S *func_04(void) {
   return &var_04;
 }
 
 struct S var_05 = {0x1.000001p0};
 
-struct S *func_06() {
+struct S *func_06(void) {
   static struct S var_06 = {0x1.000001p0};
   return &var_06;
 }

diff  --git a/clang/test/CodeGen/sanitize-atomic-int-overflow.c b/clang/test/CodeGen/sanitize-atomic-int-overflow.c
index 3b9c62c43d4a0..da8152ad7aad1 100644
--- a/clang/test/CodeGen/sanitize-atomic-int-overflow.c
+++ b/clang/test/CodeGen/sanitize-atomic-int-overflow.c
@@ -3,7 +3,7 @@
 _Atomic(unsigned) atomic;
 
 // CHECK-LABEL: define{{.*}} void @cmpd_assign
-void cmpd_assign() {
+void cmpd_assign(void) {
   // CHECK: br label %[[LOOP_START:.*]]
 
   // CHECK: [[LOOP_START]]:
@@ -18,7 +18,7 @@ void cmpd_assign() {
 }
 
 // CHECK-LABEL: define{{.*}} void @inc
-void inc() {
+void inc(void) {
   // CHECK: br label %[[LOOP_START:.*]]
 
   // CHECK: [[LOOP_START]]:

diff  --git a/clang/test/CodeGen/sanitize-recover.c b/clang/test/CodeGen/sanitize-recover.c
index 6358d9d04aa17..945faf0e524d6 100644
--- a/clang/test/CodeGen/sanitize-recover.c
+++ b/clang/test/CodeGen/sanitize-recover.c
@@ -4,7 +4,7 @@
 
 // RECOVER: @test
 // ABORT: @test
-void test() {
+void test(void) {
   extern volatile unsigned x, y, z;
 
   // RECOVER: uadd.with.overflow.i32{{.*}}, !nosanitize
@@ -16,7 +16,7 @@ void test() {
   x = y + z;
 }
 
-void foo() {
+void foo(void) {
   union { int i; } u;
   u.i=1;
   // PARTIAL:      %[[SIZE:.*]] = call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 false)

diff  --git a/clang/test/CodeGen/sanitizer-module-constructor.c b/clang/test/CodeGen/sanitizer-module-constructor.c
index 108cdcb892a68..c47fa494a516f 100644
--- a/clang/test/CodeGen/sanitizer-module-constructor.c
+++ b/clang/test/CodeGen/sanitizer-module-constructor.c
@@ -14,7 +14,7 @@ static void f(b g) {
   for (d = g->c;;)
     ;
 }
-void h() { f(e); }
+void h(void) { f(e); }
 
 // CHECK: Running pass: {{.*}}SanitizerPass
 // CHECK-NOT: Running pass: LoopSimplifyPass on {{.*}}san.module_ctor

diff  --git a/clang/test/CodeGen/sanitizer-special-case-list.c b/clang/test/CodeGen/sanitizer-special-case-list.c
index 493a8e9931da7..55a69ebcfa414 100644
--- a/clang/test/CodeGen/sanitizer-special-case-list.c
+++ b/clang/test/CodeGen/sanitizer-special-case-list.c
@@ -11,7 +11,7 @@ unsigned i;
 
 // SANITIZED: @overflow
 // UNSANITIZED: @overflow
-unsigned overflow() {
+unsigned overflow(void) {
   // SANITIZED: call {{.*}}void @__ubsan
   // UNSANITIZED-NOT: call {{.*}}void @__ubsan
   return i * 37;
@@ -19,7 +19,7 @@ unsigned overflow() {
 
 // SANITIZED: @cfi
 // UNSANITIZED: @cfi
-void cfi(void (*fp)()) {
+void cfi(void (*fp)(void)) {
   // SANITIZED: llvm.type.test
   // UNSANITIZED-NOT: llvm.type.test
   fp();

diff  --git a/clang/test/CodeGen/semantic-interposition.c b/clang/test/CodeGen/semantic-interposition.c
index 3581312b8e27b..9522321d932c2 100644
--- a/clang/test/CodeGen/semantic-interposition.c
+++ b/clang/test/CodeGen/semantic-interposition.c
@@ -31,8 +31,8 @@ int ifunc(void) __attribute__((ifunc("ifunc_resolver")));
 int func(void) { return 0; }
 int ext(void);
 
-static void *ifunc_resolver() { return func; }
+static void *ifunc_resolver(void) { return func; }
 
-int foo() {
+int foo(void) {
   return var + ext_var + ifunc() + func() + ext();
 }

diff  --git a/clang/test/CodeGen/set-visibility-for-decls.c b/clang/test/CodeGen/set-visibility-for-decls.c
index 04232f8715162..267277282e79f 100644
--- a/clang/test/CodeGen/set-visibility-for-decls.c
+++ b/clang/test/CodeGen/set-visibility-for-decls.c
@@ -36,7 +36,7 @@ __attribute__((visibility("default"))) int func_default(void);
 // CHECK-DEFAULT: declare i32 @func()
 int func(void);
 
-int use() {
+int use(void) {
   return var_hidden + var_protected + var_default + var +
          func_hidden() + func_protected() + func_default() + func();
 }

diff  --git a/clang/test/CodeGen/setjmp.c b/clang/test/CodeGen/setjmp.c
index 4ca360d8584cd..77dde35e69cae 100644
--- a/clang/test/CodeGen/setjmp.c
+++ b/clang/test/CodeGen/setjmp.c
@@ -18,7 +18,7 @@ typedef struct __jmp_buf_tag sigjmp_buf[1];
 }
 #endif
 
-void f() {
+void f(void) {
   jmp_buf jb;
   // CHECK: call {{.*}}@setjmp(
   setjmp(jb);

diff  --git a/clang/test/CodeGen/shared-string-literals.c b/clang/test/CodeGen/shared-string-literals.c
index 00636b0f55aa2..0b589a772454d 100644
--- a/clang/test/CodeGen/shared-string-literals.c
+++ b/clang/test/CodeGen/shared-string-literals.c
@@ -4,6 +4,6 @@ char *globalString = "abc";
 char *globalStringArray[5] = { "123", "abc" };
 char *anotherGlobalString = "123";
 
-int main() {
+int main(void) {
     printf("123");
 }

diff  --git a/clang/test/CodeGen/sparc-arguments.c b/clang/test/CodeGen/sparc-arguments.c
index 319da92e8414a..2e014b4469a02 100644
--- a/clang/test/CodeGen/sparc-arguments.c
+++ b/clang/test/CodeGen/sparc-arguments.c
@@ -22,6 +22,6 @@ struct s1 x1;
 // CHECK: declare void @f1_helper(%struct.s1* noundef byval(%struct.s1) align 8)
 
 void f1_helper(struct s1);
-void f1() {
+void f1(void) {
   f1_helper(x1);
 }

diff  --git a/clang/test/CodeGen/sparcv9-abi.c b/clang/test/CodeGen/sparcv9-abi.c
index bc62ad1c2937c..92ac6de9e6828 100644
--- a/clang/test/CodeGen/sparcv9-abi.c
+++ b/clang/test/CodeGen/sparcv9-abi.c
@@ -115,7 +115,7 @@ struct tiny f_tiny(struct tiny x) {
 // CHECK: %[[XV:[^ ]+]] = zext i8 %{{[^ ]+}} to i64
 // CHECK: %[[HB:[^ ]+]] = shl i64 %[[XV]], 56
 // CHECK: = call i64 @f_tiny(i64 %[[HB]])
-void call_tiny() {
+void call_tiny(void) {
   struct tiny x = { 1 };
   f_tiny(x);
 }

diff  --git a/clang/test/CodeGen/sparcv9-dwarf.c b/clang/test/CodeGen/sparcv9-dwarf.c
index a4b4a605bfe0d..eb9fa28694ce8 100644
--- a/clang/test/CodeGen/sparcv9-dwarf.c
+++ b/clang/test/CodeGen/sparcv9-dwarf.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 static unsigned char dwarf_reg_size_table[102+1];
 
-int test() {
+int test(void) {
   __builtin_init_dwarf_reg_size_table(dwarf_reg_size_table);
 
   return __builtin_dwarf_sp_column();

diff  --git a/clang/test/CodeGen/split-debug-output.c b/clang/test/CodeGen/split-debug-output.c
index 19569f8d574bf..94cc141c8c19b 100644
--- a/clang/test/CodeGen/split-debug-output.c
+++ b/clang/test/CodeGen/split-debug-output.c
@@ -5,7 +5,7 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -dwarf-version=5 -split-dwarf-file foo.dwo -split-dwarf-output %t -emit-obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck --check-prefix=DWARFv5 %s
 // RUN: llvm-dwarfdump -debug-info %t | FileCheck --check-prefix=DWARFv5 %s
 
-int f() { return 0; }
+int f(void) { return 0; }
 
 // DWARFv4: DW_AT_GNU_dwo_name ("foo.dwo")
 // DWARFv5: DW_AT_dwo_name ("foo.dwo")

diff  --git a/clang/test/CodeGen/split-lto-unit.c b/clang/test/CodeGen/split-lto-unit.c
index 8e83ebaa6fb82..941aebafd01b3 100644
--- a/clang/test/CodeGen/split-lto-unit.c
+++ b/clang/test/CodeGen/split-lto-unit.c
@@ -9,4 +9,4 @@
 // ; Check that regular LTO has EnableSplitLTOUnit = 1
 // RUN: %clang_cc1 -flto -triple x86_64-pc-linux-gnu -emit-llvm-bc < %s | llvm-dis -o - | FileCheck %s --implicit-check-not="EnableSplitLTOUnit" --check-prefix=SPLIT
 
-int main() {}
+int main(void) {}

diff  --git a/clang/test/CodeGen/split-stacks.c b/clang/test/CodeGen/split-stacks.c
index d9ff1f955d2ef..80fecbe8426da 100644
--- a/clang/test/CodeGen/split-stacks.c
+++ b/clang/test/CodeGen/split-stacks.c
@@ -1,16 +1,16 @@
 // RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
 // RUN: %clang -target x86_64-linux-gnu -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
 
-int foo() {
+int foo(void) {
   return 0;
 }
 
 __attribute__((no_split_stack))
-int nosplit() {
+int nosplit(void) {
   return 0;
 }
 
-int main() {
+int main(void) {
   return foo();
 }
 

diff  --git a/clang/test/CodeGen/stack-arg-probe.c b/clang/test/CodeGen/stack-arg-probe.c
index 2ffe1f2862e3b..255ae482b6808 100644
--- a/clang/test/CodeGen/stack-arg-probe.c
+++ b/clang/test/CodeGen/stack-arg-probe.c
@@ -11,5 +11,5 @@
 // NO-STACKPROBE: attributes #{{[0-9]+}} = {{{.*}} "no-stack-arg-probe"
 // STACKPROBE-NOT: "no-stack-arg-probe"
 
-void test1() {
+void test1(void) {
 }

diff  --git a/clang/test/CodeGen/stack-clash-protection.c b/clang/test/CodeGen/stack-clash-protection.c
index a46eca344c8a9..67571f5cdb2c1 100644
--- a/clang/test/CodeGen/stack-clash-protection.c
+++ b/clang/test/CodeGen/stack-clash-protection.c
@@ -5,7 +5,7 @@
 // RUN: %clang_cc1 -triple powerpc64-linux-gnu -O0 -S -emit-llvm -o- %s -fstack-clash-protection | FileCheck %s
 
 // CHECK: define{{.*}} void @large_stack() #[[A:.*]] {
-void large_stack() {
+void large_stack(void) {
   volatile int stack[20000], i;
   for (i = 0; i < sizeof(stack) / sizeof(int); ++i)
     stack[i] = i;

diff  --git a/clang/test/CodeGen/stack-size-section.c b/clang/test/CodeGen/stack-size-section.c
index 504a42de13418..7180567943319 100644
--- a/clang/test/CodeGen/stack-size-section.c
+++ b/clang/test/CodeGen/stack-size-section.c
@@ -6,4 +6,4 @@
 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT
 // CHECK-PRESENT: section .stack_sizes
 
-int foo() { return 42; }
+int foo(void) { return 42; }

diff  --git a/clang/test/CodeGen/stackrealign.c b/clang/test/CodeGen/stackrealign.c
index 39b09397beb31..64736e0b4df54 100644
--- a/clang/test/CodeGen/stackrealign.c
+++ b/clang/test/CodeGen/stackrealign.c
@@ -4,5 +4,5 @@
 // REALIGN: attributes #{{[0-9]+}} = {{{.*}} "stackrealign"
 // NO-REALIGN-NOT: attributes #{{[0-9]+}} = {{{.*}} "stackrealign"
 
-void test1() {
+void test1(void) {
 }

diff  --git a/clang/test/CodeGen/static-local-union.c b/clang/test/CodeGen/static-local-union.c
index bd32519e43e9e..289eae0184f1a 100644
--- a/clang/test/CodeGen/static-local-union.c
+++ b/clang/test/CodeGen/static-local-union.c
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -emit-llvm < %s
 
-int a() {static union{int a;} r[2] = {1,2};return r[1].a;}
+int a(void) {static union{int a;} r[2] = {1,2};return r[1].a;}
 

diff  --git a/clang/test/CodeGen/static-order.c b/clang/test/CodeGen/static-order.c
index 20277d7b65838..c2a07578c1384 100644
--- a/clang/test/CodeGen/static-order.c
+++ b/clang/test/CodeGen/static-order.c
@@ -15,7 +15,7 @@ static struct s a = {
     10
 };
 
-void *f()
+void *f(void)
 {
   if (a.a)
     return v;

diff  --git a/clang/test/CodeGen/staticinit.c b/clang/test/CodeGen/staticinit.c
index 8c5cdd05642d2..04b7f85268a41 100644
--- a/clang/test/CodeGen/staticinit.c
+++ b/clang/test/CodeGen/staticinit.c
@@ -7,7 +7,7 @@ struct AStruct {
   double d;
 };
 
-void f() {
+void f(void) {
   static int i = 42;
   static int is[] = { 1, 2, 3, 4 };
   static char* str = "forty-two";
@@ -15,7 +15,7 @@ void f() {
   static struct AStruct myStruct = { 1, "two", 3.0 };
 }
 
-void g() {
+void g(void) {
   static char a[10];
   static char *b = a;
 }

diff  --git a/clang/test/CodeGen/string-literal-short-wstring.c b/clang/test/CodeGen/string-literal-short-wstring.c
index 899a820218467..c9e7a2afee092 100644
--- a/clang/test/CodeGen/string-literal-short-wstring.c
+++ b/clang/test/CodeGen/string-literal-short-wstring.c
@@ -9,7 +9,7 @@
 
 typedef __WCHAR_TYPE__ wchar_t;
 
-int main() {
+int main(void) {
   // This should convert to utf8.
   // CHECK: private unnamed_addr constant [10 x i8] c"\E1\84\A0\C8\A0\F4\82\80\B0\00", align 1
   char b[10] = "\u1120\u0220\U00102030";

diff  --git a/clang/test/CodeGen/string-literal-unicode-conversion.c b/clang/test/CodeGen/string-literal-unicode-conversion.c
index 71286b1fed23b..4f1c0243249dc 100644
--- a/clang/test/CodeGen/string-literal-unicode-conversion.c
+++ b/clang/test/CodeGen/string-literal-unicode-conversion.c
@@ -16,7 +16,7 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-void f() {
+void f(void) {
   // CHECK-C: private unnamed_addr constant [6 x i8] c"\C0\E9\EE\F5\FC\00", align 1
   // CHECK-CPP0X: private unnamed_addr constant [6 x i8] c"\C0\E9\EE\F5\FC\00", align 1
   char const *aa = "Àéîõü";

diff  --git a/clang/test/CodeGen/string-literal.c b/clang/test/CodeGen/string-literal.c
index 6634872821045..b4823f925ff82 100644
--- a/clang/test/CodeGen/string-literal.c
+++ b/clang/test/CodeGen/string-literal.c
@@ -11,7 +11,7 @@ typedef __CHAR16_TYPE__ char16_t;
 typedef __CHAR32_TYPE__ char32_t;
 #endif
 
-int main() {
+int main(void) {
   // CHECK-C: private unnamed_addr constant [10 x i8] c"abc\00\00\00\00\00\00\00", align 1
   // CHECK-C11: private unnamed_addr constant [10 x i8] c"abc\00\00\00\00\00\00\00", align 1
   // CHECK-CXX11: private unnamed_addr constant [10 x i8] c"abc\00\00\00\00\00\00\00", align 1

diff  --git a/clang/test/CodeGen/struct-init.c b/clang/test/CodeGen/struct-init.c
index cc88769801efb..bb09e01d66b2f 100644
--- a/clang/test/CodeGen/struct-init.c
+++ b/clang/test/CodeGen/struct-init.c
@@ -25,7 +25,7 @@ typedef __attribute__(( __vector_size__(8) )) unsigned int __neon_uint32x2_t;
 // rdar://8183908
 typedef unsigned int uint32_t;
 typedef __attribute__((neon_vector_type(2)))  uint32_t uint32x2_t;
-void foo() {
+void foo(void) {
     const uint32x2_t signBit = { (uint2) 0x80000000 };
 }
 

diff  --git a/clang/test/CodeGen/struct-union-BE.c b/clang/test/CodeGen/struct-union-BE.c
index 69ab1e8dcc4d5..2d8186568d833 100644
--- a/clang/test/CodeGen/struct-union-BE.c
+++ b/clang/test/CodeGen/struct-union-BE.c
@@ -4,7 +4,7 @@
 
 #include <stdarg.h>
 
-extern void abort() __attribute__((noreturn));
+extern void abort(void) __attribute__((noreturn));
 
 struct tiny {
   char c;
@@ -40,7 +40,7 @@ void funi(int n, ...) {
 // ARM-NOT: %{{[0-9]+}} = getelementptr inbounds i8, i8* %argp.cur, i32 3
 }
 
-void foo() {
+void foo(void) {
   struct tiny x[3];
   union data y;
   x[0].c = 10;

diff  --git a/clang/test/CodeGen/struct.c b/clang/test/CodeGen/struct.c
index e1739314d7fcc..c98357160addf 100644
--- a/clang/test/CodeGen/struct.c
+++ b/clang/test/CodeGen/struct.c
@@ -5,7 +5,7 @@ struct  {
   int y;
 } point;
 
-void fn1() {
+void fn1(void) {
   point.x = 42;
 }
 
@@ -17,7 +17,7 @@ struct  {
   } p1;
 } point2;
 
-void fn2() {
+void fn2(void) {
   point2.p1.a = 42;
 }
 
@@ -43,7 +43,7 @@ typedef struct NA {
   int data;
   struct NA *next;
 } NA;
-void f1() {  NA a; }
+void f1(void) {  NA a; }
 
 typedef struct NB {
   int d1;
@@ -53,14 +53,14 @@ typedef struct NB {
   } B2;
 } NB;
 
-void f2() { NB b; }
+void f2(void) { NB b; }
 
-extern NB *f3();
-void f4() {
+extern NB *f3(void);
+void f4(void) {
   f3()->d1 = 42;
 }
 
-void f5() {
+void f5(void) {
   (f3())->d1 = 42;
 }
 
@@ -69,8 +69,8 @@ typedef struct {
   int location;
   int length;
 } range;
-extern range f6();
-void f7() {
+extern range f6(void);
+void f7(void) {
   range r = f6();
 }
 
@@ -80,7 +80,7 @@ typedef struct {
   range range2;
 } rangepair;
 
-void f8() {
+void f8(void) {
   rangepair p;
 
   range r = p.range1;
@@ -112,7 +112,7 @@ typedef struct _a {
   int a;
 } a;
 
-void f11() {
+void f11(void) {
   struct _a a1;
   a a2;
     
@@ -121,7 +121,7 @@ void f11() {
 }
 
 /* Implicit casts (due to const) */
-void f12() {
+void f12(void) {
   struct _a a1;
   const struct _a a2;
 
@@ -139,7 +139,7 @@ struct a15 {char a; int b[];} c15;
 int a16(void) {c15.a = 1;}
 
 /* compound literals */
-void f13() {
+void f13(void) {
   a13 x; x = (a13){1,2};
 }
 
@@ -160,24 +160,24 @@ struct __attribute__((packed)) SS { long double a; char b; } SS;
 
 /* As lvalue */
 
-int f15() {
-  extern range f15_ext();
+int f15(void) {
+  extern range f15_ext(void);
   return f15_ext().location;
 }
 
-range f16() {
-  extern rangepair f16_ext();
+range f16(void) {
+  extern rangepair f16_ext(void);
   return f16_ext().range1;
 }
 
-int f17() {
-  extern range f17_ext();
+int f17(void) {
+  extern range f17_ext(void);
   range r;
   return (r = f17_ext()).location;
 }
 
-range f18() {
-  extern rangepair f18_ext();
+range f18(void) {
+  extern rangepair f18_ext(void);
   rangepair rp;
   return (rp = f18_ext()).range1;
 }

diff  --git a/clang/test/CodeGen/switch-dce.c b/clang/test/CodeGen/switch-dce.c
index 044851922970c..0f17c8b202c22 100644
--- a/clang/test/CodeGen/switch-dce.c
+++ b/clang/test/CodeGen/switch-dce.c
@@ -10,9 +10,9 @@
 // CHECK-NOT: @dead
 // CHECK: ret void
 int i;
-void dead();
+void dead(void);
 
-void test1() {
+void test1(void) {
   switch (1)
     case 1:
       ++i;
@@ -30,7 +30,7 @@ void test1() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test2() {
+void test2(void) {
   switch (4) {
   case 1:
     dead();
@@ -49,7 +49,7 @@ void test2() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test3() {
+void test3(void) {
   switch (4) {
   case 1:
     dead();
@@ -68,7 +68,7 @@ void test3() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test4() {
+void test4(void) {
   switch (4) {
     case 1:
       dead();
@@ -82,7 +82,7 @@ void test4() {
 
 // This shouldn't crash codegen, but we don't have to optimize out the switch
 // in this case.
-void test5() {
+void test5(void) {
   switch (1) {
     int x;  // eliding var decl?
     case 1:
@@ -96,7 +96,7 @@ void test5() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test6() {
+void test6(void) {
   // Neither case is reachable.
   switch (40) {
   case 1:
@@ -116,7 +116,7 @@ void test6() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test7() {
+void test7(void) {
   switch (4) {
   case 1:
       dead();
@@ -136,7 +136,7 @@ void test7() {
 // CHECK-NOT: switch
 // CHECK-NOT: @dead
 // CHECK: ret void
-void test8() {
+void test8(void) {
   switch (4) {
   case 1:
     dead();
@@ -187,7 +187,7 @@ int test10(void) {
 // CHECK: @test11
 // CHECK-NOT: switch
 // CHECK: ret void
-void test11() {
+void test11(void) {
   switch (1) {
     case 1:
       break;
@@ -201,7 +201,7 @@ void test11() {
 // CHECK: @test12
 // CHECK-NOT: switch
 // CHECK: ret void
-void test12() {
+void test12(void) {
   switch (1) {
   case 2: {
      int a;   // Ok to skip this vardecl.

diff  --git a/clang/test/CodeGen/switch.c b/clang/test/CodeGen/switch.c
index dbf27fd27458e..fbe5b67ccc5eb 100644
--- a/clang/test/CodeGen/switch.c
+++ b/clang/test/CodeGen/switch.c
@@ -66,7 +66,7 @@ static int foo4(int i) {
 // CHECK-LABEL: define{{.*}} i32 @foo4t()
 // CHECK: ret i32 376
 // CHECK: }
-int foo4t() {
+int foo4t(void) {
   // 111 + 1 + 222 + 42 = 376
   return foo4(111) + foo4(99) + foo4(222) + foo4(601);
 }
@@ -74,7 +74,7 @@ int foo4t() {
 // CHECK-LABEL: define{{.*}} void @foo5()
 // CHECK-NOT: switch
 // CHECK: }
-void foo5(){
+void foo5(void){
     switch(0){
     default:
         if (0) {
@@ -86,7 +86,7 @@ void foo5(){
 // CHECK-LABEL: define{{.*}} void @foo6()
 // CHECK-NOT: switch
 // CHECK: }
-void foo6(){
+void foo6(void){
     switch(0){
     }
 }
@@ -94,7 +94,7 @@ void foo6(){
 // CHECK-LABEL: define{{.*}} void @foo7()
 // CHECK-NOT: switch
 // CHECK: }
-void foo7(){
+void foo7(void){
     switch(0){
       foo7();
     }
@@ -126,7 +126,7 @@ static int f9_0(unsigned x) {
     return 10;
   }
 }
-int f9() {
+int f9(void) {
   return f9_0(2);
 }
 
@@ -146,7 +146,7 @@ static int f10_0(unsigned x) {
   }
 }
 
-int f10() {
+int f10(void) {
   f10_0(1);
   return 10;
 }

diff  --git a/clang/test/CodeGen/sysv_abi.c b/clang/test/CodeGen/sysv_abi.c
index eeb9ac01fa748..91e8ac917f079 100644
--- a/clang/test/CodeGen/sysv_abi.c
+++ b/clang/test/CodeGen/sysv_abi.c
@@ -13,7 +13,7 @@ struct StringRef {
 };
 extern volatile char gc;
 void SYSV_CC take_stringref(struct StringRef s);
-void callit() {
+void callit(void) {
   struct StringRef s = {"asdf", 4};
   take_stringref(s);
 }
@@ -31,7 +31,7 @@ void SYSV_CC take_m256(my_m256);
 my_m512 SYSV_CC get_m512(void);
 void SYSV_CC take_m512(my_m512);
 
-void use_vectors() {
+void use_vectors(void) {
   my_m256 v1 = get_m256();
   take_m256(v1);
   my_m512 v2 = get_m512();


        


More information about the cfe-commits mailing list