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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 3 13:42:35 PST 2022


Author: Aaron Ballman
Date: 2022-02-03T16:42:27-05:00
New Revision: e765e0bc8ed06ebb186a9905227273517f0b7240

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

Added: 
    

Modified: 
    clang/test/Sema/2010-05-31-palignr.c
    clang/test/Sema/Float16.c
    clang/test/Sema/MicrosoftExtensions.c
    clang/test/Sema/PR28181.c
    clang/test/Sema/__try.c
    clang/test/Sema/aarch64-branch-protection-attr-err.c
    clang/test/Sema/aarch64-special-register.c
    clang/test/Sema/aarch64-sve-types.c
    clang/test/Sema/aarch64-tme-errors.c
    clang/test/Sema/aarch64-tme-tcancel-errors.c
    clang/test/Sema/address-packed.c
    clang/test/Sema/address_space_print_macro.c
    clang/test/Sema/address_spaces.c
    clang/test/Sema/alias-unused.c
    clang/test/Sema/align_value.c
    clang/test/Sema/alloc-align-attr.c
    clang/test/Sema/altivec-generic-overload.c
    clang/test/Sema/altivec-init.c
    clang/test/Sema/anonymous-struct-union.c
    clang/test/Sema/arm-branch-protection-attr-err.c
    clang/test/Sema/arm-branch-protection-attr-warn.c
    clang/test/Sema/arm-branch-protection.c
    clang/test/Sema/arm-cmse-no-diag.c
    clang/test/Sema/arm-interrupt-attr.c
    clang/test/Sema/arm-no-cmse.c
    clang/test/Sema/arm-special-register.c
    clang/test/Sema/arm64-inline-asm.c
    clang/test/Sema/array-bounds-ptr-arith.c
    clang/test/Sema/array-constraint.c
    clang/test/Sema/array-size-64.c
    clang/test/Sema/array-size.c
    clang/test/Sema/artificial.c
    clang/test/Sema/asm-label.c
    clang/test/Sema/asm.c
    clang/test/Sema/assign-null.c
    clang/test/Sema/assign.c
    clang/test/Sema/ast-print-x86.c
    clang/test/Sema/atomic-expr.c
    clang/test/Sema/atomic-implicit-seq_cst.c
    clang/test/Sema/atomic-ops.c
    clang/test/Sema/atomic-requires-library-error.c
    clang/test/Sema/atomic-type.c
    clang/test/Sema/attr-args.c
    clang/test/Sema/attr-assume.c
    clang/test/Sema/attr-availability-android.c
    clang/test/Sema/attr-availability-app-extensions.c
    clang/test/Sema/attr-availability-fuchsia.c
    clang/test/Sema/attr-availability-ios.c
    clang/test/Sema/attr-availability-iosmac-infer-from-macos.c
    clang/test/Sema/attr-availability-maccatalyst.c
    clang/test/Sema/attr-availability-macosx.c
    clang/test/Sema/attr-availability-square-brackets.c
    clang/test/Sema/attr-availability-tvos.c
    clang/test/Sema/attr-availability-watchos.c
    clang/test/Sema/attr-availability.c
    clang/test/Sema/attr-cleanup.c
    clang/test/Sema/attr-coldhot.c
    clang/test/Sema/attr-decl-after-definition.c
    clang/test/Sema/attr-deprecated-c2x.c
    clang/test/Sema/attr-deprecated-message.c
    clang/test/Sema/attr-deprecated.c
    clang/test/Sema/attr-diagnose-as-builtin.c
    clang/test/Sema/attr-enforce-tcb.c
    clang/test/Sema/attr-external-source-symbol.c
    clang/test/Sema/attr-guard_nocf.c
    clang/test/Sema/attr-leaf.c
    clang/test/Sema/attr-likelihood.c
    clang/test/Sema/attr-long-call.c
    clang/test/Sema/attr-malloc.c
    clang/test/Sema/attr-micromips.c
    clang/test/Sema/attr-mig.c
    clang/test/Sema/attr-mig.m
    clang/test/Sema/attr-minsize.c
    clang/test/Sema/attr-mode-enums.c
    clang/test/Sema/attr-mode.c
    clang/test/Sema/attr-naked.c
    clang/test/Sema/attr-nocf_check.c
    clang/test/Sema/attr-nodebug.c
    clang/test/Sema/attr-noduplicate.c
    clang/test/Sema/attr-noinline.c
    clang/test/Sema/attr-notail.c
    clang/test/Sema/attr-print.c
    clang/test/Sema/attr-retain.c
    clang/test/Sema/attr-returns-twice.c
    clang/test/Sema/attr-section.c
    clang/test/Sema/attr-selectany.c
    clang/test/Sema/attr-sentinel.c
    clang/test/Sema/attr-target-clones.c
    clang/test/Sema/attr-target.c
    clang/test/Sema/attr-tls_model.c
    clang/test/Sema/attr-unavailable-message.c
    clang/test/Sema/attr-uninitialized.c
    clang/test/Sema/attr-unknown.c
    clang/test/Sema/attr-used.c
    clang/test/Sema/attr-visibility.c
    clang/test/Sema/attr-wasm.c
    clang/test/Sema/attr-weak.c
    clang/test/Sema/avr-interrupt-attr.c
    clang/test/Sema/avr-signal-attr.c
    clang/test/Sema/block-args.c
    clang/test/Sema/block-explicit-noreturn-type.c
    clang/test/Sema/block-labels.c
    clang/test/Sema/block-literal.c
    clang/test/Sema/block-printf-attribute-1.c
    clang/test/Sema/block-return-1.c
    clang/test/Sema/block-return-2.c
    clang/test/Sema/block-return-3.c
    clang/test/Sema/block-return.c
    clang/test/Sema/block-sentinel-attribute.c
    clang/test/Sema/block-storageclass.c
    clang/test/Sema/bpf-attr-preserve-access-index.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Sema/2010-05-31-palignr.c b/clang/test/Sema/2010-05-31-palignr.c
index d9bf8f68b7a51..d2b095464d9e4 100644
--- a/clang/test/Sema/2010-05-31-palignr.c
+++ b/clang/test/Sema/2010-05-31-palignr.c
@@ -5,7 +5,7 @@
 
 extern int i;
 
-int main ()
+int main (void)
 {
   typedef int16_t     vSInt16         __attribute__ ((__vector_size__ (16)));
 

diff  --git a/clang/test/Sema/Float16.c b/clang/test/Sema/Float16.c
index ff0bf9043a675..f0b94666f74d7 100644
--- a/clang/test/Sema/Float16.c
+++ b/clang/test/Sema/Float16.c
@@ -11,7 +11,7 @@ _Float16 f;
 
 #ifdef HAVE
 _Complex _Float16 a;
-void builtin_complex() {
+void builtin_complex(void) {
   _Float16 a = 0;
   (void)__builtin_complex(a, a); // expected-error {{'_Complex _Float16' is invalid}}
 }

diff  --git a/clang/test/Sema/MicrosoftExtensions.c b/clang/test/Sema/MicrosoftExtensions.c
index 166ba7f6c0a2d..d0ca16269cceb 100644
--- a/clang/test/Sema/MicrosoftExtensions.c
+++ b/clang/test/Sema/MicrosoftExtensions.c
@@ -68,7 +68,7 @@ struct test {
   NESTED6;   // expected-warning {{anonymous unions are a Microsoft extension}}
 };
 
-void foo()
+void foo(void)
 {
   struct test var;
   var.a;
@@ -148,14 +148,14 @@ void ptr_func2(int * __sptr __ptr32 i) {}  // expected-note {{previous definitio
 void ptr_func2(int * __uptr __ptr32 i) {} // expected-error {{redefinition of 'ptr_func2'}}
 
 // Check for warning when return types have the type attribute.
-void *__ptr32 ptr_func3() { return 0; } // expected-note {{previous definition is here}}
-void *__ptr64 ptr_func3() { return 0; } // expected-error {{redefinition of 'ptr_func3'}}
+void *__ptr32 ptr_func3(void) { return 0; } // expected-note {{previous definition is here}}
+void *__ptr64 ptr_func3(void) { return 0; } // expected-error {{redefinition of 'ptr_func3'}}
 
 // Test that __ptr32/__ptr64 can be passed as arguments with other address
 // spaces.
 void ptr_func4(int *i);
 void ptr_func5(int *__ptr32 i);
-void test_ptr_arguments() {
+void test_ptr_arguments(void) {
   int *__ptr64 i64;
   ptr_func4(i64);
   ptr_func5(i64);
@@ -191,7 +191,7 @@ void myprintf(const char *f, ...) {
 }
 
 // __unaligned handling
-void test_unaligned() {
+void test_unaligned(void) {
   __unaligned int *p1 = 0;
   int *p2 = p1; // expected-warning {{initializing 'int *' with an expression of type '__unaligned int *' discards qualifiers}}
   __unaligned int *p3 = p2;

diff  --git a/clang/test/Sema/PR28181.c b/clang/test/Sema/PR28181.c
index 3410f466fc73a..8d0a4ad33562a 100644
--- a/clang/test/Sema/PR28181.c
+++ b/clang/test/Sema/PR28181.c
@@ -4,10 +4,10 @@ struct spinlock_t {
   int lock;
 } audit_skb_queue;
 
-void fn1() {
+void fn1(void) {
   audit_skb_queue = (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}}
 }                           // expected-error at -1 {{assigning to 'struct spinlock_t' from incompatible type '<overloaded function type>'}}
 
-void fn2() {
+void fn2(void) {
   audit_skb_queue + (lock); // expected-error {{use of undeclared identifier 'lock'; did you mean 'long'?}}
 }                           // expected-error at -1 {{reference to overloaded function could not be resolved; did you mean to call it?}}

diff  --git a/clang/test/Sema/__try.c b/clang/test/Sema/__try.c
index 1953c61613456..e0d08fa8c19af 100644
--- a/clang/test/Sema/__try.c
+++ b/clang/test/Sema/__try.c
@@ -11,11 +11,11 @@ typedef int DWORD;
 
 struct EXCEPTION_INFO{};
 
-unsigned long __exception_code();
+unsigned long __exception_code(void);
 #ifdef BORLAND
-struct EXCEPTION_INFO* __exception_info();
+struct EXCEPTION_INFO* __exception_info(void);
 #endif
-int __abnormal_termination();
+int __abnormal_termination(void);
 
 #define GetExceptionCode __exception_code
 #define GetExceptionInformation __exception_info
@@ -26,9 +26,9 @@ int __abnormal_termination();
 DWORD FilterExpression(int); // expected-note{{declared here}}
 DWORD FilterExceptionInformation(struct EXCEPTION_INFO*);
 
-const char * NotFilterExpression();
+const char * NotFilterExpression(void);
 
-void TEST() {
+void TEST(void) {
   __try {
     __try {
       __try {
@@ -43,24 +43,24 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   __try {
 
   }
 }  // expected-error{{expected '__except' or '__finally' block}}
 
-void TEST() {
+void TEST(void) {
   __except (FilterExpression()) { // expected-warning{{implicit declaration of function '__except' is invalid in C99}} \
     // expected-error{{too few arguments to function call, expected 1, have 0}} \
     // expected-error{{expected ';' after expression}}
   }
 }
 
-void TEST() {
+void TEST(void) {
   __finally { } // expected-error{{}}
 }
 
-void TEST() {
+void TEST(void) {
   __try{
     int try_scope = 0;
   } // TODO: expected expression is an extra error
@@ -68,7 +68,7 @@ void TEST() {
   {}
 }
 
-void TEST() {
+void TEST(void) {
   __try {
 
   }
@@ -77,7 +77,7 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   __try {
 
   }
@@ -107,7 +107,7 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   __try {
 
   }
@@ -116,7 +116,7 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   int function_scope = 0;
   __try {
     int try_scope = 0;
@@ -127,7 +127,7 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   int function_scope = 0;
   __try {
     int try_scope = 0;
@@ -138,7 +138,7 @@ void TEST() {
   }
 }
 
-void TEST() {
+void TEST(void) {
   int function_scope = 0;
   __try {
 
@@ -147,7 +147,7 @@ void TEST() {
 }
 
 #ifdef BORLAND
-void TEST() {
+void TEST(void) {
   (void)__abnormal_termination(); // expected-error{{only allowed in __finally block}}
   (void)AbnormalTermination();  // expected-error{{only allowed in __finally block}}
 
@@ -169,12 +169,12 @@ void TEST() {
 }
 #endif
 
-void TEST() {
+void TEST(void) {
   (void)__exception_info();       // expected-error{{only allowed in __except filter expression}}
   (void)GetExceptionInformation(); // expected-error{{only allowed in __except filter expression}}
 }
 
-void TEST() {
+void TEST(void) {
 #ifndef BORLAND
   (void)__exception_code;     // expected-error{{builtin functions must be directly called}}
 #endif
@@ -182,7 +182,7 @@ void TEST() {
   (void)GetExceptionCode();     // expected-error{{only allowed in __except block or filter expression}}
 }
 
-void TEST() {
+void TEST(void) {
   __try {
   } __except(1) {
     GetExceptionCode(); // valid
@@ -190,7 +190,7 @@ void TEST() {
   }
 }
 
-void test_seh_leave_stmt() {
+void test_seh_leave_stmt(void) {
   __leave; // expected-error{{'__leave' statement not in __try block}}
 
   __try {
@@ -208,7 +208,7 @@ void test_seh_leave_stmt() {
   __leave; // expected-error{{'__leave' statement not in __try block}}
 }
 
-void test_jump_out_of___finally() {
+void test_jump_out_of___finally(void) {
   while(1) {
     __try {
     } __finally {
@@ -282,7 +282,7 @@ void test_jump_out_of___finally() {
   }
 }
 
-void test_typo_in_except() {
+void test_typo_in_except(void) {
   __try {
   } __except(undeclared_identifier) { // expected-error {{use of undeclared identifier 'undeclared_identifier'}} expected-error {{expected expression}}
   }

diff  --git a/clang/test/Sema/aarch64-branch-protection-attr-err.c b/clang/test/Sema/aarch64-branch-protection-attr-err.c
index d95051ec17f6c..0433dc2723208 100644
--- a/clang/test/Sema/aarch64-branch-protection-attr-err.c
+++ b/clang/test/Sema/aarch64-branch-protection-attr-err.c
@@ -2,28 +2,28 @@
 
 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
 void
-badvalue0() {}
+badvalue0(void) {}
 
 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
 void
-badvalue1() {}
+badvalue1(void) {}
 
 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
 void
-badvalue2() {}
+badvalue2(void) {}
 
 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
 void
-badvalue3() {}
+badvalue3(void) {}
 
 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badoption0() {}
+badoption0(void) {}
 
 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badorder0() {}
+badorder0(void) {}
 
 __attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badorder1() {}
+badorder1(void) {}

diff  --git a/clang/test/Sema/aarch64-special-register.c b/clang/test/Sema/aarch64-special-register.c
index 1e658fd90769c..e2512369ebac7 100644
--- a/clang/test/Sema/aarch64-special-register.c
+++ b/clang/test/Sema/aarch64-special-register.c
@@ -16,15 +16,15 @@ void wsr64_1(unsigned long v) {
   __builtin_arm_wsr64("sysreg", v);
 }
 
-unsigned rsr_1() {
+unsigned rsr_1(void) {
   return __builtin_arm_rsr("sysreg");
 }
 
-void *rsrp_1() {
+void *rsrp_1(void) {
   return __builtin_arm_rsrp("sysreg");
 }
 
-unsigned long rsr64_1() {
+unsigned long rsr64_1(void) {
   return __builtin_arm_rsr64("sysreg");
 }
 
@@ -40,15 +40,15 @@ void wsr64_2(unsigned long v) {
   __builtin_arm_wsr64("0:1:2:3:4", v);
 }
 
-unsigned rsr_2() {
+unsigned rsr_2(void) {
   return __builtin_arm_rsr("0:1:15:15:4");
 }
 
-void *rsrp_2() {
+void *rsrp_2(void) {
   return __builtin_arm_rsrp("0:1:2:3:4");
 }
 
-unsigned long rsr64_2() {
+unsigned long rsr64_2(void) {
   return __builtin_arm_rsr64("0:1:15:15:4");
 }
 
@@ -64,38 +64,38 @@ void wsr64_3(unsigned long v) {
   __builtin_arm_wsr64("0:1:2", v); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_3() {
+unsigned rsr_3(void) {
   return __builtin_arm_rsr("0:1:2"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_4() {
+unsigned rsr_4(void) {
   return __builtin_arm_rsr("0:1:2:3:8"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_5() {
+unsigned rsr_5(void) {
   return __builtin_arm_rsr("0:8:1:2:3"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_6() {
+unsigned rsr_6(void) {
   return __builtin_arm_rsr("0:1:16:16:2"); //expected-error {{invalid special register for builtin}}
 }
 
-void *rsrp_3() {
+void *rsrp_3(void) {
   return __builtin_arm_rsrp("0:1:2"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_3() {
+unsigned long rsr64_3(void) {
   return __builtin_arm_rsr64("0:1:2"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_4() {
+unsigned long rsr64_4(void) {
   return __builtin_arm_rsr64("0:1:2:3:8"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_5() {
+unsigned long rsr64_5(void) {
   return __builtin_arm_rsr64("0:8:2:3:4"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_6() {
+unsigned long rsr64_6(void) {
   return __builtin_arm_rsr64("0:1:16:16:2"); //expected-error {{invalid special register for builtin}}
 }

diff  --git a/clang/test/Sema/aarch64-sve-types.c b/clang/test/Sema/aarch64-sve-types.c
index 54233005f9344..dc327d380456f 100644
--- a/clang/test/Sema/aarch64-sve-types.c
+++ b/clang/test/Sema/aarch64-sve-types.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 %s -triple aarch64-none-linux-gnu -target-feature +sve,+bf16 -fsyntax-only -verify
 
-void f() {
+void f(void) {
   int size_s8[sizeof(__SVInt8_t) == 0 ? 1 : -1];        // expected-error {{invalid application of 'sizeof' to sizeless type '__SVInt8_t'}}
   int align_s8[__alignof__(__SVInt8_t) == 16 ? 1 : -1]; // expected-error {{invalid application of '__alignof' to sizeless type '__SVInt8_t'}}
 

diff  --git a/clang/test/Sema/aarch64-tme-errors.c b/clang/test/Sema/aarch64-tme-errors.c
index 0e9c2a6beec0c..e095550cedf5e 100644
--- a/clang/test/Sema/aarch64-tme-errors.c
+++ b/clang/test/Sema/aarch64-tme-errors.c
@@ -2,7 +2,7 @@
 
 #include "arm_acle.h"
 
-void test_no_tme_funcs() {
+void test_no_tme_funcs(void) {
   __tstart();         // expected-warning{{implicit declaration of function '__tstart'}}
   __builtin_tstart(); // expected-error{{use of unknown builtin '__builtin_tstart'}}
 }

diff  --git a/clang/test/Sema/aarch64-tme-tcancel-errors.c b/clang/test/Sema/aarch64-tme-tcancel-errors.c
index bd5b7170a9959..4fcf6817f0902 100644
--- a/clang/test/Sema/aarch64-tme-tcancel-errors.c
+++ b/clang/test/Sema/aarch64-tme-tcancel-errors.c
@@ -4,6 +4,6 @@ void t_cancel_const(unsigned short u) {
 }
 
 // RUN: %clang_cc1 -triple aarch64-eabi -target-feature +tme -verify %s
-void t_cancel_range() {
+void t_cancel_range(void) {
   __builtin_arm_tcancel(0x12345u); // expected-error{{argument value 74565 is outside the valid range [0, 65535]}}
 }

diff  --git a/clang/test/Sema/address-packed.c b/clang/test/Sema/address-packed.c
index b0519bacd7587..e149a5340beed 100644
--- a/clang/test/Sema/address-packed.c
+++ b/clang/test/Sema/address-packed.c
@@ -23,7 +23,7 @@ union __attribute__((packed)) UnionArguable {
 
 typedef struct Arguable ArguableT;
 
-struct Arguable *get_arguable();
+struct Arguable *get_arguable(void);
 
 void to_void(void *);
 void to_intptr(intptr_t);
@@ -211,7 +211,7 @@ struct S6a {
     int d;
 } __attribute__((packed, aligned(16))) s6;
 
-void g8()
+void g8(void)
 { 
     f1(&s6.a); // no-warning
     f1(&s6.c); // no-warning
@@ -222,7 +222,7 @@ struct __attribute__((packed, aligned(1))) MisalignedContainee { double d; };
 struct __attribute__((aligned(8))) AlignedContainer { struct MisalignedContainee b; };
 
 struct AlignedContainer *p;
-double* g9() {
+double* g9(void) {
   return &p->b.d; // no-warning
 }
 
@@ -273,7 +273,7 @@ struct S9 {
 
 typedef struct S9 __attribute__((__aligned__(16))) aligned_S9;
 
-void g10() {
+void g10(void) {
   struct S9 x;
   struct S9 __attribute__((__aligned__(8))) y;
   aligned_S9 z;

diff  --git a/clang/test/Sema/address_space_print_macro.c b/clang/test/Sema/address_space_print_macro.c
index 9557149d7c716..e01fcf428270b 100644
--- a/clang/test/Sema/address_space_print_macro.c
+++ b/clang/test/Sema/address_space_print_macro.c
@@ -8,7 +8,7 @@
 #define AS3 __attribute__((AS(3)))
 #define AS5 __attribute__((address_space(5))) char
 
-void normal_case() {
+void normal_case(void) {
   int *p = 0;
   __attribute__((address_space(1))) int *q = p; // expected-error{{initializing '__attribute__((address_space(1))) int *' with an expression of type 'int *' changes address space of pointer}}
 }
@@ -29,7 +29,7 @@ void test4(void) {
   test3_helper(test4_array);         // expected-error{{passing 'AS2 char *' to parameter of type 'char *' changes address space of pointer}}
 }
 
-void func() {
+void func(void) {
   char AS1 *x;
   char AS3 *x2;
   AS5 *x3;
@@ -43,7 +43,7 @@ void multiple_attrs(AS_ND int *x) {
   __attribute__((address_space(2))) int *y = x; // expected-warning{{casting to dereferenceable pointer removes 'noderef' attribute}}
 }
 
-void override_macro_name() {
+void override_macro_name(void) {
 #define ATTRS __attribute__((noderef)) // expected-note{{previous definition is here}}
   ATTRS
 #define ATTRS __attribute__((address_space(1))) // expected-warning{{'ATTRS' macro redefined}}
@@ -53,7 +53,7 @@ void override_macro_name() {
   int AS_ND *y = x; // expected-error{{initializing 'AS_ND int *' with an expression of type 'ATTRS int *' changes address space of pointer}}
 }
 
-void partial_macro_declaration() {
+void partial_macro_declaration(void) {
 #define ATTRS2 __attribute__((noderef))
   ATTRS2 __attribute__((address_space(1))) int *x;
 

diff  --git a/clang/test/Sema/address_spaces.c b/clang/test/Sema/address_spaces.c
index 6eb93f1625c76..085bef9b72d31 100644
--- a/clang/test/Sema/address_spaces.c
+++ b/clang/test/Sema/address_spaces.c
@@ -60,7 +60,7 @@ struct HasASFields
 };
 
 // Assertion failure was when the field was accessed
-void access_as_field()
+void access_as_field(void)
 {
     struct HasASFields x;
     (void) bar.as_field;
@@ -86,7 +86,7 @@ struct SomeStruct {
 
 // Compound literals in function scope are lvalues with automatic storage duration,
 // so they cannot realistically be qualified with an address space.
-void as_compound_literal() {
+void as_compound_literal(void) {
   (_AS1 struct SomeStruct){1, 2, 3}; // expected-error {{compound literal in function scope may not be qualified with an address space}}
   (_AS1 char[]){"test"}; // expected-error {{compound literal in function scope may not be qualified with an address space}}
   (_AS1 char[]){'a', 'b', 'c'}; // expected-error {{compound literal in function scope may not be qualified with an address space}}

diff  --git a/clang/test/Sema/alias-unused.c b/clang/test/Sema/alias-unused.c
index 5cedc93c2974f..de9fc8cc73766 100644
--- a/clang/test/Sema/alias-unused.c
+++ b/clang/test/Sema/alias-unused.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -Wunneeded-internal-declaration -x c -verify %s
 // expected-no-diagnostics
-static int f() { return 42; }
-int g() __attribute__((alias("f")));
+static int f(void) { return 42; }
+int g(void) __attribute__((alias("f")));
 
 static int foo [] = { 42, 0xDEAD };
 extern typeof(foo) bar __attribute__((unused, alias("foo")));

diff  --git a/clang/test/Sema/align_value.c b/clang/test/Sema/align_value.c
index 92b84dbee165b..7b367eba66913 100644
--- a/clang/test/Sema/align_value.c
+++ b/clang/test/Sema/align_value.c
@@ -28,5 +28,5 @@ typedef int __attribute__((align_value(32))) aligned_int;
 typedef double * __attribute__((align_value(32*2))) aligned_double5;
 
 // expected-warning at +1 {{'align_value' attribute only applies to variables and typedefs}}
-void foo() __attribute__((align_value(32)));
+void bar(void) __attribute__((align_value(32)));
 

diff  --git a/clang/test/Sema/alloc-align-attr.c b/clang/test/Sema/alloc-align-attr.c
index f43dbe25dfb77..377c4387814d1 100644
--- a/clang/test/Sema/alloc-align-attr.c
+++ b/clang/test/Sema/alloc-align-attr.c
@@ -20,12 +20,12 @@ void *test_no_fn_proto(int x, int y) __attribute__((alloc_align(32, 45, 37))); /
 void *passthrought(int a) {
   return test_ptr_alloc_align(a);
 }
-void *align16() {
+void *align16(void) {
   return test_ptr_alloc_align(16);
 }
-void *align15() {
+void *align15(void) {
   return test_ptr_alloc_align(15); // expected-warning {{requested alignment is not a power of 2}}
 }
-void *align1073741824() {
+void *align1073741824(void) {
   return test_ptr_alloc_align(8589934592); // expected-warning {{requested alignment must be 4294967296 bytes or smaller; maximum alignment assumed}}
 }

diff  --git a/clang/test/Sema/altivec-generic-overload.c b/clang/test/Sema/altivec-generic-overload.c
index 637a5b851a5c3..4c2108dfb6936 100644
--- a/clang/test/Sema/altivec-generic-overload.c
+++ b/clang/test/Sema/altivec-generic-overload.c
@@ -48,7 +48,7 @@ vector signed __int128 *__attribute__((__overloadable__)) convert2(__v1slll);
 vector unsigned __int128 *__attribute__((__overloadable__)) convert2(__v1ulll);
 #endif
 
-void test() {
+void test(void) {
   __v16sc gv1;
   __v16uc gv2;
   __v8ss gv3;

diff  --git a/clang/test/Sema/altivec-init.c b/clang/test/Sema/altivec-init.c
index ee38e70706714..8bdddd3ddfc66 100644
--- a/clang/test/Sema/altivec-init.c
+++ b/clang/test/Sema/altivec-init.c
@@ -35,7 +35,7 @@ void __attribute__((__overloadable__)) f(int a)
 {
 }
 
-void test()
+void test(void)
 {
   v4 vGCC;
   vector int vAltiVec;
@@ -52,7 +52,7 @@ typedef struct VecMem {
 
 // The following should not assert.  See qiongsiwu1's comment here: 
 // https://reviews.llvm.org/D115670
-void test2() {
+void test2(void) {
   vector signed local_vec = {1, 2, 3, 4};
   VecMem VM;
   VM.vec = ++local_vec;

diff  --git a/clang/test/Sema/anonymous-struct-union.c b/clang/test/Sema/anonymous-struct-union.c
index c33bc52971e76..222aebf53a7d1 100644
--- a/clang/test/Sema/anonymous-struct-union.c
+++ b/clang/test/Sema/anonymous-struct-union.c
@@ -48,7 +48,7 @@ struct Redecl {
   };
 
   int z; // expected-error{{duplicate member 'z'}}
-  void zz(); // expected-error{{duplicate member 'zz'}} 
+  void zz(void); // expected-error{{duplicate member 'zz'}} 
 };
 
 union { // expected-warning{{declaration does not declare anything}}
@@ -61,12 +61,12 @@ static union { // expected-warning{{declaration does not declare anything}}
   float float_val2;
 };
 
-void f() {
+void f(void) {
   int_val2 = 0; // expected-error{{use of undeclared identifier}}
   float_val2 = 0.0; // expected-error{{use of undeclared identifier}}
 }
 
-void g() {
+void g(void) {
   union { // expected-warning{{declaration does not declare anything}}
     int i;
     float f2;

diff  --git a/clang/test/Sema/arm-branch-protection-attr-err.c b/clang/test/Sema/arm-branch-protection-attr-err.c
index b41d5f09e0eb0..bd31b38c44872 100644
--- a/clang/test/Sema/arm-branch-protection-attr-err.c
+++ b/clang/test/Sema/arm-branch-protection-attr-err.c
@@ -2,32 +2,32 @@
 
 __attribute__((target("branch-protection=foo"))) // expected-error {{invalid or misplaced branch protection specification 'foo'}}
 void
-badvalue0() {}
+badvalue0(void) {}
 
 __attribute__((target("branch-protection=+bti"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
 void
-badvalue1() {}
+badvalue1(void) {}
 
 __attribute__((target("branch-protection=bti+"))) // expected-error {{invalid or misplaced branch protection specification '<empty>'}}
 void
-badvalue2() {}
+badvalue2(void) {}
 
 __attribute__((target("branch-protection=pac-ret+bkey"))) // expected-error {{invalid or misplaced branch protection specification 'bkey'}}
 void
-badvalue3() {}
+badvalue3(void) {}
 
 __attribute__((target("branch-protection=pac-ret+b-key"))) // expected-warning {{unsupported branch protection specification 'b-key'}}
 void
-badvalue4() {}
+badvalue4(void) {}
 
 __attribute__((target("branch-protection=bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badoption0() {}
+badoption0(void) {}
 
 __attribute__((target("branch-protection=bti+leaf+pac-ret"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badorder0() {}
+badorder0(void) {}
 
 __attribute__((target("branch-protection=pac-ret+bti+leaf"))) // expected-error {{invalid or misplaced branch protection specification 'leaf'}}
 void
-badorder1() {}
+badorder1(void) {}

diff  --git a/clang/test/Sema/arm-branch-protection-attr-warn.c b/clang/test/Sema/arm-branch-protection-attr-warn.c
index 2a380eed940b2..864bff9b9e8a4 100644
--- a/clang/test/Sema/arm-branch-protection-attr-warn.c
+++ b/clang/test/Sema/arm-branch-protection-attr-warn.c
@@ -1,16 +1,16 @@
 // RUN: %clang_cc1 -triple thumbv6m -verify -fsyntax-only %s
 
 // expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-__attribute__((target("arch=cortex-m0,branch-protection=bti"))) void f1() {}
+__attribute__((target("arch=cortex-m0,branch-protection=bti"))) void f1(void) {}
 
 // expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-__attribute__((target("arch=cortex-m0,branch-protection=pac-ret"))) void f2() {}
+__attribute__((target("arch=cortex-m0,branch-protection=pac-ret"))) void f2(void) {}
 
 // expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-__attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret"))) void f3() {}
+__attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret"))) void f3(void) {}
 
 // expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-__attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret+leaf"))) void f4() {}
+__attribute__((target("arch=cortex-m0,branch-protection=bti+pac-ret+leaf"))) void f4(void) {}
 
 // expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-__attribute__((target("arch=cortex-a17,thumb,branch-protection=bti+pac-ret+leaf"))) void f5() {}
+__attribute__((target("arch=cortex-a17,thumb,branch-protection=bti+pac-ret+leaf"))) void f5(void) {}

diff  --git a/clang/test/Sema/arm-branch-protection.c b/clang/test/Sema/arm-branch-protection.c
index 4fcfeb5df535e..2769164af0edc 100644
--- a/clang/test/Sema/arm-branch-protection.c
+++ b/clang/test/Sema/arm-branch-protection.c
@@ -2,22 +2,22 @@
 
 // expected-no-diagnostics
 // Armv8.1-M.Main
-__attribute__((target("arch=cortex-m55,branch-protection=bti"))) void f1() {}
-__attribute__((target("arch=cortex-m55,branch-protection=pac-ret"))) void f2() {}
-__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret"))) void f3() {}
-__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret+leaf"))) void f4() {}
+__attribute__((target("arch=cortex-m55,branch-protection=bti"))) void f1(void) {}
+__attribute__((target("arch=cortex-m55,branch-protection=pac-ret"))) void f2(void) {}
+__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret"))) void f3(void) {}
+__attribute__((target("arch=cortex-m55,branch-protection=bti+pac-ret+leaf"))) void f4(void) {}
 // Armv8-M.Main
-__attribute__((target("arch=cortex-m33,branch-protection=bti"))) void f5() {}
-__attribute__((target("arch=cortex-m33,branch-protection=pac-ret"))) void f6() {}
-__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret"))) void f7() {}
-__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret+leaf"))) void f8() {}
+__attribute__((target("arch=cortex-m33,branch-protection=bti"))) void f5(void) {}
+__attribute__((target("arch=cortex-m33,branch-protection=pac-ret"))) void f6(void) {}
+__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret"))) void f7(void) {}
+__attribute__((target("arch=cortex-m33,branch-protection=bti+pac-ret+leaf"))) void f8(void) {}
 // Armv7-M
-__attribute__((target("arch=cortex-m3,branch-protection=bti"))) void f9() {}
-__attribute__((target("arch=cortex-m3,branch-protection=pac-ret"))) void f10() {}
-__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret"))) void f11() {}
-__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret+leaf"))) void f12() {}
+__attribute__((target("arch=cortex-m3,branch-protection=bti"))) void f9(void) {}
+__attribute__((target("arch=cortex-m3,branch-protection=pac-ret"))) void f10(void) {}
+__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret"))) void f11(void) {}
+__attribute__((target("arch=cortex-m3,branch-protection=bti+pac-ret+leaf"))) void f12(void) {}
 // Armv7E-M
-__attribute__((target("arch=cortex-m4,branch-protection=bti"))) void f13() {}
-__attribute__((target("arch=cortex-m4,branch-protection=pac-ret"))) void f14() {}
-__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret"))) void f15() {}
-__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret+leaf"))) void f16() {}
+__attribute__((target("arch=cortex-m4,branch-protection=bti"))) void f13(void) {}
+__attribute__((target("arch=cortex-m4,branch-protection=pac-ret"))) void f14(void) {}
+__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret"))) void f15(void) {}
+__attribute__((target("arch=cortex-m4,branch-protection=bti+pac-ret+leaf"))) void f16(void) {}

diff  --git a/clang/test/Sema/arm-cmse-no-diag.c b/clang/test/Sema/arm-cmse-no-diag.c
index 0ad8cc3970acc..24b41378340ce 100644
--- a/clang/test/Sema/arm-cmse-no-diag.c
+++ b/clang/test/Sema/arm-cmse-no-diag.c
@@ -5,7 +5,7 @@ union U { unsigned n; char b[4]; } u;
 
 void (*fn2)(int, union U) __attribute__((cmse_nonsecure_call));
 
-union U xyzzy() __attribute__((cmse_nonsecure_entry)) {
+union U xyzzy(void) __attribute__((cmse_nonsecure_entry)) {
   fn2(0, u);
   return u;
 }

diff  --git a/clang/test/Sema/arm-interrupt-attr.c b/clang/test/Sema/arm-interrupt-attr.c
index 5a844d0e2d79e..3537fba8521ad 100644
--- a/clang/test/Sema/arm-interrupt-attr.c
+++ b/clang/test/Sema/arm-interrupt-attr.c
@@ -4,49 +4,49 @@
 // RUN: %clang_cc1 %s -triple thumbeb-none-eabi  -target-feature +neon -verify -fsyntax-only
 // RUN: %clang_cc1 %s -triple thumbeb-none-eabi -target-feature +neon -target-feature +soft-float -DSOFT -verify -fsyntax-only
 
-__attribute__((interrupt(IRQ))) void foo() {} // expected-error {{'interrupt' attribute requires a string}}
-__attribute__((interrupt("irq"))) void foo1() {} // expected-warning {{'interrupt' attribute argument not supported: irq}}
+__attribute__((interrupt(IRQ))) void foo(void) {} // expected-error {{'interrupt' attribute requires a string}}
+__attribute__((interrupt("irq"))) void foo1(void) {} // expected-warning {{'interrupt' attribute argument not supported: irq}}
 
-__attribute__((interrupt("IRQ", 1))) void foo2() {} // expected-error {{'interrupt' attribute takes no more than 1 argument}}
+__attribute__((interrupt("IRQ", 1))) void foo2(void) {} // expected-error {{'interrupt' attribute takes no more than 1 argument}}
 
-__attribute__((interrupt("IRQ"))) void foo3() {}
-__attribute__((interrupt("FIQ"))) void foo4() {}
-__attribute__((interrupt("SWI"))) void foo5() {}
-__attribute__((interrupt("ABORT"))) void foo6() {}
-__attribute__((interrupt("UNDEF"))) void foo7() {}
+__attribute__((interrupt("IRQ"))) void foo3(void) {}
+__attribute__((interrupt("FIQ"))) void foo4(void) {}
+__attribute__((interrupt("SWI"))) void foo5(void) {}
+__attribute__((interrupt("ABORT"))) void foo6(void) {}
+__attribute__((interrupt("UNDEF"))) void foo7(void) {}
 
-__attribute__((interrupt)) void foo8() {}
-__attribute__((interrupt())) void foo9() {}
-__attribute__((interrupt(""))) void foo10() {}
+__attribute__((interrupt)) void foo8(void) {}
+__attribute__((interrupt())) void foo9(void) {}
+__attribute__((interrupt(""))) void foo10(void) {}
 
 #ifndef SOFT
 // expected-note at +2 {{'callee1' declared here}}
 #endif
-void callee1();
-__attribute__((interrupt("IRQ"))) void callee2();
-void caller1() {
+void callee1(void);
+__attribute__((interrupt("IRQ"))) void callee2(void);
+void caller1(void) {
   callee1();
   callee2();
 }
 
 #ifndef SOFT
-__attribute__((interrupt("IRQ"))) void caller2() {
+__attribute__((interrupt("IRQ"))) void caller2(void) {
   callee1(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}}
   callee2();
 }
 
-void (*callee3)();
-__attribute__((interrupt("IRQ"))) void caller3() {
+void (*callee3)(void);
+__attribute__((interrupt("IRQ"))) void caller3(void) {
   callee3(); // expected-warning {{call to function without interrupt attribute could clobber interruptee's VFP registers}}
 }
 #else
-__attribute__((interrupt("IRQ"))) void caller2() {
+__attribute__((interrupt("IRQ"))) void caller2(void) {
   callee1();
   callee2();
 }
 
-void (*callee3)();
-__attribute__((interrupt("IRQ"))) void caller3() {
+void (*callee3)(void);
+__attribute__((interrupt("IRQ"))) void caller3(void) {
   callee3();
 }
 #endif

diff  --git a/clang/test/Sema/arm-no-cmse.c b/clang/test/Sema/arm-no-cmse.c
index 9b4baae56d1f0..849ce4fc94002 100644
--- a/clang/test/Sema/arm-no-cmse.c
+++ b/clang/test/Sema/arm-no-cmse.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -triple thumbv8m.base-none-eabi -verify %s
 
-typedef void (*callback_ns_1t)()
+typedef void (*callback_ns_1t)(void)
   __attribute__((cmse_nonsecure_call)); // expected-warning{{'cmse_nonsecure_call' attribute ignored}}
 
-void f()
+void f(void)
   __attribute__((cmse_nonsecure_entry)) {} // expected-warning{{'cmse_nonsecure_entry' attribute ignored}}

diff  --git a/clang/test/Sema/arm-special-register.c b/clang/test/Sema/arm-special-register.c
index a9be80fba2ece..35dda25a00ebb 100644
--- a/clang/test/Sema/arm-special-register.c
+++ b/clang/test/Sema/arm-special-register.c
@@ -16,15 +16,15 @@ void wsr64_1(unsigned long v) {
   __builtin_arm_wsr64("sysreg", v); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_1() {
+unsigned rsr_1(void) {
   return __builtin_arm_rsr("sysreg");
 }
 
-void *rsrp_1() {
+void *rsrp_1(void) {
   return __builtin_arm_rsrp("sysreg");
 }
 
-unsigned long rsr64_1() {
+unsigned long rsr64_1(void) {
   return __builtin_arm_rsr64("sysreg"); //expected-error {{invalid special register for builtin}}
 }
 
@@ -40,15 +40,15 @@ void wsr64_2(unsigned long v) {
   __builtin_arm_wsr64("cp0:1:c2:c3:4", v); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_2() {
+unsigned rsr_2(void) {
   return __builtin_arm_rsr("cp0:1:c15:c15:4");
 }
 
-void *rsrp_2() {
+void *rsrp_2(void) {
   return __builtin_arm_rsrp("cp0:1:c2:c3:4");
 }
 
-unsigned long rsr64_2() {
+unsigned long rsr64_2(void) {
   return __builtin_arm_rsr64("cp0:1:c2:c3:4"); //expected-error {{invalid special register for builtin}}
 }
 
@@ -64,46 +64,46 @@ void wsr64_3(unsigned long v) {
   __builtin_arm_wsr64("cp0:1:c2", v);
 }
 
-unsigned rsr_3() {
+unsigned rsr_3(void) {
   return __builtin_arm_rsr("cp0:1:c2"); //expected-error {{invalid special register for builtin}}
 }
 
-void *rsrp_3() {
+void *rsrp_3(void) {
   return __builtin_arm_rsrp("cp0:1:c2"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_3() {
+unsigned long rsr64_3(void) {
   return __builtin_arm_rsr64("cp0:1:c15");
 }
 
-unsigned rsr_4() {
+unsigned rsr_4(void) {
   return __builtin_arm_rsr("0:1:2:3:4"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_5() {
+unsigned rsr_5(void) {
   return __builtin_arm_rsr("cp0:1:c2:c3:8"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_6() {
+unsigned rsr_6(void) {
   return __builtin_arm_rsr("cp0:8:c1:c2:3"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned rsr_7() {
+unsigned rsr_7(void) {
   return __builtin_arm_rsr("cp0:1:c16:c16:2"); //expected-error {{invalid special register for builtin}}
 }
 
-void *rsrp_4() {
+void *rsrp_4(void) {
   return __builtin_arm_rsrp("0:1:2:3:4"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_4() {
+unsigned long rsr64_4(void) {
   return __builtin_arm_rsr64("0:1:2"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_5() {
+unsigned long rsr64_5(void) {
   return __builtin_arm_rsr64("cp0:8:c1"); //expected-error {{invalid special register for builtin}}
 }
 
-unsigned long rsr64_6() {
+unsigned long rsr64_6(void) {
   return __builtin_arm_rsr64("cp0:1:c16"); //expected-error {{invalid special register for builtin}}
 }

diff  --git a/clang/test/Sema/arm64-inline-asm.c b/clang/test/Sema/arm64-inline-asm.c
index 541c190e6116d..c804478ea68d5 100644
--- a/clang/test/Sema/arm64-inline-asm.c
+++ b/clang/test/Sema/arm64-inline-asm.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple arm64-apple-ios7.1 -fsyntax-only -verify %s
 
-void foo() {
+void foo(void) {
   asm volatile("USE(%0)" :: "z"(0LL));
   asm volatile("USE(%x0)" :: "z"(0LL));
   asm volatile("USE(%w0)" :: "z"(0));

diff  --git a/clang/test/Sema/array-bounds-ptr-arith.c b/clang/test/Sema/array-bounds-ptr-arith.c
index ac96b896291ac..fd2a00e9e8a4b 100644
--- a/clang/test/Sema/array-bounds-ptr-arith.c
+++ b/clang/test/Sema/array-bounds-ptr-arith.c
@@ -33,7 +33,7 @@ typedef TPtr *TabHandle;
 struct RDar11387038_B { TabHandle x; };
 typedef struct RDar11387038_B RDar11387038_B;
 
-void radar11387038() {
+void radar11387038(void) {
   RDar11387038_B *pRDar11387038_B;
   struct RDar11387038* y = &(*pRDar11387038_B->x)->z[4];
 }

diff  --git a/clang/test/Sema/array-constraint.c b/clang/test/Sema/array-constraint.c
index b7e46fda7c560..099f38bbb1587 100644
--- a/clang/test/Sema/array-constraint.c
+++ b/clang/test/Sema/array-constraint.c
@@ -5,7 +5,7 @@ struct s* t (struct s z[]) {   // expected-error {{array has incomplete element
   return z;
 }
 
-void ff() { 
+void ff(void) { 
   struct s v, *p; // expected-error {{variable has incomplete type 'struct s'}}
 
   p = &v;
@@ -33,7 +33,7 @@ pfunc xx(int f[](void)) { // expected-error {{'f' declared as array of functions
   return f;
 }
 
-void check_size() {
+void check_size(void) {
   float f;
   int size_not_int[f]; // expected-error {{size of array has non-integer type 'float'}}
   int negative_size[1-2]; // expected-error{{array with a negative size}}
@@ -45,7 +45,7 @@ typedef int TA[I]; // expected-error {{variable length array declaration not all
 
 void strFunc(char *); // expected-note{{passing argument to parameter here}}
 const char staticAry[] = "test";
-void checkStaticAry() { 
+void checkStaticAry(void) { 
   strFunc(staticAry); // expected-warning{{passing 'const char[5]' to parameter of type 'char *' discards qualifiers}}
 }
 

diff  --git a/clang/test/Sema/array-size-64.c b/clang/test/Sema/array-size-64.c
index 0e094bfa6bd72..3e6339bd6a640 100644
--- a/clang/test/Sema/array-size-64.c
+++ b/clang/test/Sema/array-size-64.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin -verify %s
 
-void f() {
+void f(void) {
   int a[2147483647U][2147483647U]; // expected-error{{array is too large}}
   int b[1073741825U - 1U][2147483647U]; // expected-error{{array is too large}}
 }
 
-void pr8256 () {
+void pr8256(void) {
   typedef char a[1LL<<61];  // expected-error {{array is too large}}
   typedef char b[(long long)sizeof(a)-1];
 }

diff  --git a/clang/test/Sema/array-size.c b/clang/test/Sema/array-size.c
index 7580e3ecc51c6..e3fb25df6f22a 100644
--- a/clang/test/Sema/array-size.c
+++ b/clang/test/Sema/array-size.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -triple i686-apple-darwin -verify %s
 
-void f() {
+void f(void) {
   int x0[1073741824]; // expected-error{{array is too large}}
   int x1[1073741824 + 1]; // expected-error{{array is too large}}
   int x2[(unsigned)1073741824]; // expected-error{{array is too large}}

diff  --git a/clang/test/Sema/artificial.c b/clang/test/Sema/artificial.c
index 076a61ca0fef4..71219f547f929 100644
--- a/clang/test/Sema/artificial.c
+++ b/clang/test/Sema/artificial.c
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
-inline void __attribute__((artificial)) foo() {}
-void __attribute__((artificial)) bar() {} // expected-warning {{'artificial' attribute only applies to inline functions}}
+inline void __attribute__((artificial)) foo(void) {}
+void __attribute__((artificial)) bar(void) {} // expected-warning {{'artificial' attribute only applies to inline functions}}

diff  --git a/clang/test/Sema/asm-label.c b/clang/test/Sema/asm-label.c
index 87cda2f5335c7..eb0259863b2b2 100644
--- a/clang/test/Sema/asm-label.c
+++ b/clang/test/Sema/asm-label.c
@@ -1,22 +1,22 @@
 // RUN: %clang_cc1 -verify %s
 
-void f();
-void f() __asm__("fish");
-void g();
+void f(void);
+void f(void) __asm__("fish");
+void g(void);
 
-void f() {
+void f(void) {
   g();
 }
-void g() __asm__("gold");  // expected-error{{cannot apply asm label to function after its first use}}
+void g(void) __asm__("gold");  // expected-error{{cannot apply asm label to function after its first use}}
 
-void h() __asm__("hose");  // expected-note{{previous declaration is here}}
-void h() __asm__("hair");  // expected-error{{conflicting asm label}}
+void h(void) __asm__("hose");  // expected-note{{previous declaration is here}}
+void h(void) __asm__("hair");  // expected-error{{conflicting asm label}}
 
 int x;
 int x __asm__("xenon");
 int y;
 
-int test() { return y; }
+int test(void) { return y; }
 
 int y __asm__("yacht");  // expected-error{{cannot apply asm label to variable after its first use}}
 
@@ -25,6 +25,6 @@ int z __asm__("zooms");  // expected-error{{conflicting asm label}}
 
 
 // No diagnostics on the following.
-void __real_readlink() __asm("readlink");
-void readlink() __asm("__protected_readlink");
-void readlink() { __real_readlink(); }
+void __real_readlink(void) __asm("readlink");
+void readlink(void) __asm("__protected_readlink");
+void readlink(void) { __real_readlink(); }

diff  --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c
index c5620fd2dc6b7..540a2769fa3b3 100644
--- a/clang/test/Sema/asm.c
+++ b/clang/test/Sema/asm.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 %s -Wno-private-extern -triple i386-pc-linux-gnu -verify -fsyntax-only
 
 
-void f() {
+void f(void) {
   int i;
 
   asm ("foo\n" : : "a" (i + 2));
@@ -19,7 +19,7 @@ void f() {
   asm ("foo\n" : "=a" (i) : "" (i)); // expected-error {{invalid input constraint '' in asm}}
 }
 
-void clobbers() {
+void clobbers(void) {
   asm ("nop" : : : "ax", "#ax", "%ax");
   asm ("nop" : : : "eax", "rax", "ah", "al");
   asm ("nop" : : : "0", "%0", "#0");
@@ -41,7 +41,7 @@ void clobbers() {
 }
 
 // rdar://6094010
-void test3() {
+void test3(void) {
   int x;
   asm(L"foo" : "=r"(x)); // expected-error {{wide string}}
   asm("foo" : L"=r"(x)); // expected-error {{wide string}}
@@ -60,7 +60,7 @@ void test4(const volatile void *addr)
 }
 
 // <rdar://problem/6512595>
-void test5() {
+void test5(void) {
   asm("nop" : : "X" (8));
 }
 
@@ -142,7 +142,7 @@ void test14(struct S *s) {
 }
 
 // PR15759.
-double test15() {
+double test15(void) {
   double ret = 0;
   __asm("0.0":"="(ret)); // expected-error {{invalid output constraint '=' in asm}}
   __asm("0.0":"=&"(ret)); // expected-error {{invalid output constraint '=&' in asm}}
@@ -209,40 +209,40 @@ double f_output_constraint(void) {
   return result;
 }
 
-void fn1() {
+void fn1(void) {
   int l;
   __asm__(""
           : [l] "=r"(l)
           : "[l],m"(l)); // expected-error {{asm constraint has an unexpected number of alternatives: 1 vs 2}}
 }
 
-void fn2() {
+void fn2(void) {
   int l;
  __asm__(""
           : "+&m"(l)); // expected-error {{invalid output constraint '+&m' in asm}}
 }
 
-void fn3() {
+void fn3(void) {
   int l;
  __asm__(""
           : "+#r"(l)); // expected-error {{invalid output constraint '+#r' in asm}}
 }
 
-void fn4() {
+void fn4(void) {
   int l;
  __asm__(""
           : "=r"(l)
           : "m#"(l));
 }
 
-void fn5() {
+void fn5(void) {
   int l;
     __asm__(""
           : [g] "+r"(l)
           : "[g]"(l)); // expected-error {{invalid input constraint '[g]' in asm}}
 }
 
-void fn6() {
+void fn6(void) {
     int a;
   __asm__(""
             : "=rm"(a), "=rm"(a)
@@ -258,7 +258,7 @@ typedef struct test16_foo {
 typedef __attribute__((vector_size(16))) int test16_bar;
 register int test16_baz asm("esp");
 
-void test16()
+void test16(void)
 {
   test16_foo a;
   test16_bar b;
@@ -292,7 +292,7 @@ int test17(int t0)
   return r0 + r1;
 }
 
-void test18()
+void test18(void)
 {
   // expected-error at +2 {{duplicate use of asm operand name "lab"}}
   // expected-note at +1 {{asm operand name "lab" first referenced here}}

diff  --git a/clang/test/Sema/assign-null.c b/clang/test/Sema/assign-null.c
index ac90850eb7ce4..19b091e21bcf3 100644
--- a/clang/test/Sema/assign-null.c
+++ b/clang/test/Sema/assign-null.c
@@ -6,6 +6,6 @@
 typedef void (*hookfunc)(void *arg);
 hookfunc hook;
 
-void clear_hook() {
+void clear_hook(void) {
   hook = NULL;
 }

diff  --git a/clang/test/Sema/assign.c b/clang/test/Sema/assign.c
index 3a329432dfbcb..fe2a9f1434479 100644
--- a/clang/test/Sema/assign.c
+++ b/clang/test/Sema/assign.c
@@ -10,7 +10,7 @@ void test2 (const struct {int a;} *x) {
 }
 
 typedef int arr[10];
-void test3() {
+void test3(void) {
   const arr b;      // expected-note {{variable 'b' declared const here}}
   const int b2[10]; // expected-note {{variable 'b2' declared const here}}
   b[4] = 1;         // expected-error {{cannot assign to variable 'b' with const-qualified type 'const arr' (aka 'const int[10]')}}

diff  --git a/clang/test/Sema/ast-print-x86.c b/clang/test/Sema/ast-print-x86.c
index 0059776b3dc1e..3efb1a1e399b1 100644
--- a/clang/test/Sema/ast-print-x86.c
+++ b/clang/test/Sema/ast-print-x86.c
@@ -2,7 +2,7 @@
 
 // REQUIRES: x86-registered-target
 
-void assembly() {
+void assembly(void) {
   int added;
   // CHECK: asm volatile ("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2));
   __asm__ __volatile__("addl %%ebx,%%eax" : "=a" (added) : "a" (1), "b" (2) );

diff  --git a/clang/test/Sema/atomic-expr.c b/clang/test/Sema/atomic-expr.c
index 997ee90e9f3b0..3afcebd0d6cce 100644
--- a/clang/test/Sema/atomic-expr.c
+++ b/clang/test/Sema/atomic-expr.c
@@ -22,11 +22,11 @@ int func_04 (int x) {
   return x << data2;
 }
 
-int func_05 () {
+int func_05 (void) {
   return data2 << data1;
 }
 
-int func_06 () {
+int func_06 (void) {
   return data1 << data2;
 }
 
@@ -50,7 +50,7 @@ int func_11 (int x) {
   return data1 == x;
 }
 
-int func_12 () {
+int func_12 (void) {
   return data1 < data2;
 }
 
@@ -58,6 +58,6 @@ int func_13 (int x, unsigned y) {
   return x ? data1 : y;
 }
 
-int func_14 () {
+int func_14 (void) {
   return data1 == 0;
 }

diff  --git a/clang/test/Sema/atomic-implicit-seq_cst.c b/clang/test/Sema/atomic-implicit-seq_cst.c
index 562a9df6d758b..834d72f3f380b 100644
--- a/clang/test/Sema/atomic-implicit-seq_cst.c
+++ b/clang/test/Sema/atomic-implicit-seq_cst.c
@@ -221,7 +221,7 @@ void bad_assign_2(int *i) {
   *i = atom; // expected-warning {{implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary}}
 }
 
-void bad_assign_3() {
+void bad_assign_3(void) {
   atom = atom; // expected-warning {{implicit use of sequentially-consistent atomic may incur stronger memory barriers than necessary}}
 }
 

diff  --git a/clang/test/Sema/atomic-ops.c b/clang/test/Sema/atomic-ops.c
index 8b5757067d2bc..160a0c09903d9 100644
--- a/clang/test/Sema/atomic-ops.c
+++ b/clang/test/Sema/atomic-ops.c
@@ -290,7 +290,7 @@ void f(_Atomic(int) *i, const _Atomic(int) *ci,
 }
 
 _Atomic(int*) PR12527_a;
-void PR12527() { int *b = PR12527_a; }
+void PR12527(void) { int *b = PR12527_a; }
 
 void PR16931(int* x) { // expected-note {{passing argument to parameter 'x' here}}
   typedef struct { _Atomic(_Bool) flag; } flag;
@@ -573,7 +573,7 @@ void memory_checks(_Atomic(int) *Ap, int *p, int val) {
   (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_seq_cst, memory_order_relaxed);
 }
 
-void nullPointerWarning() {
+void nullPointerWarning(void) {
   volatile _Atomic(int) vai;
   _Atomic(int) ai;
   volatile int vi = 42;

diff  --git a/clang/test/Sema/atomic-requires-library-error.c b/clang/test/Sema/atomic-requires-library-error.c
index b0aa2783544bb..24a9ea274e5cd 100644
--- a/clang/test/Sema/atomic-requires-library-error.c
+++ b/clang/test/Sema/atomic-requires-library-error.c
@@ -12,7 +12,7 @@ struct bar smallThing;
 struct foo bigThing;
 _Atomic(struct foo) bigAtomic;
 
-void structAtomicStore() {
+void structAtomicStore(void) {
   struct foo f = {0};
   __c11_atomic_store(&bigAtomic, f, 5); // expected-error {{atomic store requires runtime support that is not available for this target}}
 
@@ -22,7 +22,7 @@ void structAtomicStore() {
   __atomic_store(&bigThing, &f, 5);
 }
 
-void structAtomicLoad() {
+void structAtomicLoad(void) {
   struct foo f = __c11_atomic_load(&bigAtomic, 5); // expected-error {{atomic load requires runtime support that is not available for this target}}
   struct bar b;
   __atomic_load(&smallThing, &b, 5);

diff  --git a/clang/test/Sema/atomic-type.c b/clang/test/Sema/atomic-type.c
index a4ac5521091e4..3f171e4000d93 100644
--- a/clang/test/Sema/atomic-type.c
+++ b/clang/test/Sema/atomic-type.c
@@ -15,7 +15,7 @@ extern _Atomic(int (*)(int(*)[], int(*)[10])) mergetest;
 extern _Atomic(int (*)(int(*)[10], int(*)[])) mergetest;
 extern _Atomic(int (*)(int(*)[10], int(*)[10])) mergetest;
 
-_Atomic(int()) error1; // expected-error {{_Atomic cannot be applied to function type}}
+_Atomic(int(void)) error1; // expected-error {{_Atomic cannot be applied to function type}}
 _Atomic(struct ErrorS) error2; // expected-error {{_Atomic cannot be applied to incomplete type}} expected-note {{forward declaration}}
 _Atomic(int[10]) error3; // expected-error {{_Atomic cannot be applied to array type}}
 _Atomic(const int) error4; // expected-error {{_Atomic cannot be applied to qualified type}}

diff  --git a/clang/test/Sema/attr-args.c b/clang/test/Sema/attr-args.c
index 1981de522995e..e275c90be1f9d 100644
--- a/clang/test/Sema/attr-args.c
+++ b/clang/test/Sema/attr-args.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -verify -Wunused -Wused-but-marked-unused -Wunused-parameter -fsyntax-only %s
 int a;
 
-inline __attribute__((noreturn(a))) void *f1();  // expected-error {{'noreturn' attribute takes no arguments}}
-inline __attribute__((always_inline(a))) void *f2();  // expected-error {{'always_inline' attribute takes no arguments}}
-inline __attribute__((cdecl(a))) void *f3();  // expected-error {{'cdecl' attribute takes no arguments}}
-inline __attribute__((const(a))) void *f4();  // expected-error {{'const' attribute takes no arguments}}
-inline __attribute__((fastcall(a))) void *f5();  // expected-error {{'fastcall' attribute takes no arguments}}
-inline __attribute__((malloc(a))) void *f5();  // expected-error {{'malloc' attribute takes no arguments}}
-inline __attribute__((nothrow(a))) void *f7();  // expected-error {{'nothrow' attribute takes no arguments}}
-inline __attribute__((stdcall(a))) void *f8();  // expected-error {{'stdcall' attribute takes no arguments}}
-inline __attribute__((used(a))) void *f9();  // expected-error {{'used' attribute takes no arguments}}
-inline __attribute__((unused(a))) void *f10();  // expected-error {{'unused' attribute takes no arguments}}
-inline __attribute__((weak(a))) void *f11();  // expected-error {{'weak' attribute takes no arguments}}
+inline __attribute__((noreturn(a))) void *f1(void);  // expected-error {{'noreturn' attribute takes no arguments}}
+inline __attribute__((always_inline(a))) void *f2(void);  // expected-error {{'always_inline' attribute takes no arguments}}
+inline __attribute__((cdecl(a))) void *f3(void);  // expected-error {{'cdecl' attribute takes no arguments}}
+inline __attribute__((const(a))) void *f4(void);  // expected-error {{'const' attribute takes no arguments}}
+inline __attribute__((fastcall(a))) void *f5(void);  // expected-error {{'fastcall' attribute takes no arguments}}
+inline __attribute__((malloc(a))) void *f5(void);  // expected-error {{'malloc' attribute takes no arguments}}
+inline __attribute__((nothrow(a))) void *f7(void);  // expected-error {{'nothrow' attribute takes no arguments}}
+inline __attribute__((stdcall(a))) void *f8(void);  // expected-error {{'stdcall' attribute takes no arguments}}
+inline __attribute__((used(a))) void *f9(void);  // expected-error {{'used' attribute takes no arguments}}
+inline __attribute__((unused(a))) void *f10(void);  // expected-error {{'unused' attribute takes no arguments}}
+inline __attribute__((weak(a))) void *f11(void);  // expected-error {{'weak' attribute takes no arguments}}

diff  --git a/clang/test/Sema/attr-assume.c b/clang/test/Sema/attr-assume.c
index a9dd9fbe85570..cb07940d02b5b 100644
--- a/clang/test/Sema/attr-assume.c
+++ b/clang/test/Sema/attr-assume.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
 
-void f1() __attribute__((assume(3))); // expected-error {{'assume' attribute requires a string}}
-void f2() __attribute__((assume(int))); // expected-error {{expected expression}}
-void f3() __attribute__((assume(for))); // expected-error {{expected expression}}
-void f4() __attribute__((assume("QQQQ"))); // expected-warning {{unknown assumption string 'QQQQ'; attribute is potentially ignored}}
-void f5() __attribute__((assume("omp_no_openmp")));
-void f6() __attribute__((assume("omp_noopenmp"))); // expected-warning {{unknown assumption string 'omp_noopenmp' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp'?}}
-void f7() __attribute__((assume("omp_no_openmp_routine"))); // expected-warning {{unknown assumption string 'omp_no_openmp_routine' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp_routines'?}}
-void f8() __attribute__((assume("omp_no_openmp1"))); // expected-warning {{unknown assumption string 'omp_no_openmp1' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp'?}}
-void f9() __attribute__((assume("omp_no_openmp", "omp_no_openmp"))); // expected-error {{'assume' attribute takes one argument}}
+void f1(void) __attribute__((assume(3))); // expected-error {{'assume' attribute requires a string}}
+void f2(void) __attribute__((assume(int))); // expected-error {{expected expression}}
+void f3(void) __attribute__((assume(for))); // expected-error {{expected expression}}
+void f4(void) __attribute__((assume("QQQQ"))); // expected-warning {{unknown assumption string 'QQQQ'; attribute is potentially ignored}}
+void f5(void) __attribute__((assume("omp_no_openmp")));
+void f6(void) __attribute__((assume("omp_noopenmp"))); // expected-warning {{unknown assumption string 'omp_noopenmp' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp'?}}
+void f7(void) __attribute__((assume("omp_no_openmp_routine"))); // expected-warning {{unknown assumption string 'omp_no_openmp_routine' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp_routines'?}}
+void f8(void) __attribute__((assume("omp_no_openmp1"))); // expected-warning {{unknown assumption string 'omp_no_openmp1' may be misspelled; attribute is potentially ignored, did you mean 'omp_no_openmp'?}}
+void f9(void) __attribute__((assume("omp_no_openmp", "omp_no_openmp"))); // expected-error {{'assume' attribute takes one argument}}
 
 int g1 __attribute__((assume(0))); // expected-warning {{'assume' attribute only applies to functions and Objective-C methods}}
 int g2 __attribute__((assume("omp_no_openmp"))); // expected-warning {{'assume' attribute only applies to functions and Objective-C methods}}

diff  --git a/clang/test/Sema/attr-availability-android.c b/clang/test/Sema/attr-availability-android.c
index 39638bc38c4a7..f0d0a4ddec44d 100644
--- a/clang/test/Sema/attr-availability-android.c
+++ b/clang/test/Sema/attr-availability-android.c
@@ -11,7 +11,7 @@ void f3(int) __attribute__((availability(android,introduced=19)));
 void f4(int) __attribute__((availability(android,introduced=9,deprecated=11,obsoleted=16), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
 void f5(int) __attribute__((availability(ios,introduced=3.2), availability(android,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
 
-void test() {
+void test(void) {
   f0(0);
   f1(0);
   f2(0); // expected-warning-re{{'f2' is deprecated: first deprecated in Android 16{{$}}}}

diff  --git a/clang/test/Sema/attr-availability-app-extensions.c b/clang/test/Sema/attr-availability-app-extensions.c
index c66c14ed1a151..f57f2176eb585 100644
--- a/clang/test/Sema/attr-availability-app-extensions.c
+++ b/clang/test/Sema/attr-availability-app-extensions.c
@@ -31,7 +31,7 @@ void f1(int); // expected-note {{'f1' has been explicitly marked unavailable her
 #endif
 void f2(int); // expected-note {{'f2' has been explicitly marked unavailable here}}
 
-void test() {
+void test(void) {
   f0(1); // expected-error {{'f0' is unavailable: not available on}}
   f1(1); // expected-error {{'f1' is unavailable}}
   f2(2); // expected-error {{'f2' is unavailable: not available on}}

diff  --git a/clang/test/Sema/attr-availability-fuchsia.c b/clang/test/Sema/attr-availability-fuchsia.c
index 53bea9a7db3a1..0ed1be300351a 100644
--- a/clang/test/Sema/attr-availability-fuchsia.c
+++ b/clang/test/Sema/attr-availability-fuchsia.c
@@ -18,7 +18,7 @@ void f6(int) __attribute__((availability(fuchsia, introduced = 16.0)));
 void f7(int) __attribute__((availability(fuchsia, introduced = 16.1))); // expected-warning {{Fuchsia API Level prohibits specifying a minor or sub-minor version}}
 void f8(int) __attribute__((availability(fuchsia, introduced = 19))); // nothing will happen as 'strict' is not specified.
 
-void test() {
+void test(void) {
   f0(0);
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in Fuchsia 16}}

diff  --git a/clang/test/Sema/attr-availability-ios.c b/clang/test/Sema/attr-availability-ios.c
index f418c7dcfd5f8..b97b7e688cc61 100644
--- a/clang/test/Sema/attr-availability-ios.c
+++ b/clang/test/Sema/attr-availability-ios.c
@@ -10,7 +10,7 @@ void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((av
 void f6(int) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'f6' has been explicitly marked deprecated here}}
 void f6(int) __attribute__((availability(iOS,introduced=2.0)));
 
-void test() {
+void test(void) {
   f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in iOS 3.0}}

diff  --git a/clang/test/Sema/attr-availability-iosmac-infer-from-macos.c b/clang/test/Sema/attr-availability-iosmac-infer-from-macos.c
index 899a7995f4b27..12c6d59b61ac2 100644
--- a/clang/test/Sema/attr-availability-iosmac-infer-from-macos.c
+++ b/clang/test/Sema/attr-availability-iosmac-infer-from-macos.c
@@ -13,20 +13,20 @@ void f3(void)
 void f4(void)
 __attribute__((availability(macOS, introduced = 10, deprecated = 100000)));
 
-void fAvail() __attribute__((availability(macOS, unavailable)));
+void fAvail(void) __attribute__((availability(macOS, unavailable)));
 
-void f16() __attribute__((availability(macOS, introduced = 11.0)));
+void f16(void) __attribute__((availability(macOS, introduced = 11.0)));
 #ifndef IOS14
 // expected-note at -2 {{here}}
 #endif
 
-void fObs() __attribute__((availability(macOS, introduced = 10.11, obsoleted = 10.15))); // expected-note {{'fObs' has been explicitly marked unavailable here}}
+void fObs(void) __attribute__((availability(macOS, introduced = 10.11, obsoleted = 10.15))); // expected-note {{'fObs' has been explicitly marked unavailable here}}
 
-void fAPItoDepr() __attribute__((availability(macOS, introduced = 10.11, deprecated = 100000)));
+void fAPItoDepr(void) __attribute__((availability(macOS, introduced = 10.11, deprecated = 100000)));
 
-void dontRemapFutureVers() __attribute__((availability(macOS, introduced = 20)));
+void dontRemapFutureVers(void) __attribute__((availability(macOS, introduced = 20)));
 
-void usage() {
+void usage(void) {
   f0();
   f1();
   f2(); // expected-warning {{'f2' is deprecated: first deprecated in macCatalyst 13.1}}
@@ -48,7 +48,7 @@ void f15_4(void) __attribute__((availability(macOS, introduced = 10.15, deprecat
 void f15_3(void) __attribute__((availability(macOS, introduced = 10.15, deprecated = 10.15.3))); // expected-note {{here}}
 void f15_2(void) __attribute__((availability(macOS, introduced = 10.15, deprecated = 10.15.2))); // expected-note {{here}}
 
-void usage16() {
+void usage16(void) {
   f15_2(); // expected-warning {{'f15_2' is deprecated: first deprecated in macCatalyst 13.3}}
   f15_3(); // expected-warning {{'f15_3' is deprecated: first deprecated in macCatalyst 13.3.1}}
   f15_4(); // expected-warning {{'f15_4' is deprecated: first deprecated in macCatalyst 13.4}}

diff  --git a/clang/test/Sema/attr-availability-maccatalyst.c b/clang/test/Sema/attr-availability-maccatalyst.c
index 829b18c1a429c..4e6caca7d72ec 100644
--- a/clang/test/Sema/attr-availability-maccatalyst.c
+++ b/clang/test/Sema/attr-availability-maccatalyst.c
@@ -32,7 +32,7 @@ void f9(void) // expected-note {{'f9' has been explicitly marked unavailable her
 __attribute__((availability(maccatalyst,unavailable)))
 __attribute__((availability(ios,introduced=2.0)));
 
-void test() {
+void test(void) {
   f0(0);
 #ifndef APPEXT
   // expected-warning at -2 {{'f0' is deprecated: first deprecated in macCatalyst 9.1}}
@@ -96,7 +96,7 @@ __attribute__((availability(ios,unavailable)));
 void f103(void)
 __attribute__((availability(maccatalyst,introduced=3.0)));
 
-void dontInheritObsoletedDeprecated() {
+void dontInheritObsoletedDeprecated(void) {
   f100();
   f101();
   f102();
@@ -109,7 +109,7 @@ void f202(void) __attribute__((availability(ios,introduced=2.0, deprecated=5.0))
 void f203(void) __attribute__((availability(ios,introduced=2.0, obsoleted=5.0))); // expected-note {{here}}
 void f204(void) __attribute__((availability(ios,unavailable))); // expected-note {{here}}
 
-void inheritIosAvailability() {
+void inheritIosAvailability(void) {
   f202();
 #ifndef APPEXT
 // expected-warning at -2 {{'f202' is deprecated: first deprecated in macCatalyst 13.1}}

diff  --git a/clang/test/Sema/attr-availability-macosx.c b/clang/test/Sema/attr-availability-macosx.c
index d390869850883..42a6fafa6758b 100644
--- a/clang/test/Sema/attr-availability-macosx.c
+++ b/clang/test/Sema/attr-availability-macosx.c
@@ -12,7 +12,7 @@ void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,
 void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
 void f6(int) __attribute__((availability(macOS,strict,introduced=10.6))); //expected-note{{'f6' has been explicitly marked unavailable here}}
 
-void test() {
+void test(void) {
   f0(0);
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in macOS 10.5}}
@@ -52,7 +52,7 @@ struct __attribute__((availability(macOS,strict,introduced=10.9))) type_info //
 {
 };
 struct type_info;
-int test2() {
+int test2(void) {
   struct type_info *t; // expected-error{{'type_info' is unavailable: introduced in macOS 10.9}}
   return 0;
 }

diff  --git a/clang/test/Sema/attr-availability-square-brackets.c b/clang/test/Sema/attr-availability-square-brackets.c
index b03e19e4da233..26166b5c62ef5 100644
--- a/clang/test/Sema/attr-availability-square-brackets.c
+++ b/clang/test/Sema/attr-availability-square-brackets.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
 
-[[clang::availability(macosx,introduced=10.4,deprecated=10.2)]] void f0(); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
-[[clang::availability(ios,obsoleted=2.1,deprecated=3.0)]] void f1();  // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
-[[clang::availability(ios,introduced=2.1,deprecated=2.1)]] void f2();
+[[clang::availability(macosx,introduced=10.4,deprecated=10.2)]] void f0(void); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
+[[clang::availability(ios,obsoleted=2.1,deprecated=3.0)]] void f1(void);  // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
+[[clang::availability(ios,introduced=2.1,deprecated=2.1)]] void f2(void);
 
 [[clang::availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName")]]
 extern void
 ATSFontGetName(const char *oName); // expected-note {{'ATSFontGetName' has been explicitly marked deprecated here}}
 
-void test_10095131() {
+void test_10095131(void) {
   ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in macOS 9.0 - use CTFontCopyFullName}}
 }
 

diff  --git a/clang/test/Sema/attr-availability-tvos.c b/clang/test/Sema/attr-availability-tvos.c
index 24755e98c1c13..525972657133f 100644
--- a/clang/test/Sema/attr-availability-tvos.c
+++ b/clang/test/Sema/attr-availability-tvos.c
@@ -11,7 +11,7 @@ void f5(int) __attribute__((availability(tvos,introduced=12.0))) __attribute__((
 void f6(int) __attribute__((availability(tvos,deprecated=13.0))); // expected-note {{'f6' has been explicitly marked deprecated here}}
 void f6(int) __attribute__((availability(tvos,introduced=12.0)));
 
-void test() {
+void test(void) {
   f0(0); // expected-warning{{'f0' is deprecated: first deprecated in tvOS 12.1}}
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in tvOS 13.0}}
@@ -24,7 +24,7 @@ void test() {
 // Anything iOS later than 13 does not apply to tvOS.
 void f9(int) __attribute__((availability(ios,introduced=12.0,deprecated=19.0)));
 
-void test_transcribed_availability() {
+void test_transcribed_availability(void) {
   f9(0);
 }
 
@@ -45,7 +45,7 @@ void f5c_tvos(int) __attribute__((availability(ios,introduced=12.0))) __attribut
 void f6_tvos(int) __attribute__((availability(tvos,deprecated=13.0))); // expected-note {{'f6_tvos' has been explicitly marked deprecated here}}
 void f6_tvos(int) __attribute__((availability(tvOS,introduced=12.0)));
 
-void test_tvos() {
+void test_tvos(void) {
   f0_tvos(0); // expected-warning{{'f0_tvos' is deprecated: first deprecated in tvOS 12.1}}
   f1_tvos(0);
   f2_tvos(0); // expected-warning{{'f2_tvos' is deprecated: first deprecated in tvOS 13.0}}
@@ -67,14 +67,14 @@ void test_tvos() {
 // iOS 9.3 corresponds to tvOS 9.2, as indicated in 'SDKSettings.json'.
 void f11(int) __attribute__((availability(ios,deprecated=9.3))); // expected-note {{'f11' has been explicitly marked deprecated here}}
 
-void testWithVersionMap() {
+void testWithVersionMap(void) {
   f11(0); // expected-warning {{'f11' is deprecated: first deprecated in tvOS 9.2}}
 }
 #else
 // Without VersionMap, tvOS version is inferred incorrectly as 9.3.
 void f11(int) __attribute__((availability(ios,deprecated=9.3))); // expected-note {{'f11' has been explicitly marked deprecated here}}
 
-void testWithoutVersionMap() {
+void testWithoutVersionMap(void) {
   f11(0); // expected-warning {{'f11' is deprecated: first deprecated in tvOS 9.3}}
 }
 #endif

diff  --git a/clang/test/Sema/attr-availability-watchos.c b/clang/test/Sema/attr-availability-watchos.c
index 140a794cb605a..8a9cc60dea474 100644
--- a/clang/test/Sema/attr-availability-watchos.c
+++ b/clang/test/Sema/attr-availability-watchos.c
@@ -11,7 +11,7 @@ void f6(int) __attribute__((availability(ios,deprecated=12.1))); // OK - not dep
 void f7(int) __attribute__((availability(ios,deprecated=8.3))); // expected-note {{'f7' has been explicitly marked deprecated here}}
 void f8(int) __attribute__((availability(ios,introduced=2.0,obsoleted=10.0))); // expected-note {{explicitly marked unavailable}}
 
-void test() {
+void test(void) {
   f0(0); // expected-warning{{'f0' is deprecated: first deprecated in watchOS 2.0}}
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in watchOS 2.0}}
@@ -36,7 +36,7 @@ void f5c_watchos(int) __attribute__((availability(ios,introduced=2.0))) __attrib
 void f6_watchos(int) __attribute__((availability(watchos,deprecated=3.0))); // expected-note {{'f6_watchos' has been explicitly marked deprecated here}}
 void f6_watchos(int) __attribute__((availability(watchOS,introduced=2.0)));
 
-void test_watchos() {
+void test_watchos(void) {
   f0_watchos(0); // expected-warning{{'f0_watchos' is deprecated: first deprecated in watchOS 2.1}}
   f1_watchos(0);
   f2_watchos(0); // expected-warning{{'f2_watchos' is deprecated: first deprecated in watchOS 3.0}}
@@ -54,9 +54,9 @@ void test_watchos() {
   f6_watchos(0); // expected-warning {{'f6_watchos' is deprecated: first deprecated in watchOS 3.0}}
 }
 
-void deprecatedAfterIntroduced() __attribute__((availability(ios,introduced=9.3,deprecated=10))); // expected-note {{here}}
+void deprecatedAfterIntroduced(void) __attribute__((availability(ios,introduced=9.3,deprecated=10))); // expected-note {{here}}
 
-void test_ios_correctly_map_to_watchos() {
+void test_ios_correctly_map_to_watchos(void) {
   deprecatedAfterIntroduced(); // expected-warning {{'deprecatedAfterIntroduced' is deprecated: first deprecated in watchOS 3}}
 }
 
@@ -64,14 +64,14 @@ void test_ios_correctly_map_to_watchos() {
 // iOS 10.3.1 corresponds to watchOS 3.2, as indicated in 'SDKSettings.json'.
 void f9(int) __attribute__((availability(ios,deprecated=10.3.1))); // expected-note {{'f9' has been explicitly marked deprecated here}}
 
-void testWithVersionMap() {
+void testWithVersionMap(void) {
   f9(0); // expected-warning {{'f9' is deprecated: first deprecated in watchOS 3.2}}
 }
 #else
 // Without VersionMap, watchOS version is inferred incorrectly as 3.3.1.
 void f9(int) __attribute__((availability(ios,deprecated=10.3.1))); // expected-note {{'f9' has been explicitly marked deprecated here}}
 
-void testWithoutVersionMap() {
+void testWithoutVersionMap(void) {
   f9(0); // expected-warning {{'f9' is deprecated: first deprecated in watchOS 3.3.1}}
 }
 #endif

diff  --git a/clang/test/Sema/attr-availability.c b/clang/test/Sema/attr-availability.c
index b34d3d6b531b1..ba7051520c7be 100644
--- a/clang/test/Sema/attr-availability.c
+++ b/clang/test/Sema/attr-availability.c
@@ -2,11 +2,11 @@
 // RUN: %clang_cc1 -D WARN_PARTIAL -Wpartial-availability -triple x86_64-apple-darwin9 -fsyntax-only -fblocks -verify %s
 //
 
-void f0() __attribute__((availability(macosx,introduced=10.4,deprecated=10.2))); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
-void f1() __attribute__((availability(ios,obsoleted=2.1,deprecated=3.0)));  // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
-void f2() __attribute__((availability(ios,introduced=2.1,deprecated=2.1)));
+void f0(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.2))); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
+void f1(void) __attribute__((availability(ios,obsoleted=2.1,deprecated=3.0)));  // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
+void f2(void) __attribute__((availability(ios,introduced=2.1,deprecated=2.1)));
 
-void f3() __attribute__((availability(otheros,introduced=2.2))); // expected-warning{{unknown platform 'otheros' in availability macro}}
+void f3(void) __attribute__((availability(otheros,introduced=2.2))); // expected-warning{{unknown platform 'otheros' in availability macro}}
 
 // rdar://10095131
 extern void
@@ -19,7 +19,7 @@ ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduce
 // expected-note at +3 {{'PartiallyAvailable' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5}}
 #endif
 extern void
-PartiallyAvailable() __attribute__((availability(macosx,introduced=10.8)));
+PartiallyAvailable(void) __attribute__((availability(macosx,introduced=10.8)));
 
 #ifdef WARN_PARTIAL
 // expected-note at +2 2 {{'PartialEnum' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5}}
@@ -28,7 +28,7 @@ enum __attribute__((availability(macosx,introduced=10.8))) PartialEnum {
   kPartialEnumConstant,
 };
 
-void test_10095131() {
+void test_10095131(void) {
   ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in macOS 9.0 - use CTFontCopyFullName}}
   ATSFontGetPostScriptName(100); // expected-error {{'ATSFontGetPostScriptName' is unavailable: obsoleted in macOS 9.0 - use ATSFontGetFullPostScriptName}}
 
@@ -43,8 +43,8 @@ void test_10095131() {
 // attribute.
 // expected-note at +2 {{'PartiallyAvailable' has been marked as being introduced in macOS 10.8 here, but the deployment target is macOS 10.5}}
 #endif
-extern void PartiallyAvailable() ;
-void with_redeclaration() {
+extern void PartiallyAvailable(void) ;
+void with_redeclaration(void) {
 #ifdef WARN_PARTIAL
   // expected-warning at +4 {{'PartiallyAvailable' is only available on macOS 10.8 or newer}} expected-note at +4 {{__builtin_available}}
   // expected-warning at +4 {{'PartialEnum' is only available on macOS 10.8 or newer}} expected-note at +4 {{__builtin_available}}
@@ -83,7 +83,7 @@ void f7(int) __attribute__((availability(ios,deprecated=4.0))); // expected-warn
 extern int x __attribute__((availability(macosx,introduced=10.5)));
 extern int x;
 
-void f8() {
+void f8(void) {
   int (^b)(int);
   b = ^ (int i) __attribute__((availability(macosx,introduced=10.2))) { return 1; }; // expected-warning {{'availability' attribute only applies to named declarations}}
 }

diff  --git a/clang/test/Sema/attr-cleanup.c b/clang/test/Sema/attr-cleanup.c
index 36692898c1917..2c38687622c2b 100644
--- a/clang/test/Sema/attr-cleanup.c
+++ b/clang/test/Sema/attr-cleanup.c
@@ -6,7 +6,7 @@ extern int g1 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attrib
 int g2 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies to local variables}}
 static int g3 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies to local variables}}
 
-void t1()
+void t1(void)
 {
     int v1 __attribute((cleanup)); // expected-error {{'cleanup' attribute takes one argument}}
     int v2 __attribute((cleanup(1, 2))); // expected-error {{'cleanup' attribute takes one argument}}
@@ -23,10 +23,10 @@ struct s {
     int a, b;
 };
 
-void c2();
+void c2(void);
 void c3(struct s a);
 
-void t2()
+void t2(void)
 {
     int v1 __attribute__((cleanup(c2))); // expected-error {{'cleanup' function 'c2' must take 1 parameter}}
     int v2 __attribute__((cleanup(c3))); // expected-error {{'cleanup' function 'c3' parameter has type 'struct s' which is incompatible with type 'int *'}}
@@ -34,12 +34,12 @@ void t2()
 
 // This is a manufactured testcase, but gcc accepts it...
 void c4(_Bool a);
-void t4() {
+void t4(void) {
   __attribute((cleanup(c4))) void* g;
 }
 
 void c5(void*) __attribute__((deprecated));  // expected-note{{'c5' has been explicitly marked deprecated here}}
-void t5() {
+void t5(void) {
   int i __attribute__((cleanup(c5)));  // expected-warning {{'c5' is deprecated}}
 }
 

diff  --git a/clang/test/Sema/attr-coldhot.c b/clang/test/Sema/attr-coldhot.c
index 26ac07722994c..d767584512d40 100644
--- a/clang/test/Sema/attr-coldhot.c
+++ b/clang/test/Sema/attr-coldhot.c
@@ -1,14 +1,14 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
-int foo() __attribute__((__hot__));
-int bar() __attribute__((__cold__));
+int foo(void) __attribute__((__hot__));
+int bar(void) __attribute__((__cold__));
 
 int var1 __attribute__((__cold__)); // expected-warning{{'__cold__' attribute only applies to functions}}
 int var2 __attribute__((__hot__)); // expected-warning{{'__hot__' attribute only applies to functions}}
 
-int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \
+int qux(void) __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}} \
 // expected-note{{conflicting attribute is here}}
-int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \
+int baz(void) __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}} \
 // expected-note{{conflicting attribute is here}}
 
 __attribute__((cold)) void test1(void); // expected-note{{conflicting attribute is here}}

diff  --git a/clang/test/Sema/attr-decl-after-definition.c b/clang/test/Sema/attr-decl-after-definition.c
index 17b94cc47ec6f..fcf855f1a730c 100644
--- a/clang/test/Sema/attr-decl-after-definition.c
+++ b/clang/test/Sema/attr-decl-after-definition.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
-void foo();
-void foo() __attribute__((unused));
-void foo() __attribute__((unused));
-void foo(){} // expected-note {{previous definition is here}}
-void foo() __attribute__((constructor)); // expected-warning {{must precede definition}}
-void foo();
+void foo(void);
+void foo(void) __attribute__((unused));
+void foo(void) __attribute__((unused));
+void foo(void){} // expected-note {{previous definition is here}}
+void foo(void) __attribute__((constructor)); // expected-warning {{must precede definition}}
+void foo(void);
 
 int bar;
 extern int bar;

diff  --git a/clang/test/Sema/attr-deprecated-c2x.c b/clang/test/Sema/attr-deprecated-c2x.c
index ba8434e8b094a..d0d763443b449 100644
--- a/clang/test/Sema/attr-deprecated-c2x.c
+++ b/clang/test/Sema/attr-deprecated-c2x.c
@@ -1,13 +1,13 @@
 // RUN: %clang_cc1 %s -verify -fsyntax-only -std=c2x
 
-[[deprecated]] int f(); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
-[[deprecated]] void g();// expected-note {{'g' has been explicitly marked deprecated here}}
-void g();
+[[deprecated]] int f(void); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
+[[deprecated]] void g(void);// expected-note {{'g' has been explicitly marked deprecated here}}
+void g(void);
 
 extern int var [[deprecated]]; // expected-note 2 {{'var' has been explicitly marked deprecated here}}
 
-int a() {
-  int (*ptr)() = f; // expected-warning {{'f' is deprecated}}
+int a(void) {
+  int (*ptr)(void) = f; // expected-warning {{'f' is deprecated}}
   f(); // expected-warning {{'f' is deprecated}}
 
   // test if attributes propagate to functions
@@ -18,15 +18,15 @@ int a() {
 
 // test if attributes propagate to variables
 extern int var;
-int w() {
+int w(void) {
   return var; // expected-warning {{'var' is deprecated}}
 }
 
-[[deprecated]] int old_fn();// expected-note {{'old_fn' has been explicitly marked deprecated here}}
-int old_fn();
-int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}}
+[[deprecated]] int old_fn(void);// expected-note {{'old_fn' has been explicitly marked deprecated here}}
+int old_fn(void);
+int (*fn_ptr)(void) = old_fn; // expected-warning {{'old_fn' is deprecated}}
 
-int old_fn() {
+int old_fn(void) {
   return old_fn()+1;  // no warning, deprecated functions can use deprecated symbols.
 }
 

diff  --git a/clang/test/Sema/attr-deprecated-message.c b/clang/test/Sema/attr-deprecated-message.c
index c68306132c3e6..4cdce0e543268 100644
--- a/clang/test/Sema/attr-deprecated-message.c
+++ b/clang/test/Sema/attr-deprecated-message.c
@@ -23,9 +23,9 @@ Color c1; // expected-warning {{'Color' is deprecated: Please avoid Color}}
 int g1;
 int g2 __attribute__ ((deprecated("Please avoid g2"))); // expected-note {{'g2' has been explicitly marked deprecated here}}
 
-int func1()
+int func1(void)
 {
-   int (*pf)() = f1; // expected-warning {{'f1' is deprecated: Please avoid f1}}
+   int (*pf)(void) = f1; // expected-warning {{'f1' is deprecated: Please avoid f1}}
    int i = f2();
    return g1 + g2; // expected-warning {{'g2' is deprecated: Please avoid g2}}
 }

diff  --git a/clang/test/Sema/attr-deprecated.c b/clang/test/Sema/attr-deprecated.c
index 9eeef5aed57db..07fe5b8e17151 100644
--- a/clang/test/Sema/attr-deprecated.c
+++ b/clang/test/Sema/attr-deprecated.c
@@ -2,14 +2,14 @@
 // RUN: %clang_cc1 %s -std=c89 -verify -fsyntax-only
 // RUN: %clang_cc1 %s -std=c99 -verify -fsyntax-only
 
-int f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
-void g() __attribute__((deprecated));// expected-note {{'g' has been explicitly marked deprecated here}}
-void g(); 
+int f(void) __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
+void g(void) __attribute__((deprecated));// expected-note {{'g' has been explicitly marked deprecated here}}
+void g(void); 
 
 extern int var __attribute__((deprecated)); // expected-note 2 {{'var' has been explicitly marked deprecated here}}
 
-int a() {
-  int (*ptr)() = f; // expected-warning {{'f' is deprecated}}
+int a(void) {
+  int (*ptr)(void) = f; // expected-warning {{'f' is deprecated}}
   f(); // expected-warning {{'f' is deprecated}}
 
   // test if attributes propagate to functions
@@ -20,15 +20,15 @@ int a() {
 
 // test if attributes propagate to variables
 extern int var; 
-int w() {
+int w(void) {
   return var; // expected-warning {{'var' is deprecated}}
 }
 
-int old_fn() __attribute__ ((deprecated));// expected-note {{'old_fn' has been explicitly marked deprecated here}}
-int old_fn(); 
-int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}}
+int old_fn(void) __attribute__ ((deprecated));// expected-note {{'old_fn' has been explicitly marked deprecated here}}
+int old_fn(void); 
+int (*fn_ptr)(void) = old_fn; // expected-warning {{'old_fn' is deprecated}}
 
-int old_fn() {
+int old_fn(void) {
   return old_fn()+1;  // no warning, deprecated functions can use deprecated symbols.
 }
 
@@ -108,7 +108,7 @@ enum __attribute__((deprecated)) Test20 { // expected-note 2 {{'Test20' has been
   test20_a __attribute__((deprecated)), // expected-note {{'test20_a' has been explicitly marked deprecated here}}
   test20_b
 };
-void test20() {
+void test20(void) {
   enum Test20 f; // expected-warning {{'Test20' is deprecated}}
   f = test20_a; // expected-warning {{'test20_a' is deprecated}}
   f = test20_b; // expected-warning {{'test20_b' is deprecated}}

diff  --git a/clang/test/Sema/attr-diagnose-as-builtin.c b/clang/test/Sema/attr-diagnose-as-builtin.c
index b972beaf2a2f5..10962de1a3f0d 100644
--- a/clang/test/Sema/attr-diagnose-as-builtin.c
+++ b/clang/test/Sema/attr-diagnose-as-builtin.c
@@ -9,18 +9,18 @@ void *test_memcpy(const void *src, size_t c, void *dst) __attribute__((diagnose_
   return __builtin_memcpy(dst, src, c);
 }
 
-void call_test_memcpy() {
+void call_test_memcpy(void) {
   char bufferA[10];
   char bufferB[11];
   test_memcpy(bufferB, 10, bufferA);
   test_memcpy(bufferB, 11, bufferA); // expected-warning {{'memcpy' will always overflow; destination buffer has size 10, but size argument is 11}}
 }
 
-void failure_function_doesnt_exist() __attribute__((diagnose_as_builtin(__function_that_doesnt_exist))) {} // expected-error {{use of undeclared identifier '__function_that_doesnt_exist'}}
+void failure_function_doesnt_exist(void) __attribute__((diagnose_as_builtin(__function_that_doesnt_exist))) {} // expected-error {{use of undeclared identifier '__function_that_doesnt_exist'}}
 
-void not_a_builtin() {}
+void not_a_builtin(void) {}
 
-void failure_not_a_builtin() __attribute__((diagnose_as_builtin(not_a_builtin))) {} // expected-error {{'diagnose_as_builtin' attribute requires parameter 1 to be a builtin function}}
+void failure_not_a_builtin(void) __attribute__((diagnose_as_builtin(not_a_builtin))) {} // expected-error {{'diagnose_as_builtin' attribute requires parameter 1 to be a builtin function}}
 
 void failure_too_many_parameters(void *dst, const void *src, size_t count, size_t nothing) __attribute__((diagnose_as_builtin(__builtin_memcpy, 1, 2, 3, 4))) {} // expected-error {{'diagnose_as_builtin' attribute references function '__builtin_memcpy', which takes exactly 3 arguments}}
 
@@ -28,7 +28,7 @@ void failure_too_few_parameters(void *dst, const void *src) __attribute__((diagn
 
 void failure_not_an_integer(void *dst, const void *src, size_t count) __attribute__((diagnose_as_builtin(__builtin_memcpy, "abc", 2, 3))) {} // expected-error{{'diagnose_as_builtin' attribute requires parameter 2 to be an integer constant}}
 
-void failure_not_a_builtin2() __attribute__((diagnose_as_builtin("abc"))) {} // expected-error{{'diagnose_as_builtin' attribute requires parameter 1 to be a builtin function}}
+void failure_not_a_builtin2(void) __attribute__((diagnose_as_builtin("abc"))) {} // expected-error{{'diagnose_as_builtin' attribute requires parameter 1 to be a builtin function}}
 
 void failure_parameter_index_bounds(void *dst, const void *src) __attribute__((diagnose_as_builtin(__builtin_memcpy, 1, 2, 3))) {} // expected-error{{'diagnose_as_builtin' attribute references parameter 3, but the function 'failure_parameter_index_bounds' has only 2 parameters}}
 
@@ -36,7 +36,7 @@ void failure_parameter_types(double dst, const void *src, size_t count) __attrib
 
 void to_redeclare(void *dst, const void *src, size_t count);
 
-void use_to_redeclare() {
+void use_to_redeclare(void) {
   char src[10];
   char dst[9];
   // We shouldn't get an error yet.
@@ -45,7 +45,7 @@ void use_to_redeclare() {
 
 void to_redeclare(void *dst, const void *src, size_t count) __attribute((diagnose_as_builtin(__builtin_memcpy, 1, 2, 3)));
 
-void error_to_redeclare() {
+void error_to_redeclare(void) {
   char src[10];
   char dst[9];
   // Now we get an error.
@@ -55,7 +55,7 @@ void error_to_redeclare() {
 // Make sure this works even with extra qualifiers and the pass_object_size attribute.
 void *memcpy2(void *const dst __attribute__((pass_object_size(0))), const void *src, size_t copy_amount) __attribute((diagnose_as_builtin(__builtin_memcpy, 1, 2, 3)));
 
-void call_memcpy2() {
+void call_memcpy2(void) {
   char buf1[10];
   char buf2[11];
   memcpy2(buf1, buf2, 11); // expected-warning {{'memcpy' will always overflow; destination buffer has size 10, but size argument is 11}}
@@ -78,7 +78,7 @@ extern int sscanf(const char *input, const char *format, ...);
 // Variadics should work.
 int mysscanf(const char *str, const char *format, ...) __attribute__((diagnose_as_builtin(sscanf, 1, 2)));
 
-void warn_mysccanf() {
+void warn_mysccanf(void) {
   char buf[10];
   mysscanf("", "%10s", buf); // expected-warning{{'sscanf' may overflow; destination buffer in argument 3 has size 10, but the corresponding specifier may require size 11}}
 }
@@ -108,7 +108,7 @@ struct S {
   }
 };
 
-void call_static_test_memcpy() {
+void call_static_test_memcpy(void) {
   char bufferA[10];
   char bufferB[11];
   S::test_memcpy(bufferB, 10, bufferA);

diff  --git a/clang/test/Sema/attr-enforce-tcb.c b/clang/test/Sema/attr-enforce-tcb.c
index 2807f770ce73d..650c03c56e639 100644
--- a/clang/test/Sema/attr-enforce-tcb.c
+++ b/clang/test/Sema/attr-enforce-tcb.c
@@ -13,7 +13,7 @@ void foo7 (void) PLACE_IN_TCB("bar3");
 void foo8 (void) PLACE_IN_TCB("bar") PLACE_IN_TCB("bar2");
 void foo9 (void);
 
-void foo1() {
+void foo1(void) {
     foo2(); // OK - function in same TCB
     foo3(); // expected-warning {{calling 'foo3' is a violation of trusted computing base 'bar'}}
     foo4(); // expected-warning {{calling 'foo4' is a violation of trusted computing base 'bar'}}
@@ -24,18 +24,18 @@ void foo1() {
 }
 
 // Normal use without any attributes works
-void foo3() {
+void foo3(void) {
     foo9(); // no-warning
 }
 
-void foo5() {
+void foo5(void) {
     // all calls should be okay, function in TCB leaf
     foo2(); // no-warning
     foo3(); // no-warning
     foo4(); // no-warning
 }
 
-void foo6() {
+void foo6(void) {
     foo1(); // expected-warning {{calling 'foo1' is a violation of trusted computing base 'bar2'}}
     foo4(); // expected-warning {{calling 'foo4' is a violation of trusted computing base 'bar'}}
     foo8(); // no-warning
@@ -45,10 +45,10 @@ void foo6() {
 }
 
 // Ensure that attribute merging works as expected across redeclarations.
-void foo10() PLACE_IN_TCB("bar");
-void foo10() PLACE_IN_TCB("bar2");
-void foo10() PLACE_IN_TCB("bar3");
-void foo10() {
+void foo10(void) PLACE_IN_TCB("bar");
+void foo10(void) PLACE_IN_TCB("bar2");
+void foo10(void) PLACE_IN_TCB("bar3");
+void foo10(void) {
   foo1(); // #2
     // expected-warning@#2 {{calling 'foo1' is a violation of trusted computing base 'bar2'}}
     // expected-warning@#2 {{calling 'foo1' is a violation of trusted computing base 'bar3'}}

diff  --git a/clang/test/Sema/attr-external-source-symbol.c b/clang/test/Sema/attr-external-source-symbol.c
index f257a63504d40..f6d0e0649f035 100644
--- a/clang/test/Sema/attr-external-source-symbol.c
+++ b/clang/test/Sema/attr-external-source-symbol.c
@@ -1,31 +1,31 @@
 // RUN: %clang_cc1 -fsyntax-only -fblocks -verify -fdouble-square-bracket-attributes %s
 
-void threeClauses() __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration)));
+void threeClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration)));
 
-void twoClauses() __attribute__((external_source_symbol(language="Swift", defined_in="module")));
+void twoClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module")));
 
-void fourClauses() __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration, generated_declaration))); // expected-error {{duplicate 'generated_declaration' clause in an 'external_source_symbol' attribute}}
+void fourClauses(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", generated_declaration, generated_declaration))); // expected-error {{duplicate 'generated_declaration' clause in an 'external_source_symbol' attribute}}
 
-void oneClause() __attribute__((external_source_symbol(generated_declaration)));
+void oneClause(void) __attribute__((external_source_symbol(generated_declaration)));
 
-void noArguments()
+void noArguments(void)
 __attribute__((external_source_symbol)); // expected-error {{'external_source_symbol' attribute takes at least 1 argument}}
 
-void namedDeclsOnly() {
+void namedDeclsOnly(void) {
   int (^block)(void) = ^ (void)
     __attribute__((external_source_symbol(language="Swift"))) { // expected-warning {{'external_source_symbol' attribute only applies to named declarations}}
       return 1;
   };
 }
 
-[[clang::external_source_symbol(language="Swift", defined_in="module", generated_declaration)]] void threeClauses2();
+[[clang::external_source_symbol(language="Swift", defined_in="module", generated_declaration)]] void threeClauses2(void);
 
-[[clang::external_source_symbol(language="Swift", defined_in="module")]] void twoClauses2();
+[[clang::external_source_symbol(language="Swift", defined_in="module")]] void twoClauses2(void);
 
 [[clang::external_source_symbol(language="Swift", defined_in="module", generated_declaration, generated_declaration)]] // expected-error {{duplicate 'generated_declaration' clause in an 'external_source_symbol' attribute}}
-void fourClauses2();
+void fourClauses2(void);
 
-[[clang::external_source_symbol(generated_declaration)]] void oneClause2();
+[[clang::external_source_symbol(generated_declaration)]] void oneClause2(void);
 
 [[clang::external_source_symbol]] // expected-error {{'external_source_symbol' attribute takes at least 1 argument}}
-void noArguments2();
+void noArguments2(void);

diff  --git a/clang/test/Sema/attr-guard_nocf.c b/clang/test/Sema/attr-guard_nocf.c
index a91640ed98121..6f01970b8da34 100644
--- a/clang/test/Sema/attr-guard_nocf.c
+++ b/clang/test/Sema/attr-guard_nocf.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -triple %ms_abi_triple -fms-extensions -verify -std=c++11 -fsyntax-only -x c++ %s
 
 // Function definition.
-__declspec(guard(nocf)) void testGuardNoCF() { // no warning
+__declspec(guard(nocf)) void testGuardNoCF(void) { // no warning
 }
 
 // Can not be used on variable, parameter, or function pointer declarations.
@@ -11,17 +11,17 @@ void testGuardNoCFFuncParam(double __declspec(guard(nocf)) i) {}    // expected-
 __declspec(guard(nocf)) typedef void (*FuncPtrWithGuardNoCF)(void); // expected-warning {{'guard' attribute only applies to functions}}
 
 // 'guard' Attribute requries an argument.
-__declspec(guard) void testGuardNoCFParams() { // expected-error {{'guard' attribute takes one argument}}
+__declspec(guard) void testGuardNoCFParams(void) { // expected-error {{'guard' attribute takes one argument}}
 }
 
 // 'guard' Attribute requries an identifier as argument.
-__declspec(guard(1)) void testGuardNoCFParamType() { // expected-error {{'guard' attribute requires an identifier}}
+__declspec(guard(1)) void testGuardNoCFParamType(void) { // expected-error {{'guard' attribute requires an identifier}}
 }
 
 // 'guard' Attribute only takes a single argument.
-__declspec(guard(nocf, nocf)) void testGuardNoCFTooManyParams() { // expected-error {{use of undeclared identifier 'nocf'}}
+__declspec(guard(nocf, nocf)) void testGuardNoCFTooManyParams(void) { // expected-error {{use of undeclared identifier 'nocf'}}
 }
 
 // 'guard' Attribute argument must be a supported identifier.
-__declspec(guard(cf)) void testGuardNoCFInvalidParam() { // expected-warning {{'guard' attribute argument not supported: 'cf'}}
+__declspec(guard(cf)) void testGuardNoCFInvalidParam(void) { // expected-warning {{'guard' attribute argument not supported: 'cf'}}
 }

diff  --git a/clang/test/Sema/attr-leaf.c b/clang/test/Sema/attr-leaf.c
index a28ad79ae791d..415d1a48ef231 100644
--- a/clang/test/Sema/attr-leaf.c
+++ b/clang/test/Sema/attr-leaf.c
@@ -1,12 +1,12 @@
 // RUN: %clang_cc1 -verify -fsyntax-only %s
 
-void f1() __attribute__((leaf));
+void f1(void) __attribute__((leaf));
 
-void f2() __attribute__((leaf("abc"))); // expected-error {{'leaf' attribute takes no argument}}
+void f2(void) __attribute__((leaf("abc"))); // expected-error {{'leaf' attribute takes no argument}}
 
 int var __attribute__ ((leaf())); // expected-warning {{'leaf' attribute only applies to functions}}
 
 // FIXME: Might diagnose a warning if leaf attribute is used in function definition
 // The leaf attribute has no effect on functions defined within the current compilation unit
-__attribute__((leaf)) void f3() {
+__attribute__((leaf)) void f3(void) {
 }

diff  --git a/clang/test/Sema/attr-likelihood.c b/clang/test/Sema/attr-likelihood.c
index 66aabd6b64052..2c34d29002268 100644
--- a/clang/test/Sema/attr-likelihood.c
+++ b/clang/test/Sema/attr-likelihood.c
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 %s -fsyntax-only -fdouble-square-bracket-attributes -verify
 
-void g() {
+void g(void) {
   if (1)
     [[clang::likely]] {}
 }
-void m() {
+void m(void) {
   [[clang::likely]] int x = 42; // expected-error {{'likely' attribute cannot be applied to a declaration}}
 
   if (x)

diff  --git a/clang/test/Sema/attr-long-call.c b/clang/test/Sema/attr-long-call.c
index e80f8fdd52a72..4e526fe05d555 100644
--- a/clang/test/Sema/attr-long-call.c
+++ b/clang/test/Sema/attr-long-call.c
@@ -1,26 +1,26 @@
 // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s
 // RUN: %clang_cc1 -triple mips64-linux-gnu -fsyntax-only -verify %s
 
-__attribute__((long_call(0))) void foo1();  // expected-error {{'long_call' attribute takes no arguments}}
-__attribute__((short_call(0))) void foo9();  // expected-error {{'short_call' attribute takes no arguments}}
-__attribute__((far(0))) void foo2();  // expected-error {{'far' attribute takes no arguments}}
-__attribute__((near(0))) void foo3();  // expected-error {{'near' attribute takes no arguments}}
+__attribute__((long_call(0))) void foo1(void);  // expected-error {{'long_call' attribute takes no arguments}}
+__attribute__((short_call(0))) void foo9(void);  // expected-error {{'short_call' attribute takes no arguments}}
+__attribute__((far(0))) void foo2(void);  // expected-error {{'far' attribute takes no arguments}}
+__attribute__((near(0))) void foo3(void);  // expected-error {{'near' attribute takes no arguments}}
 
 __attribute((long_call)) int a; // expected-warning {{attribute only applies to functions}}
 __attribute((short_call)) int d; // expected-warning {{attribute only applies to functions}}
 __attribute((far)) int a; // expected-warning {{attribute only applies to functions}}
 __attribute((near)) int a; // expected-warning {{attribute only applies to functions}}
 
-__attribute((long_call)) void foo4();
-__attribute((short_call)) void foo10();
-__attribute((far)) void foo5();
-__attribute((near)) void foo6();
+__attribute((long_call)) void foo4(void);
+__attribute((short_call)) void foo10(void);
+__attribute((far)) void foo5(void);
+__attribute((near)) void foo6(void);
 
-__attribute((long_call, far)) void foo7();
-__attribute((short_call, near)) void foo11();
+__attribute((long_call, far)) void foo7(void);
+__attribute((short_call, near)) void foo11(void);
 
-__attribute((far, near)) void foo8(); // expected-error {{'near' and 'far' attributes are not compatible}} \
+__attribute((far, near)) void foo8(void); // expected-error {{'near' and 'far' attributes are not compatible}} \
                                       // expected-note {{conflicting attribute is here}}
 
-__attribute((short_call, long_call)) void foo12(); // expected-error {{'long_call' and 'short_call' attributes are not compatible}} \
+__attribute((short_call, long_call)) void foo12(void); // expected-error {{'long_call' and 'short_call' attributes are not compatible}} \
                                                    // expected-note {{conflicting attribute is here}}

diff  --git a/clang/test/Sema/attr-malloc.c b/clang/test/Sema/attr-malloc.c
index 6af15d2f682e6..a431aa43969d7 100644
--- a/clang/test/Sema/attr-malloc.c
+++ b/clang/test/Sema/attr-malloc.c
@@ -14,8 +14,8 @@ int * returns_intptr(void) __attribute((malloc)); // no-warning
 typedef int * iptr;
 iptr  returns_iptr  (void) __attribute((malloc)); // no-warning
 
-__attribute((malloc)) void *(*f)(); //  expected-warning{{attribute only applies to functions}}
-__attribute((malloc)) int (*g)(); // expected-warning{{attribute only applies to functions}}
+__attribute((malloc)) void *(*f)(void); //  expected-warning{{attribute only applies to functions}}
+__attribute((malloc)) int (*g)(void); // expected-warning{{attribute only applies to functions}}
 
 __attribute((malloc))
 void * xalloc(unsigned n) { return malloc(n); } // no-warning

diff  --git a/clang/test/Sema/attr-micromips.c b/clang/test/Sema/attr-micromips.c
index 27c9d3b54f6ad..3fae1f11cc9dc 100644
--- a/clang/test/Sema/attr-micromips.c
+++ b/clang/test/Sema/attr-micromips.c
@@ -1,17 +1,17 @@
 // RUN: %clang_cc1 -triple mips-linux-gnu -fsyntax-only -verify %s
 
-__attribute__((nomicromips(0))) void foo1();  // expected-error {{'nomicromips' attribute takes no arguments}}
-__attribute__((micromips(1))) void foo2();    // expected-error {{'micromips' attribute takes no arguments}}
+__attribute__((nomicromips(0))) void foo1(void);  // expected-error {{'nomicromips' attribute takes no arguments}}
+__attribute__((micromips(1))) void foo2(void);    // expected-error {{'micromips' attribute takes no arguments}}
 
 __attribute((nomicromips)) int a; // expected-error {{attribute only applies to functions}}
 __attribute((micromips)) int b;   // expected-error {{attribute only applies to functions}}
 
-__attribute__((micromips,mips16)) void foo5();  // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \
+__attribute__((micromips,mips16)) void foo5(void);  // expected-error {{'mips16' and 'micromips' attributes are not compatible}} \
                                                 // expected-note {{conflicting attribute is here}}
-__attribute__((mips16,micromips)) void foo6();  // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \
+__attribute__((mips16,micromips)) void foo6(void);  // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \
                                                 // expected-note {{conflicting attribute is here}}
 
-__attribute((micromips)) void foo7();
-__attribute((nomicromips)) void foo8();
+__attribute((micromips)) void foo7(void);
+__attribute((nomicromips)) void foo8(void);
 __attribute__((mips16)) void foo9(void) __attribute__((micromips)); // expected-error {{'micromips' and 'mips16' attributes are not compatible}} \
                                                                     // expected-note {{conflicting attribute is here}}

diff  --git a/clang/test/Sema/attr-mig.c b/clang/test/Sema/attr-mig.c
index 3b16696cd716d..c3ffa9209974f 100644
--- a/clang/test/Sema/attr-mig.c
+++ b/clang/test/Sema/attr-mig.c
@@ -5,18 +5,18 @@ typedef int kern_return_t;
 
 __attribute__((mig_server_routine)) kern_return_t var = KERN_SUCCESS; // expected-warning{{'mig_server_routine' attribute only applies to functions, Objective-C methods, and blocks}}
 
-__attribute__((mig_server_routine)) void foo_void(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
-__attribute__((mig_server_routine)) int foo_int(); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
+__attribute__((mig_server_routine)) void foo_void(void); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
+__attribute__((mig_server_routine)) int foo_int(void); // expected-warning{{'mig_server_routine' attribute only applies to routines that return a kern_return_t}}
 
-__attribute__((mig_server_routine)) kern_return_t bar_extern(); // no-warning
-__attribute__((mig_server_routine)) kern_return_t bar_forward(); // no-warning
+__attribute__((mig_server_routine)) kern_return_t bar_extern(void); // no-warning
+__attribute__((mig_server_routine)) kern_return_t bar_forward(void); // no-warning
 
-__attribute__((mig_server_routine)) kern_return_t bar_definition() { // no-warning
+__attribute__((mig_server_routine)) kern_return_t bar_definition(void) { // no-warning
   return KERN_SUCCESS;
 }
 
-kern_return_t bar_forward() { // no-warning
+kern_return_t bar_forward(void) { // no-warning
   return KERN_SUCCESS;
 }
 
-__attribute__((mig_server_routine(123))) kern_return_t bar_with_argument(); // expected-error{{'mig_server_routine' attribute takes no arguments}}
+__attribute__((mig_server_routine(123))) kern_return_t bar_with_argument(void); // expected-error{{'mig_server_routine' attribute takes no arguments}}

diff  --git a/clang/test/Sema/attr-mig.m b/clang/test/Sema/attr-mig.m
index a40a9172e524a..547f2c2f300a7 100644
--- a/clang/test/Sema/attr-mig.m
+++ b/clang/test/Sema/attr-mig.m
@@ -14,12 +14,12 @@ - (int) bar_int __attribute__((mig_server_routine)); // expected-warning{{'mig_s
 
 @implementation I
 - (kern_return_t)foo {
-  kern_return_t (^block)() = ^ __attribute__((mig_server_routine)) { // no-warning
+  kern_return_t (^block)(void) = ^ __attribute__((mig_server_routine)) { // no-warning
     return KERN_SUCCESS;
   };
 
   // FIXME: Warn that this block doesn't return a kern_return_t.
-  void (^invalid_block)() = ^ __attribute__((mig_server_routine)) {};
+  void (^invalid_block)(void) = ^ __attribute__((mig_server_routine)) {};
 
   return block();
 }

diff  --git a/clang/test/Sema/attr-minsize.c b/clang/test/Sema/attr-minsize.c
index d2374b6113bef..59bdd5663ff4d 100644
--- a/clang/test/Sema/attr-minsize.c
+++ b/clang/test/Sema/attr-minsize.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
-int foo() __attribute__((__minsize__));
+int foo(void) __attribute__((__minsize__));
 
 int var1 __attribute__((__minsize__)); // expected-error{{'__minsize__' attribute only applies to functions and Objective-C methods}}

diff  --git a/clang/test/Sema/attr-mode-enums.c b/clang/test/Sema/attr-mode-enums.c
index 4b98c3b4472d2..5f88c80533bfb 100644
--- a/clang/test/Sema/attr-mode-enums.c
+++ b/clang/test/Sema/attr-mode-enums.c
@@ -7,7 +7,7 @@
 
 typedef enum { E4 } EnumType;
 
-int main() {
+int main(void) {
   // Vector mode are not allowed with enums.
   typedef enum { E1 } __attribute__((mode(V4QI))) RejectedType1; // expected-error{{mode 'V4QI' is not supported for enumeration types}}
   // expected-warning at -1{{specifying vector types with the 'mode' attribute is deprecated}}

diff  --git a/clang/test/Sema/attr-mode.c b/clang/test/Sema/attr-mode.c
index c89738a9d7969..261c2c34c3850 100644
--- a/clang/test/Sema/attr-mode.c
+++ b/clang/test/Sema/attr-mode.c
@@ -34,7 +34,7 @@ typedef unsigned unwind_word __attribute((mode(unwind_word)));
 
 int **__attribute((mode(QI)))* i32;  // expected-error{{mode attribute}}
 
-__attribute__((mode(QI))) int invalid_func() { return 1; } // expected-error{{'mode' attribute only applies to variables, enums, typedefs, and non-static data members}}
+__attribute__((mode(QI))) int invalid_func(void) { return 1; } // expected-error{{'mode' attribute only applies to variables, enums, typedefs, and non-static data members}}
 enum invalid_enum { A1 __attribute__((mode(QI))) }; // expected-error{{'mode' attribute only applies to}}
 
 typedef _Complex double c32 __attribute((mode(SC)));

diff  --git a/clang/test/Sema/attr-naked.c b/clang/test/Sema/attr-naked.c
index c9a3f1dbfcc19..dff697a8c7bcb 100644
--- a/clang/test/Sema/attr-naked.c
+++ b/clang/test/Sema/attr-naked.c
@@ -6,15 +6,15 @@ __attribute__((naked)) int t0(void) {
   __asm__ volatile("mov r0, #0");
 }
 
-void t1() __attribute__((naked));
+void t1(void) __attribute__((naked));
 
-void t2() __attribute__((naked(2))); // expected-error {{'naked' attribute takes no arguments}}
+void t2(void) __attribute__((naked(2))); // expected-error {{'naked' attribute takes no arguments}}
 
-__attribute__((naked)) int t3() { // expected-note{{attribute is here}}
+__attribute__((naked)) int t3(void) { // expected-note{{attribute is here}}
   return 42; // expected-error{{non-ASM statement in naked function is not supported}}
 }
 
-__attribute__((naked)) int t4() {
+__attribute__((naked)) int t4(void) {
   asm("movl $42, %eax");
   asm("retl");
 }
@@ -24,11 +24,11 @@ __attribute__((naked)) int t5(int x) {
   asm("retl");
 }
 
-__attribute__((naked)) void t6() {
+__attribute__((naked)) void t6(void) {
   ;
 }
 
-__attribute__((naked)) void t7() {
+__attribute__((naked)) void t7(void) {
   asm("movl $42, %eax");
   ;
 }
@@ -49,19 +49,19 @@ __attribute__((naked)) void t9(int z) { // expected-note{{attribute is here}}
            );
 }
 
-__attribute__((naked)) void t10() {  // expected-note{{attribute is here}}
+__attribute__((naked)) void t10(void) {  // expected-note{{attribute is here}}
   int a; // expected-error{{non-ASM statement in naked function is not supported}}
 }
 
-__attribute__((naked)) void t11() {  // expected-note{{attribute is here}}
+__attribute__((naked)) void t11(void) {  // expected-note{{attribute is here}}
   register int a asm("eax") = x; // expected-error{{non-ASM statement in naked function is not supported}}
 }
 
-__attribute__((naked)) void t12() {  // expected-note{{attribute is here}}
+__attribute__((naked)) void t12(void) {  // expected-note{{attribute is here}}
   register int a asm("eax"), b asm("ebx") = x; // expected-error{{non-ASM statement in naked function is not supported}}
 }
 
-__attribute__((naked)) void t13() {
+__attribute__((naked)) void t13(void) {
   register int a asm("eax");
   register int b asm("ebx"), c asm("ecx");
 }

diff  --git a/clang/test/Sema/attr-nocf_check.c b/clang/test/Sema/attr-nocf_check.c
index 9ca1bb173439e..0910a8060a917 100644
--- a/clang/test/Sema/attr-nocf_check.c
+++ b/clang/test/Sema/attr-nocf_check.c
@@ -5,8 +5,8 @@ typedef void (*FuncPointerWithNoCfCheck)(void) __attribute__((nocf_check)); // n
 typedef void (*FuncPointer)(void);
 
 // Dont allow function declaration and definition mismatch.
-void __attribute__((nocf_check)) testNoCfCheck();   // expected-note {{previous declaration is here}}
-void testNoCfCheck(){}; //  expected-error {{conflicting types for 'testNoCfCheck'}}
+void __attribute__((nocf_check)) testNoCfCheck(void);   // expected-note {{previous declaration is here}}
+void testNoCfCheck(void){}; //  expected-error {{conflicting types for 'testNoCfCheck'}}
 
 // No variable or parameter declaration
 __attribute__((nocf_check)) int i;                              // expected-warning {{'nocf_check' attribute only applies to function}}
@@ -20,4 +20,4 @@ void testNoCfCheckMismatch(FuncPointer f) {
 }
 
 // 'nocf_check' Attribute has no parameters.
-int testNoCfCheckParams() __attribute__((nocf_check(1))); // expected-error {{'nocf_check' attribute takes no arguments}}
+int testNoCfCheckParams(void) __attribute__((nocf_check(1))); // expected-error {{'nocf_check' attribute takes no arguments}}

diff  --git a/clang/test/Sema/attr-nodebug.c b/clang/test/Sema/attr-nodebug.c
index 3ae894a8d0ab2..e624ff44015f2 100644
--- a/clang/test/Sema/attr-nodebug.c
+++ b/clang/test/Sema/attr-nodebug.c
@@ -6,6 +6,6 @@ void b(int p __attribute__((nodebug))) { // expected-warning {{'nodebug' attribu
   int b __attribute__((nodebug));
 }
 
-void t1() __attribute__((nodebug));
+void t1(void) __attribute__((nodebug));
 
-void t2() __attribute__((nodebug(2))); // expected-error {{'nodebug' attribute takes no arguments}}
+void t2(void) __attribute__((nodebug(2))); // expected-error {{'nodebug' attribute takes no arguments}}

diff  --git a/clang/test/Sema/attr-noduplicate.c b/clang/test/Sema/attr-noduplicate.c
index 2a77de50c0382..5e0c254047d3e 100644
--- a/clang/test/Sema/attr-noduplicate.c
+++ b/clang/test/Sema/attr-noduplicate.c
@@ -2,7 +2,7 @@
 
 int a __attribute__((noduplicate)); // expected-warning {{'noduplicate' attribute only applies to functions}}
 
-void t1() __attribute__((noduplicate));
+void t1(void) __attribute__((noduplicate));
 
-void t2() __attribute__((noduplicate(2))); // expected-error {{'noduplicate' attribute takes no arguments}}
+void t2(void) __attribute__((noduplicate(2))); // expected-error {{'noduplicate' attribute takes no arguments}}
 

diff  --git a/clang/test/Sema/attr-noinline.c b/clang/test/Sema/attr-noinline.c
index cadf9d6c186a2..ebe96aa57d66a 100644
--- a/clang/test/Sema/attr-noinline.c
+++ b/clang/test/Sema/attr-noinline.c
@@ -2,7 +2,7 @@
 
 int a __attribute__((noinline)); // expected-warning {{'noinline' attribute only applies to functions}}
 
-void t1() __attribute__((noinline));
+void t1(void) __attribute__((noinline));
 
-void t2() __attribute__((noinline(2))); // expected-error {{'noinline' attribute takes no arguments}}
+void t2(void) __attribute__((noinline(2))); // expected-error {{'noinline' attribute takes no arguments}}
 

diff  --git a/clang/test/Sema/attr-notail.c b/clang/test/Sema/attr-notail.c
index f65af47518d13..ae05427e4f728 100644
--- a/clang/test/Sema/attr-notail.c
+++ b/clang/test/Sema/attr-notail.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 
-int callee0() __attribute__((not_tail_called,always_inline)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \
+int callee0(void) __attribute__((not_tail_called,always_inline)); // expected-error{{'always_inline' and 'not_tail_called' attributes are not compatible}} \
 // expected-note{{conflicting attribute is here}}
-int callee1() __attribute__((always_inline,not_tail_called)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \
+int callee1(void) __attribute__((always_inline,not_tail_called)); // expected-error{{'not_tail_called' and 'always_inline' attributes are not compatible}} \
 // expected-note{{conflicting attribute is here}}
 
 int foo(int a) {

diff  --git a/clang/test/Sema/attr-print.c b/clang/test/Sema/attr-print.c
index a326e1c58f487..e2364b60dc1d7 100644
--- a/clang/test/Sema/attr-print.c
+++ b/clang/test/Sema/attr-print.c
@@ -10,11 +10,12 @@ __declspec(align(4)) int y;
 // CHECK: short arr[3] __attribute__((aligned));
 short arr[3] __attribute__((aligned));
 
+// FIXME: -ast-print is printing this function signature with a K&R C style.
 // CHECK: void foo() __attribute__((const));
-void foo() __attribute__((const));
+void foo(void) __attribute__((const));
 
 // CHECK: void bar() __attribute__((__const));
-void bar() __attribute__((__const));
+void bar(void) __attribute__((__const));
 
 // CHECK: int * __ptr32 p32;
 int * __ptr32 p32;

diff  --git a/clang/test/Sema/attr-retain.c b/clang/test/Sema/attr-retain.c
index 478059b5fcc38..c8d9c8195637a 100644
--- a/clang/test/Sema/attr-retain.c
+++ b/clang/test/Sema/attr-retain.c
@@ -11,16 +11,16 @@ const char test3[] __attribute__((retain)) = "";
 struct __attribute__((retain)) s { // expected-warning {{'retain' attribute only applies to variables with non-local storage, functions, and Objective-C methods}}
 };
 
-void foo() {
+void foo(void) {
   static int a __attribute__((retain));
   int b __attribute__((retain)); // expected-warning {{'retain' attribute only applies to variables with non-local storage, functions, and Objective-C methods}}
   (void)a;
   (void)b;
 }
 
-__attribute__((retain,used)) static void f0() {}
-__attribute__((retain)) static void f1() {} // expected-warning {{unused function 'f1'}}
-__attribute__((retain)) void f2() {}
+__attribute__((retain,used)) static void f0(void) {}
+__attribute__((retain)) static void f1(void) {} // expected-warning {{unused function 'f1'}}
+__attribute__((retain)) void f2(void) {}
 
 /// Test attribute merging.
 int tentative;

diff  --git a/clang/test/Sema/attr-returns-twice.c b/clang/test/Sema/attr-returns-twice.c
index aa32b243b106f..9c5f0d3da559b 100644
--- a/clang/test/Sema/attr-returns-twice.c
+++ b/clang/test/Sema/attr-returns-twice.c
@@ -5,8 +5,8 @@ int a __attribute__((returns_twice)); // expected-warning {{'returns_twice' attr
 __attribute__((returns_twice)) void t0(void) {
 }
 
-void t1() __attribute__((returns_twice));
+void t1(void) __attribute__((returns_twice));
 
-void t2() __attribute__((returns_twice(2))); // expected-error {{'returns_twice' attribute takes no arguments}}
+void t2(void) __attribute__((returns_twice(2))); // expected-error {{'returns_twice' attribute takes no arguments}}
 
 typedef void (*t3)(void) __attribute__((returns_twice)); // expected-warning {{'returns_twice' attribute only applies to functions}}

diff  --git a/clang/test/Sema/attr-section.c b/clang/test/Sema/attr-section.c
index 509c9752d8c37..3ea922c91947e 100644
--- a/clang/test/Sema/attr-section.c
+++ b/clang/test/Sema/attr-section.c
@@ -9,7 +9,7 @@ int y __attribute__((section(
    "sadf"))); // expected-error {{mach-o section specifier requires a segment and section separated by a comma}}
 
 // PR6007
-void test() {
+void test(void) {
   __attribute__((section("NEAR,x"))) int n1; // expected-error {{'section' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties}}
   __attribute__((section("NEAR,x"))) static int n2; // ok.
 }

diff  --git a/clang/test/Sema/attr-selectany.c b/clang/test/Sema/attr-selectany.c
index 9d574d524f0ad..1078695c26abc 100644
--- a/clang/test/Sema/attr-selectany.c
+++ b/clang/test/Sema/attr-selectany.c
@@ -8,4 +8,4 @@ extern __declspec(selectany) const int x1 = 1; // no warning, const means we nee
 // Should we really warn on this?
 extern __declspec(selectany) int x2 = 1; // expected-warning {{'extern' variable has an initializer}}
 
-__declspec(selectany) void foo() { } // expected-error{{'selectany' can only be applied to data items with external linkage}}
+__declspec(selectany) void foo(void) { } // expected-error{{'selectany' can only be applied to data items with external linkage}}

diff  --git a/clang/test/Sema/attr-sentinel.c b/clang/test/Sema/attr-sentinel.c
index abc108fdc7858..9af11296b07f6 100644
--- a/clang/test/Sema/attr-sentinel.c
+++ b/clang/test/Sema/attr-sentinel.c
@@ -13,7 +13,7 @@ void foo12 (int x, ... ) ATTR; // expected-note {{function has been explicitly m
 
 #define FOOMACRO(...) foo1(__VA_ARGS__)
 
-void test1() {
+void test1(void) {
   foo1(1, NULL); // OK
   foo1(1, 0) ; // expected-warning {{missing sentinel in function call}}
   foo5(1, NULL, 2);  // OK
@@ -41,7 +41,7 @@ void test1() {
 
 void (*e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1)));
 
-void test2() {
+void test2(void) {
   void (*b) (int arg, const char * format, ...) __attribute__ ((__sentinel__));  // expected-note {{function has been explicitly marked sentinel here}}
   void (*z) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (2))); // expected-note {{function has been explicitly marked sentinel here}}
   

diff  --git a/clang/test/Sema/attr-target-clones.c b/clang/test/Sema/attr-target-clones.c
index ea7cf91c3ab86..46da36d2e1e7b 100644
--- a/clang/test/Sema/attr-target-clones.c
+++ b/clang/test/Sema/attr-target-clones.c
@@ -80,7 +80,7 @@ void __attribute__((target_clones("avx2,default"), target_clones("arch=atom,defa
 dupe_normal2(void);
 
 int mv_after_use(void);
-int useage() {
+int useage(void) {
   return mv_after_use();
 }
 // expected-error at +1 {{function declaration cannot become a multiversioned function after first usage}}

diff  --git a/clang/test/Sema/attr-target.c b/clang/test/Sema/attr-target.c
index ea63069747e64..4318183e0e3ce 100644
--- a/clang/test/Sema/attr-target.c
+++ b/clang/test/Sema/attr-target.c
@@ -3,32 +3,32 @@
 
 #ifdef __x86_64__
 
-int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo() { return 4; }
+int __attribute__((target("avx,sse4.2,arch=ivybridge"))) foo(void) { return 4; }
 //expected-error at +1 {{'target' attribute takes one argument}}
-int __attribute__((target())) bar() { return 4; }
+int __attribute__((target())) bar(void) { return 4; }
 // no warning, tune is supported for x86
-int __attribute__((target("tune=sandybridge"))) baz() { return 4; }
+int __attribute__((target("tune=sandybridge"))) baz(void) { return 4; }
 //expected-warning at +1 {{unsupported 'fpmath=' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("fpmath=387"))) walrus() { return 4; }
+int __attribute__((target("fpmath=387"))) walrus(void) { return 4; }
 //expected-warning at +1 {{unknown architecture 'hiss' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("avx,sse4.2,arch=hiss"))) meow() {  return 4; }
+int __attribute__((target("avx,sse4.2,arch=hiss"))) meow(void) {  return 4; }
 //expected-warning at +1 {{unsupported 'woof' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("woof"))) bark() {  return 4; }
+int __attribute__((target("woof"))) bark(void) {  return 4; }
 // no warning, same as saying 'nothing'.
-int __attribute__((target("arch="))) turtle() { return 4; }
+int __attribute__((target("arch="))) turtle(void) { return 4; }
 //expected-warning at +1 {{unknown architecture 'hiss' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("arch=hiss,arch=woof"))) pine_tree() { return 4; }
+int __attribute__((target("arch=hiss,arch=woof"))) pine_tree(void) { return 4; }
 //expected-warning at +1 {{duplicate 'arch=' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("arch=ivybridge,arch=haswell"))) oak_tree() { return 4; }
+int __attribute__((target("arch=ivybridge,arch=haswell"))) oak_tree(void) { return 4; }
 //expected-warning at +1 {{unsupported 'branch-protection' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("branch-protection=none"))) birch_tree() { return 5; }
+int __attribute__((target("branch-protection=none"))) birch_tree(void) { return 5; }
 //expected-warning at +1 {{unknown tune CPU 'hiss' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("tune=hiss,tune=woof"))) apple_tree() { return 4; }
+int __attribute__((target("tune=hiss,tune=woof"))) apple_tree(void) { return 4; }
 
 #else
 
 // tune is not supported by other targets.
 //expected-warning at +1 {{unsupported 'tune=' in the 'target' attribute string; 'target' attribute ignored}}
-int __attribute__((target("tune=hiss"))) baz() { return 4; }
+int __attribute__((target("tune=hiss"))) baz(void) { return 4; }
 
 #endif

diff  --git a/clang/test/Sema/attr-tls_model.c b/clang/test/Sema/attr-tls_model.c
index c4f92f1f80de7..9106d39b55a3a 100644
--- a/clang/test/Sema/attr-tls_model.c
+++ b/clang/test/Sema/attr-tls_model.c
@@ -4,7 +4,7 @@
 #error "Should support tls_model attribute"
 #endif
 
-int f() __attribute((tls_model("global-dynamic"))); // expected-error {{'tls_model' attribute only applies to thread-local variables}}
+int f(void) __attribute((tls_model("global-dynamic"))); // expected-error {{'tls_model' attribute only applies to thread-local variables}}
 
 int x __attribute((tls_model("global-dynamic"))); // expected-error {{'tls_model' attribute only applies to thread-local variables}}
 static __thread int y __attribute((tls_model("global-dynamic"))); // no-warning

diff  --git a/clang/test/Sema/attr-unavailable-message.c b/clang/test/Sema/attr-unavailable-message.c
index 70d5947086f9d..b4ae70e0a39cb 100644
--- a/clang/test/Sema/attr-unavailable-message.c
+++ b/clang/test/Sema/attr-unavailable-message.c
@@ -1,23 +1,23 @@
 // RUN: %clang_cc1 -fsyntax-only -verify %s
 // rdar: //6734520
 
-void tooManyArgs() __attribute__((unavailable("a", "b"))); // expected-error {{'unavailable' attribute takes no more than 1 argument}}
+void tooManyArgs(void) __attribute__((unavailable("a", "b"))); // expected-error {{'unavailable' attribute takes no more than 1 argument}}
 
 int foo(int)  __attribute__((__unavailable__("USE IFOO INSTEAD"))); // expected-note {{'foo' has been explicitly marked unavailable here}}
 double dfoo(double)  __attribute__((__unavailable__("NO LONGER"))); // expected-note 2 {{'dfoo' has been explicitly marked unavailable here}}
 
-void bar() __attribute__((__unavailable__)); // expected-note {{explicitly marked unavailable}}
+void bar(void) __attribute__((__unavailable__)); // expected-note {{explicitly marked unavailable}}
 
 int quux(void) __attribute__((__unavailable__(12))); // expected-error {{'__unavailable__' attribute requires a string}}
 
 #define ACCEPTABLE	"Use something else"
 int quux2(void) __attribute__((__unavailable__(ACCEPTABLE)));
 
-void test_foo() {
+void test_foo(void) {
   int ir = foo(1); // expected-error {{'foo' is unavailable: USE IFOO INSTEAD}}
   double dr = dfoo(1.0); // expected-error {{'dfoo' is unavailable: NO LONGER}}
 
-  void (*fp)() = &bar; // expected-error {{'bar' is unavailable}}
+  void (*fp)(void) = &bar; // expected-error {{'bar' is unavailable}}
 
   double (*fp4)(double) = dfoo;  // expected-error {{'dfoo' is unavailable: NO LONGER}}
 }
@@ -30,7 +30,7 @@ void unavail(void) {
   // No complains inside an unavailable function.
   int ir = foo(1);
   double dr = dfoo(1.0);
-  void (*fp)() = &bar;
+  void (*fp)(void) = &bar;
   double (*fp4)(double) = dfoo;
 }
 
@@ -47,7 +47,7 @@ enum fee { // expected-note 2 {{'fee' has been explicitly marked unavailable her
     t = 3
 }__attribute__((unavailable()));
 
-enum fee f() { // expected-error {{'fee' is unavailable}}
+enum fee f(void) { // expected-error {{'fee' is unavailable}}
     int i = a; // expected-warning {{'a' is deprecated}}
 
     i = b; // expected-warning {{'b' is deprecated}}

diff  --git a/clang/test/Sema/attr-uninitialized.c b/clang/test/Sema/attr-uninitialized.c
index 44c7b4a54efcd..b934ace699242 100644
--- a/clang/test/Sema/attr-uninitialized.c
+++ b/clang/test/Sema/attr-uninitialized.c
@@ -1,10 +1,10 @@
 // RUN: %clang_cc1 %s -verify -fsyntax-only
 
-void good() {
+void good(void) {
   int dont_initialize_me __attribute((uninitialized));
 }
 
-void bad() {
+void bad(void) {
   int im_bad __attribute((uninitialized("zero")));  // expected-error {{'uninitialized' attribute takes no arguments}}
   static int im_baaad __attribute((uninitialized)); // expected-warning {{'uninitialized' attribute only applies to local variables}}
 }
@@ -13,7 +13,7 @@ extern int come_on __attribute((uninitialized));                    // expected-
 int you_know __attribute((uninitialized));                          // expected-warning {{'uninitialized' attribute only applies to local variables}}
 static int and_the_whole_world_has_to __attribute((uninitialized)); // expected-warning {{'uninitialized' attribute only applies to local variables}}
 
-void answer_right_now() __attribute((uninitialized)) {}                        // expected-warning {{'uninitialized' attribute only applies to local variables}}
+void answer_right_now(void) __attribute((uninitialized)) {}                        // expected-warning {{'uninitialized' attribute only applies to local variables}}
 void just_to_tell_you_once_again(__attribute((uninitialized)) int whos_bad) {} // expected-warning {{'uninitialized' attribute only applies to local variables}}
 
 struct TheWordIsOut {

diff  --git a/clang/test/Sema/attr-unknown.c b/clang/test/Sema/attr-unknown.c
index d1a831d6bae90..ebb52c2c3e48f 100644
--- a/clang/test/Sema/attr-unknown.c
+++ b/clang/test/Sema/attr-unknown.c
@@ -1,4 +1,4 @@
 // RUN: %clang_cc1 -fsyntax-only -verify -Wattributes %s
 
 int x __attribute__((foobar)); // expected-warning {{unknown attribute 'foobar' ignored}}
-void z() __attribute__((bogusattr)); // expected-warning {{unknown attribute 'bogusattr' ignored}}
+void z(void) __attribute__((bogusattr)); // expected-warning {{unknown attribute 'bogusattr' ignored}}

diff  --git a/clang/test/Sema/attr-used.c b/clang/test/Sema/attr-used.c
index f5baf06b0d5be..a3414c956beb3 100644
--- a/clang/test/Sema/attr-used.c
+++ b/clang/test/Sema/attr-used.c
@@ -12,7 +12,7 @@ int a __attribute__((used));
 static void __attribute__((used)) f0(void) {
 }
 
-void f1() {
+void f1(void) {
   static int a __attribute__((used));
   int b __attribute__((used)); // expected-warning {{'used' attribute only applies to variables with non-local storage, functions, and Objective-C methods}}
 }

diff  --git a/clang/test/Sema/attr-visibility.c b/clang/test/Sema/attr-visibility.c
index 798d6dcd78fce..381db6d5f08cb 100644
--- a/clang/test/Sema/attr-visibility.c
+++ b/clang/test/Sema/attr-visibility.c
@@ -1,11 +1,11 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
 
-void test0() __attribute__((visibility("default")));
-void test1() __attribute__((visibility("hidden")));
-void test2() __attribute__((visibility("internal")));
+void test0(void) __attribute__((visibility("default")));
+void test1(void) __attribute__((visibility("hidden")));
+void test2(void) __attribute__((visibility("internal")));
 
 // rdar://problem/10753392
-void test3() __attribute__((visibility("protected"))); // expected-warning {{target does not support 'protected' visibility; using 'default'}}
+void test3(void) __attribute__((visibility("protected"))); // expected-warning {{target does not support 'protected' visibility; using 'default'}}
 
 struct __attribute__((visibility("hidden"))) test4; // expected-note {{previous attribute is here}}
 struct test4;
@@ -15,7 +15,7 @@ struct test5;
 struct __attribute__((visibility("hidden"))) test5; // expected-note {{previous attribute is here}}
 struct __attribute__((visibility("default"))) test5; // expected-error {{visibility does not match previous declaration}}
 
-void test6() __attribute__((visibility("default"), // expected-error {{visibility does not match previous declaration}}
+void test6(void) __attribute__((visibility("default"), // expected-error {{visibility does not match previous declaration}}
                             visibility("hidden"))); // expected-note {{previous attribute is here}}
 
 extern int test7 __attribute__((visibility("default"))); // expected-note {{previous attribute is here}}

diff  --git a/clang/test/Sema/attr-wasm.c b/clang/test/Sema/attr-wasm.c
index dc30ba46ea887..9d380da460888 100644
--- a/clang/test/Sema/attr-wasm.c
+++ b/clang/test/Sema/attr-wasm.c
@@ -1,27 +1,27 @@
 // RUN: %clang_cc1 -triple wasm32-unknown-unknown -fsyntax-only -verify %s
 
-void name_a() __attribute__((import_name)); //expected-error {{'import_name' attribute takes one argument}}
+void name_a(void) __attribute__((import_name)); //expected-error {{'import_name' attribute takes one argument}}
 
 int name_b __attribute__((import_name("foo"))); //expected-error {{'import_name' attribute only applies to functions}}
 
-void name_c() __attribute__((import_name("foo", "bar"))); //expected-error {{'import_name' attribute takes one argument}}
+void name_c(void) __attribute__((import_name("foo", "bar"))); //expected-error {{'import_name' attribute takes one argument}}
 
-void name_d() __attribute__((import_name("foo", "bar", "qux"))); //expected-error {{'import_name' attribute takes one argument}}
+void name_d(void) __attribute__((import_name("foo", "bar", "qux"))); //expected-error {{'import_name' attribute takes one argument}}
 
-void name_z() __attribute__((import_name("foo"))); //expected-note {{previous attribute is here}}
+void name_z(void) __attribute__((import_name("foo"))); //expected-note {{previous attribute is here}}
 
-void name_z() __attribute__((import_name("bar"))); //expected-warning {{import name (bar) does not match the import name (foo) of the previous declaration}}
+void name_z(void) __attribute__((import_name("bar"))); //expected-warning {{import name (bar) does not match the import name (foo) of the previous declaration}}
 
-void module_a() __attribute__((import_module)); //expected-error {{'import_module' attribute takes one argument}}
+void module_a(void) __attribute__((import_module)); //expected-error {{'import_module' attribute takes one argument}}
 
 int module_b __attribute__((import_module("foo"))); //expected-error {{'import_module' attribute only applies to functions}}
 
-void module_c() __attribute__((import_module("foo", "bar"))); //expected-error {{'import_module' attribute takes one argument}}
+void module_c(void) __attribute__((import_module("foo", "bar"))); //expected-error {{'import_module' attribute takes one argument}}
 
-void module_d() __attribute__((import_module("foo", "bar", "qux"))); //expected-error {{'import_module' attribute takes one argument}}
+void module_d(void) __attribute__((import_module("foo", "bar", "qux"))); //expected-error {{'import_module' attribute takes one argument}}
 
-void module_z() __attribute__((import_module("foo"))); //expected-note {{previous attribute is here}}
+void module_z(void) __attribute__((import_module("foo"))); //expected-note {{previous attribute is here}}
 
-void module_z() __attribute__((import_module("bar"))); //expected-warning {{import module (bar) does not match the import module (foo) of the previous declaration}}
+void module_z(void) __attribute__((import_module("bar"))); //expected-warning {{import module (bar) does not match the import module (foo) of the previous declaration}}
 
-void both() __attribute__((import_name("foo"), import_module("bar")));
+void both(void) __attribute__((import_name("foo"), import_module("bar")));

diff  --git a/clang/test/Sema/attr-weak.c b/clang/test/Sema/attr-weak.c
index cd818b43a4767..6695fe1d3f660 100644
--- a/clang/test/Sema/attr-weak.c
+++ b/clang/test/Sema/attr-weak.c
@@ -1,9 +1,9 @@
 // RUN: %clang_cc1 -verify -fsyntax-only %s
 
-extern int f0() __attribute__((weak));
+extern int f0(void) __attribute__((weak));
 extern int g0 __attribute__((weak));
 extern int g1 __attribute__((weak_import));
-int f2() __attribute__((weak));
+int f2(void) __attribute__((weak));
 int g2 __attribute__((weak));
 int g3 __attribute__((weak_import)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}}
 int __attribute__((weak_import)) g4(void);
@@ -13,7 +13,7 @@ void __attribute__((weak_import)) g5(void) {
 struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variables, functions, and classes}}
 struct __attribute__((weak_import)) s1 {}; // expected-warning {{'weak_import' attribute only applies to variables and functions}}
 
-static int f() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
+static int f(void) __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
 static int x __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
 
 // rdar://9538608
@@ -23,5 +23,5 @@ extern int C __attribute__((weak_import)); // expected-warning {{an already-decl
 static int pr14946_x;
 extern int pr14946_x  __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
 
-static void pr14946_f();
-void pr14946_f() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
+static void pr14946_f(void);
+void pr14946_f(void) __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}

diff  --git a/clang/test/Sema/avr-interrupt-attr.c b/clang/test/Sema/avr-interrupt-attr.c
index 2dfc72a354da3..7aee7babcbe16 100644
--- a/clang/test/Sema/avr-interrupt-attr.c
+++ b/clang/test/Sema/avr-interrupt-attr.c
@@ -5,4 +5,4 @@ struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attr
 
 __attribute__((interrupt(12))) void foo(void) { } // expected-error {{'interrupt' attribute takes no arguments}}
 
-__attribute__((interrupt)) void food() {}
+__attribute__((interrupt)) void food(void) {}

diff  --git a/clang/test/Sema/avr-signal-attr.c b/clang/test/Sema/avr-signal-attr.c
index a5920bf4045c6..1ec36c74a25eb 100644
--- a/clang/test/Sema/avr-signal-attr.c
+++ b/clang/test/Sema/avr-signal-attr.c
@@ -5,4 +5,4 @@ struct a test __attribute__((signal)); // expected-warning {{'signal' attribute
 
 __attribute__((signal(12))) void foo(void) { } // expected-error {{'signal' attribute takes no arguments}}
 
-__attribute__((signal)) void food() {}
+__attribute__((signal)) void food(void) {}

diff  --git a/clang/test/Sema/block-args.c b/clang/test/Sema/block-args.c
index 99e3220d5ac36..245b2c02b8067 100644
--- a/clang/test/Sema/block-args.c
+++ b/clang/test/Sema/block-args.c
@@ -2,7 +2,7 @@
 
 void take(void*);
 
-void test() {
+void test(void) {
   take(^(int x){});
   take(^(int x, int y){});
   take(^(int x, int y){});
@@ -30,14 +30,14 @@ int main(int argc, char** argv) {
 }
 
 // radar 7528255
-void f0() {
+void f0(void) {
   ^(int, double d, char) {}(1, 1.34, 'a'); // expected-warning {{omitting the parameter name in a function definition is a C2x extension}} \
                                            // expected-warning {{omitting the parameter name in a function definition is a C2x extension}}
 }
 
 // rdar://problem/8962770
-void test4() {
-  int (^f)() = ^((x)) { }; // expected-warning {{type specifier missing}} expected-error {{type-id cannot have a name}}
+void test4(void) {
+  int (^f)(void) = ^((x)) { }; // expected-warning {{type specifier missing}} expected-error {{type-id cannot have a name}}
 }
 
 // rdar://problem/9170609

diff  --git a/clang/test/Sema/block-explicit-noreturn-type.c b/clang/test/Sema/block-explicit-noreturn-type.c
index 12f4f4f3401fc..9b38043420b66 100644
--- a/clang/test/Sema/block-explicit-noreturn-type.c
+++ b/clang/test/Sema/block-explicit-noreturn-type.c
@@ -3,7 +3,7 @@
 
 typedef short SHORT;
 
-void f0() {
+void f0(void) {
   (void) ^{
     if (1)
       return (float)1.0;

diff  --git a/clang/test/Sema/block-labels.c b/clang/test/Sema/block-labels.c
index d1b60cc7d31f1..e12321d75bae8 100644
--- a/clang/test/Sema/block-labels.c
+++ b/clang/test/Sema/block-labels.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only
 
-void xx();
+void xx(void);
 
-int a() { 
+int a(void) { 
   A:
   
   if (1) xx();
@@ -10,15 +10,15 @@ int a() {
          A: return 1;
        }();
 }
-int b() { 
+int b(void) { 
   A: return ^{int a; A:return 1;}();
 }
 
-int d() { 
+int d(void) { 
   A: return ^{int a; A: a = ^{int a; A:return 1;}() + ^{int b; A:return 2;}(); return a; }();
 }
 
-int c() { 
+int c(void) { 
   goto A;     // expected-error {{use of undeclared label 'A'}}
   return ^{
        A:

diff  --git a/clang/test/Sema/block-literal.c b/clang/test/Sema/block-literal.c
index c303b8417d942..d1607cec098c5 100644
--- a/clang/test/Sema/block-literal.c
+++ b/clang/test/Sema/block-literal.c
@@ -3,7 +3,7 @@
 void I( void (^)(void));
 void (^noop)(void);
 
-void nothing();
+void nothing(void);
 int printf(const char*, ...);
 
 typedef void (^T) (void);
@@ -11,7 +11,7 @@ typedef void (^T) (void);
 void takeblock(T);
 int takeintint(int (^C)(int)) { return C(4); }
 
-T somefunction() {
+T somefunction(void) {
   if (^{ })
     nothing();
 
@@ -23,7 +23,7 @@ T somefunction() {
 
   return ^{printf("\nClosure\n"); };
 }
-void test2() {
+void test2(void) {
   int x = 4;
 
   takeblock(^{ printf("%d\n", x); });
@@ -46,20 +46,20 @@ void test2() {
 }
 
 
-void (^test3())(void) { 
+void (^test3(void))(void) { 
   return ^{};
 }
 
-void test4() {
+void test4(void) {
   void (^noop)(void) = ^{};
-  void (*noop2)() = 0;
+  void (*noop2)(void) = 0;
 }
 
 void myfunc(int (^block)(int)) {}
 
 void myfunc3(const int *x);
 
-void test5() {
+void test5(void) {
   int a;
 
   myfunc(^(int abcd) {
@@ -70,7 +70,7 @@ void test5() {
 
 void *X;
 
-void test_arguments() {
+void test_arguments(void) {
   int y;
   int (^c)(char);
   (1 ? c : 0)('x');

diff  --git a/clang/test/Sema/block-printf-attribute-1.c b/clang/test/Sema/block-printf-attribute-1.c
index dd678a5439c53..7652fab4095f0 100644
--- a/clang/test/Sema/block-printf-attribute-1.c
+++ b/clang/test/Sema/block-printf-attribute-1.c
@@ -2,7 +2,7 @@
 
 #include <stdarg.h>
 
-int main() {
+int main(void) {
   void (^b) (int arg, const char * format, ...) __attribute__ ((__format__ (__printf__, 1, 3))) =   // expected-error {{format argument not a string type}}
     ^ __attribute__ ((__format__ (__printf__, 1, 3))) (int arg, const char * format, ...) {}; // expected-error {{format argument not a string type}}
  

diff  --git a/clang/test/Sema/block-return-1.c b/clang/test/Sema/block-return-1.c
index ddb70e2ef643e..4b77f5a5ca68b 100644
--- a/clang/test/Sema/block-return-1.c
+++ b/clang/test/Sema/block-return-1.c
@@ -1,6 +1,6 @@
 // RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
 
 int j;
-void foo() {
+void foo(void) {
   ^ (void) { if (j) return 1; }(); // expected-error {{non-void block does not return a value in all control paths}}
 }

diff  --git a/clang/test/Sema/block-return-2.c b/clang/test/Sema/block-return-2.c
index d5fbc6f70c5dd..8e7bb95c86656 100644
--- a/clang/test/Sema/block-return-2.c
+++ b/clang/test/Sema/block-return-2.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
 
-void foo() {
+void foo(void) {
   ^ (void) __attribute__((noreturn)) { }(); // expected-error {{block declared 'noreturn' should not return}}
 }

diff  --git a/clang/test/Sema/block-return-3.c b/clang/test/Sema/block-return-3.c
index 7f955b76dba87..fd62908887135 100644
--- a/clang/test/Sema/block-return-3.c
+++ b/clang/test/Sema/block-return-3.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only %s -verify -fblocks
 
-void foo() {
+void foo(void) {
   ^ int (void) { }(); // expected-error {{non-void block does not return a value}}
 }

diff  --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c
index a51446aaa1e10..1ad76dcd672fc 100644
--- a/clang/test/Sema/block-return.c
+++ b/clang/test/Sema/block-return.c
@@ -2,7 +2,7 @@
 
 typedef void (^CL)(void);
 
-CL foo() {
+CL foo(void) {
   short y;
   short (^add1)(void) = ^{ return y+1; }; // expected-error {{incompatible block pointer types initializing 'short (^)(void)' with an expression of type 'int (^)(void)'}}
 
@@ -46,7 +46,7 @@ CL foo() {
 
 typedef int (^CL2)(void);
 
-CL2 foo2() {
+CL2 foo2(void) {
   return ^{ return 1; };
 }
 
@@ -60,7 +60,7 @@ typedef struct {
     Boolean (^isEqual)(const CFBasicHash *, uintptr_t stack_value_or_key1, uintptr_t stack_value_or_key2, Boolean is_key);
 } CFBasicHashCallbacks;
 
-int foo3() {
+int foo3(void) {
     CFBasicHashCallbacks cb;
     
     Boolean (*value_equal)(uintptr_t, uintptr_t) = 0;
@@ -76,8 +76,8 @@ static int funk(char *s) {
   else 
     return 0;
 }
-void next();
-void foo4() {
+void next(void);
+void foo4(void) {
   int (^xx)(const char *s) = ^(char *s) { return 1; }; // expected-error {{incompatible block pointer types initializing 'int (^)(const char *)' with an expression of type 'int (^)(char *)'}}
   int (*yy)(const char *s) = funk; // expected-warning {{incompatible function pointer types initializing 'int (*)(const char *)' with an expression of type 'int (char *)'}}
   
@@ -100,7 +100,7 @@ int (*funcptr3[5])(long);
 int sz8 = sizeof(^int (*[5])(long) {return funcptr3;}); // expected-error {{block cannot return array type}} expected-warning {{incompatible pointer to integer conversion}}
 int sz9 = sizeof(^int(*())()[3]{ }); // expected-error {{function cannot return array type}}
 
-void foo6() {
+void foo6(void) {
   int (^b)(int) __attribute__((noreturn));
   b = ^ (int i) __attribute__((noreturn)) { return 1; };  // expected-error {{block declared 'noreturn' should not return}}
   b(1);
@@ -108,7 +108,7 @@ void foo6() {
 }
 
 
-void foo7()
+void foo7(void)
 {
  const int (^BB) (void) = ^{ const int i = 1; return i; }; // OK - initializing 'const int (^)(void)' with an expression of type 'int (^)(void)'
 

diff  --git a/clang/test/Sema/block-sentinel-attribute.c b/clang/test/Sema/block-sentinel-attribute.c
index daf0a95531440..9d024e488329c 100644
--- a/clang/test/Sema/block-sentinel-attribute.c
+++ b/clang/test/Sema/block-sentinel-attribute.c
@@ -2,7 +2,7 @@
 
 void (^e) (int arg, const char * format, ...) __attribute__ ((__sentinel__ (1,1)));
 
-int main() {
+int main(void) {
   void (^bbad) (int arg, const char * format) __attribute__ ((__sentinel__)) ; // expected-warning {{'sentinel' attribute only supported for variadic blocks}}
   bbad = ^void (int arg, const char * format) __attribute__ ((__sentinel__)) {} ; // expected-warning {{'sentinel' attribute only supported for variadic blocks}}
   void (^b) (int arg, const char * format, ...) __attribute__ ((__sentinel__)) =  // expected-note {{block has been explicitly marked sentinel here}}

diff  --git a/clang/test/Sema/block-storageclass.c b/clang/test/Sema/block-storageclass.c
index 74f1b0ea77fad..eb7c985dbf5bb 100644
--- a/clang/test/Sema/block-storageclass.c
+++ b/clang/test/Sema/block-storageclass.c
@@ -4,7 +4,7 @@
 int printf(const char *, ...);
 void _Block_byref_release(void*src){}
 
-int main() {
+int main(void) {
    __block  int X = 1234;
    __block  const char * message = "HELLO";
 

diff  --git a/clang/test/Sema/bpf-attr-preserve-access-index.c b/clang/test/Sema/bpf-attr-preserve-access-index.c
index d6e97cfc2268e..34b8c917febf5 100644
--- a/clang/test/Sema/bpf-attr-preserve-access-index.c
+++ b/clang/test/Sema/bpf-attr-preserve-access-index.c
@@ -40,7 +40,7 @@ int a __reloc__; // expected-error {{'preserve_access_index' attribute only appl
 struct s *p __reloc__; // expected-error {{'preserve_access_index' attribute only applies to structs, unions, and classes}}
 
 void invalid1(const int __reloc__ *arg) {} // expected-error {{'preserve_access_index' attribute only applies to structs, unions, and classes}}
-void invalid2() { const int __reloc__ *arg; } // expected-error {{'preserve_access_index' attribute only applies to structs, unions, and classes}}
+void invalid2(void) { const int __reloc__ *arg; } // expected-error {{'preserve_access_index' attribute only applies to structs, unions, and classes}}
 int valid3(struct t4 *arg) { return arg->a + arg->b[3] + arg->c + arg->d; }
 int valid4(void *arg) {
   struct local_t { int a; int b; } __reloc__;


        


More information about the cfe-commits mailing list