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

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


Author: Aaron Ballman
Date: 2022-02-10T16:06:03-05:00
New Revision: e9e55acd1ba33311e13e690f8db129b3a624dbd0

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

Added: 
    

Modified: 
    clang/test/Modules/Inputs/AutolinkTBD.framework/Headers/AutolinkTBD.h
    clang/test/Modules/Inputs/at-import-in-framework-header/A.framework/Headers/A.h
    clang/test/Modules/Inputs/config.h
    clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h
    clang/test/Modules/Inputs/framework-public-includes-private/A.framework/Headers/A.h
    clang/test/Modules/Inputs/pch-used.h
    clang/test/Modules/Inputs/subdir/subdir.h
    clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/h1.h
    clang/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
    clang/test/Modules/at-import-in-framework-header.m
    clang/test/Modules/auto-module-import.m
    clang/test/Modules/autolink.m
    clang/test/Modules/autolinkTBD.m
    clang/test/Modules/builtins.m
    clang/test/Modules/config_macros.m
    clang/test/Modules/cstd.m
    clang/test/Modules/decldef.m
    clang/test/Modules/diagnose-missing-import.m
    clang/test/Modules/double-quotes.m
    clang/test/Modules/extern_c.cpp
    clang/test/Modules/framework-public-includes-private.m
    clang/test/Modules/global_index.m
    clang/test/Modules/import-decl.cpp
    clang/test/Modules/include-relative.c
    clang/test/Modules/inferred-submodules.m
    clang/test/Modules/macros.c
    clang/test/Modules/macros2.c
    clang/test/Modules/merge-fn-prototype-tags.c
    clang/test/Modules/missing-submodule.m
    clang/test/Modules/module-imported-by-pch-with-modulemap.m
    clang/test/Modules/module-name-private.m
    clang/test/Modules/modulemap-locations.m
    clang/test/Modules/non-ambiguous-enum.m
    clang/test/Modules/normal-module-map.cpp
    clang/test/Modules/objc-initializer.m
    clang/test/Modules/on-demand-build.m
    clang/test/Modules/on-demand-macros.m
    clang/test/Modules/pch-used.m
    clang/test/Modules/prebuilt-implicit-modules.m
    clang/test/Modules/prebuilt-module.m
    clang/test/Modules/redecl-merge.m
    clang/test/Modules/renamed.m
    clang/test/Modules/stddef.m
    clang/test/Modules/subdirectory-module-maps-working-dir.m
    clang/test/Modules/subframeworks.m
    clang/test/Modules/submodules.m
    clang/test/Modules/typo.m
    clang/test/Modules/working-dir-flag.m
    clang/test/OpenMP/PR44893.c
    clang/test/OpenMP/atomic_capture_codegen.cpp
    clang/test/OpenMP/atomic_messages.c
    clang/test/OpenMP/atomic_read_codegen.c
    clang/test/OpenMP/atomic_update_codegen.cpp
    clang/test/OpenMP/atomic_write_codegen.c
    clang/test/OpenMP/begin_declare_variant_range_withouth_end.c
    clang/test/OpenMP/declare_mapper_ast_print.c
    clang/test/OpenMP/declare_reduction_ast_print.c
    clang/test/OpenMP/declare_reduction_codegen.c
    clang/test/OpenMP/declare_variant_ast_x86_64.c
    clang/test/OpenMP/declare_variant_construct_codegen_1.c
    clang/test/OpenMP/declare_variant_messages.c
    clang/test/OpenMP/depend_iterator_bug.c
    clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
    clang/test/OpenMP/distribute_simd_misc_messages.c
    clang/test/OpenMP/fopenmp-extensions.c
    clang/test/OpenMP/for_misc_messages.c
    clang/test/OpenMP/for_simd_misc_messages.c
    clang/test/OpenMP/master_taskloop_misc_messages.c
    clang/test/OpenMP/master_taskloop_simd_misc_messages.c
    clang/test/OpenMP/metadirective_device_kind_codegen.c
    clang/test/OpenMP/metadirective_implementation_codegen.c
    clang/test/OpenMP/nvptx_target_printf_codegen.c
    clang/test/OpenMP/openmp_common.c
    clang/test/OpenMP/openmp_offload_registration.cpp
    clang/test/OpenMP/ordered_doacross_codegen.c
    clang/test/OpenMP/parallel_for_misc_messages.c
    clang/test/OpenMP/parallel_for_simd_misc_messages.c
    clang/test/OpenMP/parallel_master_taskloop_misc_messages.c
    clang/test/OpenMP/parallel_master_taskloop_simd_misc_messages.c
    clang/test/OpenMP/parallel_sections_misc_messages.c
    clang/test/OpenMP/sections_misc_messages.c
    clang/test/OpenMP/simd_misc_messages.c
    clang/test/OpenMP/single_misc_messages.c
    clang/test/OpenMP/target_data_messages.c
    clang/test/OpenMP/target_parallel_for_misc_messages.c
    clang/test/OpenMP/target_parallel_for_simd_misc_messages.c
    clang/test/OpenMP/target_simd_misc_messages.c
    clang/test/OpenMP/target_teams_distribute_misc_messages.c
    clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
    clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
    clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c
    clang/test/OpenMP/target_uses_allocators.c
    clang/test/OpenMP/task_codegen.c
    clang/test/OpenMP/task_target_device_codegen.c
    clang/test/OpenMP/taskloop_misc_messages.c
    clang/test/OpenMP/taskloop_simd_misc_messages.c
    clang/test/OpenMP/vla_crash.c
    clang/test/PCH/Inputs/arc.h
    clang/test/PCH/Inputs/chain-decls1.h
    clang/test/PCH/Inputs/chain-decls2.h
    clang/test/PCH/Inputs/chain-macro-override1.h
    clang/test/PCH/Inputs/chain-macro-override2.h
    clang/test/PCH/Inputs/chain-macro1.h
    clang/test/PCH/Inputs/chain-macro2.h
    clang/test/PCH/Inputs/chain-selectors1.h
    clang/test/PCH/Inputs/chain-selectors2.h
    clang/test/PCH/asm.h
    clang/test/PCH/attrs-PR8406.c
    clang/test/PCH/attrs.c
    clang/test/PCH/builtins.c
    clang/test/PCH/chain-decls.c
    clang/test/PCH/chain-macro-override.c
    clang/test/PCH/chain-selectors.m
    clang/test/PCH/debug-info-limited-struct.h

Removed: 
    


################################################################################
diff  --git a/clang/test/Modules/Inputs/AutolinkTBD.framework/Headers/AutolinkTBD.h b/clang/test/Modules/Inputs/AutolinkTBD.framework/Headers/AutolinkTBD.h
index cf790ac3eabd5..914983c49636c 100644
--- a/clang/test/Modules/Inputs/AutolinkTBD.framework/Headers/AutolinkTBD.h
+++ b/clang/test/Modules/Inputs/AutolinkTBD.framework/Headers/AutolinkTBD.h
@@ -1 +1 @@
-extern int foo();
+extern int foo(void);

diff  --git a/clang/test/Modules/Inputs/at-import-in-framework-header/A.framework/Headers/A.h b/clang/test/Modules/Inputs/at-import-in-framework-header/A.framework/Headers/A.h
index 6949a872fc99e..c6f47d3b4735a 100644
--- a/clang/test/Modules/Inputs/at-import-in-framework-header/A.framework/Headers/A.h
+++ b/clang/test/Modules/Inputs/at-import-in-framework-header/A.framework/Headers/A.h
@@ -1,2 +1,2 @@
 @import B;
-int foo();
+int foo(void);

diff  --git a/clang/test/Modules/Inputs/config.h b/clang/test/Modules/Inputs/config.h
index f2dfda64c3de5..4c124b0bf82b7 100644
--- a/clang/test/Modules/Inputs/config.h
+++ b/clang/test/Modules/Inputs/config.h
@@ -1,7 +1,7 @@
 #ifdef WANT_FOO
-int* foo();
+int* foo(void);
 #endif
 
 #ifdef WANT_BAR
-char *bar();
+char *bar(void);
 #endif

diff  --git a/clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h b/clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h
index 17ceb83bb9ca8..254246af0e789 100644
--- a/clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h
+++ b/clang/test/Modules/Inputs/double-quotes/A.framework/Headers/A.h
@@ -3,4 +3,4 @@
 
 #include "X.h"
 
-int foo();
+int foo(void);

diff  --git a/clang/test/Modules/Inputs/framework-public-includes-private/A.framework/Headers/A.h b/clang/test/Modules/Inputs/framework-public-includes-private/A.framework/Headers/A.h
index 03bd90b4945a4..2ce0a18aa067d 100644
--- a/clang/test/Modules/Inputs/framework-public-includes-private/A.framework/Headers/A.h
+++ b/clang/test/Modules/Inputs/framework-public-includes-private/A.framework/Headers/A.h
@@ -1,4 +1,4 @@
 #include <A/APriv.h>
 #include "APriv2.h"
 #include <Z/Z.h>
-int foo();
+int foo(void);

diff  --git a/clang/test/Modules/Inputs/pch-used.h b/clang/test/Modules/Inputs/pch-used.h
index bc53bb37a9df3..c458e8d834bdd 100644
--- a/clang/test/Modules/Inputs/pch-used.h
+++ b/clang/test/Modules/Inputs/pch-used.h
@@ -1,3 +1,3 @@
 @import cstd.stdio;
 @import other_constants.dbl_max;
-static inline void SPXTrace() { fprintf(__stderrp, ""); }
+static inline void SPXTrace(void) { fprintf(__stderrp, ""); }

diff  --git a/clang/test/Modules/Inputs/subdir/subdir.h b/clang/test/Modules/Inputs/subdir/subdir.h
index 0fb3d217ce9fc..a7514eebf2ebd 100644
--- a/clang/test/Modules/Inputs/subdir/subdir.h
+++ b/clang/test/Modules/Inputs/subdir/subdir.h
@@ -1 +1 @@
-const char *getSubdir();
+const char *getSubdir(void);

diff  --git a/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/h1.h b/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/h1.h
index c362dd03f048e..a0e75ca6d3b2a 100644
--- a/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/h1.h
+++ b/clang/test/Modules/Inputs/subdirectory-module-maps-working-dir/subdir_module/h1.h
@@ -1 +1 @@
-int bar();
+int bar(void);

diff  --git a/clang/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h b/clang/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
index 56757a701bf5c..cf35262b9ef04 100644
--- a/clang/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
+++ b/clang/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
@@ -1 +1 @@
-void f() {}
+void f(void) {}

diff  --git a/clang/test/Modules/at-import-in-framework-header.m b/clang/test/Modules/at-import-in-framework-header.m
index 043c69462edf3..e0b77cd0828fd 100644
--- a/clang/test/Modules/at-import-in-framework-header.m
+++ b/clang/test/Modules/at-import-in-framework-header.m
@@ -11,5 +11,5 @@
 
 #import <A/A.h>
 
-int bar() { return foo(); }
+int bar(void) { return foo(); }
 

diff  --git a/clang/test/Modules/auto-module-import.m b/clang/test/Modules/auto-module-import.m
index 7b90e867d4370..defcc184ed985 100644
--- a/clang/test/Modules/auto-module-import.m
+++ b/clang/test/Modules/auto-module-import.m
@@ -24,9 +24,9 @@
 #endif
 Module *mod2;
 
-int getDependsOther() { return depends_on_module_other; }
+int getDependsOther(void) { return depends_on_module_other; }
 
-void testSubframeworkOther() {
+void testSubframeworkOther(void) {
 #ifdef ERRORS
   double *sfo1 = sub_framework_other; // expected-error{{declaration of 'sub_framework_other' must be imported from module 'DependsOnModule.SubFramework.Other'}}
   // expected-note at Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/Other.h:15 {{not visible}}
@@ -35,44 +35,44 @@ void testSubframeworkOther() {
 
 // Test umbrella-less submodule includes
 #include <NoUmbrella/A.h> // expected-warning{{treating #include as an import of module 'NoUmbrella.A'}}
-int getNoUmbrellaA() { return no_umbrella_A; } 
+int getNoUmbrellaA(void) { return no_umbrella_A; } 
 
 // Test umbrella-less submodule includes
 #include <NoUmbrella/SubDir/C.h> // expected-warning{{treating #include as an import of module 'NoUmbrella.SubDir.C'}}
-int getNoUmbrellaC() { return no_umbrella_C; } 
+int getNoUmbrellaC(void) { return no_umbrella_C; } 
 
 #ifndef ERRORS
 // Test header cross-subframework include pattern.
 #include <DependsOnModule/../Frameworks/SubFramework.framework/Headers/Other.h> // expected-warning{{treating #include as an import of module 'DependsOnModule.SubFramework.Other'}}
 #endif
 
-void testSubframeworkOtherAgain() {
+void testSubframeworkOtherAgain(void) {
   double *sfo1 = sub_framework_other;
 }
 
-void testModuleSubFramework() {
+void testModuleSubFramework(void) {
   char *msf = module_subframework;
 }
 
 #include <Module/../Frameworks/SubFramework.framework/Headers/SubFramework.h> // expected-warning{{treating #include as an import of module 'Module.SubFramework'}}
 
-void testModuleSubFrameworkAgain() {
+void testModuleSubFrameworkAgain(void) {
   char *msf = module_subframework;
 }
 
 // Test inclusion of private headers.
 #include <DependsOnModule/DependsOnModulePrivate.h> // expected-warning{{treating #include as an import of module 'DependsOnModule.Private.DependsOnModule'}}
 
-int getDependsOnModulePrivate() { return depends_on_module_private; }
+int getDependsOnModulePrivate(void) { return depends_on_module_private; }
 
 #include <Module/ModulePrivate.h> // includes the header
 
-int getModulePrivate() { return module_private; }
+int getModulePrivate(void) { return module_private; }
 
 #include <NoUmbrella/A_Private.h> // expected-warning{{treating #include as an import of module 'NoUmbrella.Private.A_Private'}}
-int getNoUmbrellaAPrivate() { return no_umbrella_A_private; }
+int getNoUmbrellaAPrivate(void) { return no_umbrella_A_private; }
 
-int getNoUmbrellaBPrivateFail() { return no_umbrella_B_private; } // expected-error{{declaration of 'no_umbrella_B_private' must be imported from module 'NoUmbrella.Private.B_Private'}}
+int getNoUmbrellaBPrivateFail(void) { return no_umbrella_B_private; } // expected-error{{declaration of 'no_umbrella_B_private' must be imported from module 'NoUmbrella.Private.B_Private'}}
 // expected-note at Inputs/NoUmbrella.framework/PrivateHeaders/B_Private.h:1 {{not visible}}
 
 // Test inclusion of headers that are under an umbrella directory but
@@ -80,11 +80,11 @@ void testModuleSubFrameworkAgain() {
 #include <Module/NotInModule.h> // expected-warning{{treating #include as an import of module 'Module.NotInModule'}} \
   // expected-warning{{missing submodule 'Module.NotInModule'}}
 
-int getNotInModule() {
+int getNotInModule(void) {
   return not_in_module;
 }
 
-void includeNotAtTopLevel() { // expected-note {{function 'includeNotAtTopLevel' begins here}}
+void includeNotAtTopLevel(void) { // expected-note {{function 'includeNotAtTopLevel' begins here}}
   #include <NoUmbrella/A.h> // expected-warning {{treating #include as an import}} \
 			       expected-error {{redundant #include of module 'NoUmbrella.A' appears within function 'includeNotAtTopLevel'}}
 }

diff  --git a/clang/test/Modules/autolink.m b/clang/test/Modules/autolink.m
index e760606dc00ef..1358f7dbd3a4e 100644
--- a/clang/test/Modules/autolink.m
+++ b/clang/test/Modules/autolink.m
@@ -6,32 +6,32 @@
 
 @import autolink.sub2;
 
-int f() {
+int f(void) {
   return autolink_sub2();
 }
 
 @import autolink;
 
-int g() {
+int g(void) {
   return autolink;
 }
 
 @import Module.SubFramework;
-const char *get_module_subframework() {
+const char *get_module_subframework(void) {
   return module_subframework;
 }
 
 @import DependsOnModule.SubFramework;
-float *get_module_subframework_dep() {
+float *get_module_subframework_dep(void) {
   return sub_framework;
 }
 
 @import NoUmbrella;
-int use_no_umbrella() {
+int use_no_umbrella(void) {
   return no_umbrella_A;
 }
 
-int use_autolink_sub3() {
+int use_autolink_sub3(void) {
   return autolink_sub3();
 }
 

diff  --git a/clang/test/Modules/autolinkTBD.m b/clang/test/Modules/autolinkTBD.m
index 1ec8992673dbd..e1dca615c71a8 100644
--- a/clang/test/Modules/autolinkTBD.m
+++ b/clang/test/Modules/autolinkTBD.m
@@ -5,7 +5,7 @@
 
 @import AutolinkTBD;
 
-int f() {
+int f(void) {
   return foo();
 }
 

diff  --git a/clang/test/Modules/builtins.m b/clang/test/Modules/builtins.m
index 7600d129c5114..a180c08eb9d65 100644
--- a/clang/test/Modules/builtins.m
+++ b/clang/test/Modules/builtins.m
@@ -17,17 +17,17 @@ void use_constant_string_builtins1(void) {
 
 #include "builtin.h"
 
-int foo() {
+int foo(void) {
   return __builtin_object_size(p, 0);
 }
 
 #include "builtin_sub.h"
 
-int bar() {
+int bar(void) {
   return __builtin_object_size(p, 0);
 }
 
-int baz() {
+int baz(void) {
   return IS_CONST(0);
 }
 

diff  --git a/clang/test/Modules/config_macros.m b/clang/test/Modules/config_macros.m
index 5c54ba97a17bd..94f9e602d2c5b 100644
--- a/clang/test/Modules/config_macros.m
+++ b/clang/test/Modules/config_macros.m
@@ -1,10 +1,10 @@
 @import config;
 
-int *test_foo() {
+int *test_foo(void) {
   return foo();
 }
 
-char *test_bar() {
+char *test_bar(void) {
   return bar(); // expected-warning{{implicit declaration of function 'bar' is invalid in C99}} \
                 // expected-warning{{incompatible integer to pointer conversion}}
 }

diff  --git a/clang/test/Modules/cstd.m b/clang/test/Modules/cstd.m
index 2182140d5db0a..f07ad85ec5126 100644
--- a/clang/test/Modules/cstd.m
+++ b/clang/test/Modules/cstd.m
@@ -7,7 +7,7 @@
 // Supplied by compiler, but referenced from the "/usr/include" module map.
 @import cstd.float_constants;
 
-float getFltMax() { return FLT_MAX; }
+float getFltMax(void) { return FLT_MAX; }
 
 // Supplied by the "/usr/include" module map.
 @import cstd.stdio;

diff  --git a/clang/test/Modules/decldef.m b/clang/test/Modules/decldef.m
index 1fb9bdf584554..fa23a0347b80e 100644
--- a/clang/test/Modules/decldef.m
+++ b/clang/test/Modules/decldef.m
@@ -30,10 +30,10 @@ void testA(A *a) {
 #endif
 }
 
-void testB() {
+void testB(void) {
   B b; // Note: redundant error silenced
 }
 
-void testDef() {
+void testDef(void) {
   [def defMethod];
 }

diff  --git a/clang/test/Modules/diagnose-missing-import.m b/clang/test/Modules/diagnose-missing-import.m
index 2c67e01944a9b..56fe0eae5f11b 100644
--- a/clang/test/Modules/diagnose-missing-import.m
+++ b/clang/test/Modules/diagnose-missing-import.m
@@ -4,7 +4,7 @@
 // RUN:   -fimplicit-module-maps -verify %s
 @import NCI;
 
-void foo() {
+void foo(void) {
   XYZLogEvent(xyzRiskyCloseOpenParam, xyzRiskyCloseOpenParam); // expected-error {{implicit declaration of function 'XYZLogEvent'}} expected-error {{declaration of 'XYZLogEvent' must be imported}} expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}} expected-error {{declaration of 'xyzRiskyCloseOpenParam' must be imported from module 'NCI.A'}}
 }
 

diff  --git a/clang/test/Modules/double-quotes.m b/clang/test/Modules/double-quotes.m
index a8790305b5fa8..b5b4db9911b66 100644
--- a/clang/test/Modules/double-quotes.m
+++ b/clang/test/Modules/double-quotes.m
@@ -42,7 +42,7 @@
 // Make sure we correctly handle paths that resemble frameworks, but aren't.
 #import "NotAFramework/Headers/Headers/Thing1.h"
 
-int bar() { return foo(); }
+int bar(void) { return foo(); }
 
 // expected-warning at Inputs/double-quotes/A.framework/Headers/A.h:1{{double-quoted include "A0.h" in framework header, expected angle-bracketed instead}}
 // expected-warning at Inputs/double-quotes/A.framework/Headers/A.h:2{{double-quoted include "B.h" in framework header, expected angle-bracketed instead}}

diff  --git a/clang/test/Modules/extern_c.cpp b/clang/test/Modules/extern_c.cpp
index c072b7e75ab8b..cc831bd2a089c 100644
--- a/clang/test/Modules/extern_c.cpp
+++ b/clang/test/Modules/extern_c.cpp
@@ -62,7 +62,7 @@ using namespace M;
 #ifdef __cplusplus
 namespace N {
 #endif
-  void g() {
+  void g(void) {
     int k = f();
   }
 

diff  --git a/clang/test/Modules/framework-public-includes-private.m b/clang/test/Modules/framework-public-includes-private.m
index 37c43e9a6390b..f6ddaf42ab856 100644
--- a/clang/test/Modules/framework-public-includes-private.m
+++ b/clang/test/Modules/framework-public-includes-private.m
@@ -28,7 +28,7 @@
 
 #import "A.h"
 
-int bar() { return foo(); }
+int bar(void) { return foo(); }
 
 // expected-warning at Inputs/framework-public-includes-private/A.framework/Headers/A.h:1{{public framework header includes private framework header 'A/APriv.h'}}
 // expected-warning at Inputs/framework-public-includes-private/A.framework/Headers/A.h:2{{public framework header includes private framework header 'A/APriv2.h'}}

diff  --git a/clang/test/Modules/global_index.m b/clang/test/Modules/global_index.m
index e94c69ac3c1cb..da7f9bb5f439d 100644
--- a/clang/test/Modules/global_index.m
+++ b/clang/test/Modules/global_index.m
@@ -14,6 +14,6 @@
 
 // CHECK: *** Global Module Index Statistics:
 
-int *get_sub() {
+int *get_sub(void) {
   return Module_Sub;
 }

diff  --git a/clang/test/Modules/import-decl.cpp b/clang/test/Modules/import-decl.cpp
index 56428b3eba65f..05670d7e5e1a2 100644
--- a/clang/test/Modules/import-decl.cpp
+++ b/clang/test/Modules/import-decl.cpp
@@ -5,7 +5,7 @@
 @import import_decl;
 // CHECK: struct T
 
-int main() {
+int main(void) {
   return 0;
 }
 

diff  --git a/clang/test/Modules/include-relative.c b/clang/test/Modules/include-relative.c
index 84d44cb569ad8..519367fc4caa7 100644
--- a/clang/test/Modules/include-relative.c
+++ b/clang/test/Modules/include-relative.c
@@ -8,4 +8,4 @@
 
 #include "a.h"
 
-int f() { return n; }
+int f(void) { return n; }

diff  --git a/clang/test/Modules/inferred-submodules.m b/clang/test/Modules/inferred-submodules.m
index a0b7d985486ed..3627d81c7c835 100644
--- a/clang/test/Modules/inferred-submodules.m
+++ b/clang/test/Modules/inferred-submodules.m
@@ -4,13 +4,13 @@
 
 @import Module.Sub;
 
-void test_Module_Sub() {
+void test_Module_Sub(void) {
   int *ip = Module_Sub;
 }
 
 @import Module.Buried.Treasure;
 
-void dig() {
+void dig(void) {
   unsigned *up = Buried_Treasure;
 }
 

diff  --git a/clang/test/Modules/macros.c b/clang/test/Modules/macros.c
index 032eea65918a3..1e067ca107ce2 100644
--- a/clang/test/Modules/macros.c
+++ b/clang/test/Modules/macros.c
@@ -43,7 +43,7 @@ DOUBLE *dp = &d;
 
 #__public_macro WIBBLE // expected-error{{no macro named 'WIBBLE'}}
 
-void f() {
+void f(void) {
   // CHECK-PREPROCESSED: int i = INTEGER;
   int i = INTEGER; // the value was exported, the macro was not.
   i += macros; // expanded from __MODULE__ within the 'macros' module.
@@ -95,7 +95,7 @@ INTEGER my_integer = 0;
 #  error TOP_LEFT_UNDEF should not be defined
 #endif
 
-void test1() {
+void test1(void) {
   int i;
   TOP_RIGHT_REDEF *ip = &i;
 }
@@ -120,7 +120,7 @@ void test1() {
 #  error TOP should be visible
 #endif
 
-void test2() {
+void test2(void) {
   int i;
   float f;
   double d;
@@ -134,7 +134,7 @@ void test2() {
 
 #define LEFT_RIGHT_DIFFERENT double // FIXME: expected-warning{{'LEFT_RIGHT_DIFFERENT' macro redefined}}
 
-void test3() {
+void test3(void) {
   double d;
   LEFT_RIGHT_DIFFERENT *dp = &d; // okay
   int x = FN_ADD(1,2);
@@ -146,7 +146,7 @@ void test3() {
 
 @import macros_bottom;
 
-TOP_DEF_RIGHT_UNDEF *TDRUf() { return TDRUp; }
+TOP_DEF_RIGHT_UNDEF *TDRUf(void) { return TDRUp; }
 
 @import macros_right.undef;
 

diff  --git a/clang/test/Modules/macros2.c b/clang/test/Modules/macros2.c
index 7d669d10c2909..82a749bf0881a 100644
--- a/clang/test/Modules/macros2.c
+++ b/clang/test/Modules/macros2.c
@@ -26,7 +26,7 @@ TOP_OTHER_DEF_RIGHT_UNDEF *n0b; // expected-warning{{ambiguous expansion of macr
 #  error TOP_RIGHT_UNDEF should still be defined
 #endif
 
-void test() {
+void test(void) {
   float f;
   TOP_RIGHT_REDEF *fp = &f; // ok, right's definition overrides top's definition
 
@@ -81,6 +81,6 @@ int n3 = TOP_OTHER_DEF_RIGHT_UNDEF; // ok
 
 int top_redef_in_submodules = TOP_REDEF_IN_SUBMODULES;
 @import macros_top.c;
-void test2() {
+void test2(void) {
   int TOP_REDEF_IN_SUBMODULES = top_redef_in_submodules;
 }

diff  --git a/clang/test/Modules/merge-fn-prototype-tags.c b/clang/test/Modules/merge-fn-prototype-tags.c
index f43f1dc49d9ef..86deb051ba517 100644
--- a/clang/test/Modules/merge-fn-prototype-tags.c
+++ b/clang/test/Modules/merge-fn-prototype-tags.c
@@ -3,6 +3,6 @@
 // RUN: %clang_cc1 -fmodules -fmodule-map-file=%S/Inputs/merge-fn-prototype-tags/module.modulemap -fmodules-cache-path=%t -x c -I%S/Inputs/merge-fn-prototype-tags -verify %s
 
 #include "c.h"
-void mmalloc_attach() { struct stat sbuf; }
+void mmalloc_attach(void) { struct stat sbuf; }
 
 // expected-no-diagnostics

diff  --git a/clang/test/Modules/missing-submodule.m b/clang/test/Modules/missing-submodule.m
index 4586ce6762f14..e299c7203b930 100644
--- a/clang/test/Modules/missing-submodule.m
+++ b/clang/test/Modules/missing-submodule.m
@@ -2,6 +2,6 @@
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs %s -verify
 #include <Module/NotInModule.h> // expected-warning{{missing submodule 'Module.NotInModule'}}
 
-int getNotInModule() {
+int getNotInModule(void) {
   return not_in_module;
 }

diff  --git a/clang/test/Modules/module-imported-by-pch-with-modulemap.m b/clang/test/Modules/module-imported-by-pch-with-modulemap.m
index 493034118ad0a..fa363c65b56c6 100644
--- a/clang/test/Modules/module-imported-by-pch-with-modulemap.m
+++ b/clang/test/Modules/module-imported-by-pch-with-modulemap.m
@@ -10,7 +10,7 @@
 
 // expected-no-diagnostics
 
-void test() {
+void test(void) {
   (void)MyModuleVersion; // should be found by implicit import
 }
 

diff  --git a/clang/test/Modules/module-name-private.m b/clang/test/Modules/module-name-private.m
index 33bd3c1075802..4ec278b0a0ea3 100644
--- a/clang/test/Modules/module-name-private.m
+++ b/clang/test/Modules/module-name-private.m
@@ -9,4 +9,4 @@
 #import <A/a.h>
 #import <A/aprivate.h>
 
-int foo() { return APRIVATE; }
+int foo(void) { return APRIVATE; }

diff  --git a/clang/test/Modules/modulemap-locations.m b/clang/test/Modules/modulemap-locations.m
index c99bb14dc718b..1d16853b7740f 100644
--- a/clang/test/Modules/modulemap-locations.m
+++ b/clang/test/Modules/modulemap-locations.m
@@ -10,7 +10,7 @@
 @import Both_F;
 @import Inferred;
 
-void test() {
+void test(void) {
   will_be_found1();
   wont_be_found1(); // expected-warning{{implicit declaration of function 'wont_be_found1' is invalid in C99}}
   will_be_found2();

diff  --git a/clang/test/Modules/non-ambiguous-enum.m b/clang/test/Modules/non-ambiguous-enum.m
index 3400b7aec3e62..cc0e0e49bbf3a 100644
--- a/clang/test/Modules/non-ambiguous-enum.m
+++ b/clang/test/Modules/non-ambiguous-enum.m
@@ -5,6 +5,6 @@
 
 // expected-no-diagnostics
 
-int foo() {
+int foo(void) {
   return MyEnumCst;
 }

diff  --git a/clang/test/Modules/normal-module-map.cpp b/clang/test/Modules/normal-module-map.cpp
index 6b8befb77293a..1f4e3e57d20e8 100644
--- a/clang/test/Modules/normal-module-map.cpp
+++ b/clang/test/Modules/normal-module-map.cpp
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/normal-module-map %s -verify
 #include "Umbrella/umbrella_sub.h"
 
-int getUmbrella() { 
+int getUmbrella(void) { 
   return umbrella + umbrella_sub; 
 }
 
@@ -12,17 +12,17 @@ int getUmbrella() {
 #include "b1.h"
 #include "nested/nested2.h"
 
-int test() {
+int test(void) {
   return a1 + b1 + nested2;
 }
 
 @import nested_umbrella.a;
 
-int testNestedUmbrellaA() {
+int testNestedUmbrellaA(void) {
   return nested_umbrella_a;
 }
 
-int testNestedUmbrellaBFail() {
+int testNestedUmbrellaBFail(void) {
   return nested_umbrella_b;
   // expected-error at -1{{declaration of 'nested_umbrella_b' must be imported from module 'nested_umbrella.b' before it is required}}
   // expected-note at Inputs/normal-module-map/nested_umbrella/b.h:1{{here}}
@@ -30,7 +30,7 @@ int testNestedUmbrellaBFail() {
 
 @import nested_umbrella.b;
 
-int testNestedUmbrellaB() {
+int testNestedUmbrellaB(void) {
   return nested_umbrella_b;
 }
 
@@ -40,6 +40,6 @@ int testNestedUmbrellaB() {
 
 @import nested_umbrella.decltype_;
 
-int testSanitizedName() {
+int testSanitizedName(void) {
   return extra_a + one + decltype_val;
 }

diff  --git a/clang/test/Modules/objc-initializer.m b/clang/test/Modules/objc-initializer.m
index 2635a344dfebc..535ab844d92cc 100644
--- a/clang/test/Modules/objc-initializer.m
+++ b/clang/test/Modules/objc-initializer.m
@@ -11,6 +11,6 @@
 #endif
 
 void test2(const NSString*);
-void test() {
+void test(void) {
   test2(kSimDeviceIOGetInterface);
 }

diff  --git a/clang/test/Modules/on-demand-build.m b/clang/test/Modules/on-demand-build.m
index f84245c0ca781..a81f1746357a7 100644
--- a/clang/test/Modules/on-demand-build.m
+++ b/clang/test/Modules/on-demand-build.m
@@ -8,7 +8,7 @@ @interface OtherClass
 @end
 
 // expected-note at Inputs/Module.framework/Headers/Module.h:17{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}}
-void test_getModuleVersion() {
+void test_getModuleVersion(void) {
   const char *version = getModuleVersion();
   const char *version2 = [Module version];
 
@@ -21,4 +21,4 @@ void test_getModuleVersion() {
 
 @import subdir;
 
-const char *getSubdirTest() { return getSubdir(); }
+const char *getSubdirTest(void) { return getSubdir(); }

diff  --git a/clang/test/Modules/on-demand-macros.m b/clang/test/Modules/on-demand-macros.m
index d179122c1b18d..c33d5ed11e537 100644
--- a/clang/test/Modules/on-demand-macros.m
+++ b/clang/test/Modules/on-demand-macros.m
@@ -5,7 +5,7 @@
 
 @import CmdLine;
 
-void test() {
+void test(void) {
 #ifdef FOO_RETURNS_INT_PTR
   int *ip = foo();
 #else

diff  --git a/clang/test/Modules/pch-used.m b/clang/test/Modules/pch-used.m
index cc0e5dcec52bf..31d358391ce7f 100644
--- a/clang/test/Modules/pch-used.m
+++ b/clang/test/Modules/pch-used.m
@@ -4,7 +4,7 @@
 // RUN: %clang_cc1 -x objective-c-header -emit-pch %S/Inputs/pch-used.h -o %t/pch-used.h.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include
 // RUN: %clang_cc1 %s -include-pch %t/pch-used.h.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 -isystem %S/Inputs/System/usr/include -emit-llvm -o - | FileCheck %s
 
-void f() { SPXTrace(); }
-void g() { double x = DBL_MAX; }
+void f(void) { SPXTrace(); }
+void g(void) { double x = DBL_MAX; }
 
 // CHECK: define internal {{.*}}void @SPXTrace

diff  --git a/clang/test/Modules/prebuilt-implicit-modules.m b/clang/test/Modules/prebuilt-implicit-modules.m
index 1773714f56578..dc4fb55cb17a5 100644
--- a/clang/test/Modules/prebuilt-implicit-modules.m
+++ b/clang/test/Modules/prebuilt-implicit-modules.m
@@ -30,6 +30,6 @@
 
 // expected-no-diagnostics
 @import module_a;
-int test() {
+int test(void) {
   return a;
 }

diff  --git a/clang/test/Modules/prebuilt-module.m b/clang/test/Modules/prebuilt-module.m
index d5012e0e85f32..d46678392f4e9 100644
--- a/clang/test/Modules/prebuilt-module.m
+++ b/clang/test/Modules/prebuilt-module.m
@@ -5,6 +5,6 @@
 
 // expected-no-diagnostics
 @import prebuilt;
-int test() {
+int test(void) {
   return a;
 }

diff  --git a/clang/test/Modules/redecl-merge.m b/clang/test/Modules/redecl-merge.m
index 62b74f4014df1..746be5ec4e774 100644
--- a/clang/test/Modules/redecl-merge.m
+++ b/clang/test/Modules/redecl-merge.m
@@ -41,7 +41,7 @@ void f(A *a) {
 
 @class A;
 
-B *f1() {
+B *f1(void) {
   return [B create_a_B];
 }
 
@@ -60,7 +60,7 @@ void testProtoMerge(id<P1> p1, id<P2> p2) {
   int s3_field;
 };
 
-void testTagMerge() {
+void testTagMerge(void) {
   consume_S1(produce_S1());
   struct S2 s2;
   s2.field = 0;
@@ -105,7 +105,7 @@ void testVarMerge(int i) {
 // Test redeclarations of entities in explicit submodules, to make
 // sure we're maintaining the declaration chains even when normal name
 // lookup can't see what we're looking for.
-void testExplicit() {
+void testExplicit(void) {
   Explicit *e;
   int *(*fp)(void) = &explicit_func;
   int *ip = explicit_func();
@@ -148,7 +148,7 @@ void test_ClassWithDef(ClassWithDef *cwd) {
 
 @import redecl_merge_bottom;
 
-void test_C4b() {
+void test_C4b(void) {
   if (&refers_to_C4) {
   }
 }

diff  --git a/clang/test/Modules/renamed.m b/clang/test/Modules/renamed.m
index 46a8f942fe832..af8bb3988b9b6 100644
--- a/clang/test/Modules/renamed.m
+++ b/clang/test/Modules/renamed.m
@@ -1,6 +1,6 @@
 @import NewName;
 
-int f() { return same_api; }
+int f(void) { return same_api; }
 
 // RUN: rm -rf %t
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -I %S/Inputs/oldname -fmodules-cache-path=%t %s -verify

diff  --git a/clang/test/Modules/stddef.m b/clang/test/Modules/stddef.m
index 9af526e5d5623..4f2d6bb7407b3 100644
--- a/clang/test/Modules/stddef.m
+++ b/clang/test/Modules/stddef.m
@@ -1,6 +1,6 @@
 @import StdDef.Other;
 
-size_t getSize();
+size_t getSize(void);
 
 // RUN: rm -rf %t
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs/StdDef %s -verify

diff  --git a/clang/test/Modules/subdirectory-module-maps-working-dir.m b/clang/test/Modules/subdirectory-module-maps-working-dir.m
index c106dd453e042..4fb19ff05ef38 100644
--- a/clang/test/Modules/subdirectory-module-maps-working-dir.m
+++ b/clang/test/Modules/subdirectory-module-maps-working-dir.m
@@ -6,7 +6,7 @@
 
 @import ModuleInSubdir;
 
-void foo() {
+void foo(void) {
   int x = bar();
 }
 

diff  --git a/clang/test/Modules/subframeworks.m b/clang/test/Modules/subframeworks.m
index c4cf85a2babfe..c08f1f3e090a1 100644
--- a/clang/test/Modules/subframeworks.m
+++ b/clang/test/Modules/subframeworks.m
@@ -4,14 +4,14 @@
 
 @import DependsOnModule;
 
-void testSubFramework() {
+void testSubFramework(void) {
   float *sf1 = sub_framework; // expected-error{{declaration of 'sub_framework' must be imported from module 'DependsOnModule.SubFramework' before it is required}}
   // expected-note at Inputs/DependsOnModule.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h:2 {{here}}
 }
 
 @import DependsOnModule.SubFramework;
 
-void testSubFrameworkAgain() {
+void testSubFrameworkAgain(void) {
   float *sf2 = sub_framework;
   double *sfo1 = sub_framework_other;
 }

diff  --git a/clang/test/Modules/submodules.m b/clang/test/Modules/submodules.m
index 04e758d3353a6..697fc33740e4f 100644
--- a/clang/test/Modules/submodules.m
+++ b/clang/test/Modules/submodules.m
@@ -6,7 +6,7 @@
 // Note: transitively imports Module.Sub2.
 @import Module.Sub;
 
-int getValue() { 
+int getValue(void) { 
   return *Module_Sub + *Module_Sub2;
 }
 

diff  --git a/clang/test/Modules/typo.m b/clang/test/Modules/typo.m
index 7e5108df6bede..94650fdf7eded 100644
--- a/clang/test/Modules/typo.m
+++ b/clang/test/Modules/typo.m
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c-header %S/Inputs/typo.h -emit-pch -o %t.pch
 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -include-pch %t.pch %s -verify
 
-void test() {
+void test(void) {
   [Nsstring alloc]; // expected-error {{unknown receiver 'Nsstring'; did you mean 'NSString'}}
                     // expected-note at typo.h:* {{here}}
 }

diff  --git a/clang/test/Modules/working-dir-flag.m b/clang/test/Modules/working-dir-flag.m
index 0e258c0d2feb7..d2de9bd06c81f 100644
--- a/clang/test/Modules/working-dir-flag.m
+++ b/clang/test/Modules/working-dir-flag.m
@@ -4,6 +4,6 @@
 
 @import Test;
 
-void foo() {
+void foo(void) {
   test_me_call();
 }

diff  --git a/clang/test/OpenMP/PR44893.c b/clang/test/OpenMP/PR44893.c
index 07b879b831e79..2f1f67fd4aa98 100644
--- a/clang/test/OpenMP/PR44893.c
+++ b/clang/test/OpenMP/PR44893.c
@@ -2,13 +2,13 @@
 
 // Do not crash ;)
 
-void foo()
+void foo(void)
 {
 #pragma omp critical
   ;
 }
 
-void bar()
+void bar(void)
 {
   foo();
   foo();

diff  --git a/clang/test/OpenMP/atomic_capture_codegen.cpp b/clang/test/OpenMP/atomic_capture_codegen.cpp
index 8e653d8bb104f..98dce997529c0 100644
--- a/clang/test/OpenMP/atomic_capture_codegen.cpp
+++ b/clang/test/OpenMP/atomic_capture_codegen.cpp
@@ -90,7 +90,7 @@ float2 float2x;
 // register int rix __asm__("0");
 register int rix __asm__("esp");
 
-int main() {
+int main(void) {
 // CHECK: [[PREV:%.+]] = atomicrmw add i8* @{{.+}}, i8 1 monotonic, align 1
 // CHECK: store i8 [[PREV]], i8* @{{.+}},
 #pragma omp atomic capture

diff  --git a/clang/test/OpenMP/atomic_messages.c b/clang/test/OpenMP/atomic_messages.c
index 6e0df178ca581..d9e2b1a352ec6 100644
--- a/clang/test/OpenMP/atomic_messages.c
+++ b/clang/test/OpenMP/atomic_messages.c
@@ -12,7 +12,7 @@ void xxx(int argc) {
   argc = x; // expected-warning {{variable 'x' is uninitialized when used here}}
 }
 
-int foo() {
+int foo(void) {
 L1:
   foo();
 #pragma omp atomic
@@ -39,7 +39,7 @@ struct S {
   int a;
 };
 
-int readint() {
+int readint(void) {
   int a = 0, b = 0;
 // Test for atomic read
 #pragma omp atomic read
@@ -67,7 +67,7 @@ int readint() {
   return 0;
 }
 
-int readS() {
+int readS(void) {
   struct S a, b;
   // expected-error at +1 {{directive '#pragma omp atomic' cannot contain more than one 'read' clause}} expected-error at +1 {{unexpected OpenMP clause 'allocate' in directive '#pragma omp atomic'}}
 #pragma omp atomic read read allocate(a)
@@ -78,7 +78,7 @@ int readS() {
   return a.a;
 }
 
-int writeint() {
+int writeint(void) {
   int a = 0, b = 0;
 // Test for atomic write
 #pragma omp atomic write
@@ -104,7 +104,7 @@ int writeint() {
   return 0;
 }
 
-int writeS() {
+int writeS(void) {
   struct S a, b;
   // expected-error at +1 {{directive '#pragma omp atomic' cannot contain more than one 'write' clause}}
 #pragma omp atomic write write
@@ -115,7 +115,7 @@ int writeS() {
   return a.a;
 }
 
-int updateint() {
+int updateint(void) {
   int a = 0, b = 0;
 // Test for atomic update
 #pragma omp atomic update
@@ -205,7 +205,7 @@ int updateint() {
   return 0;
 }
 
-int captureint() {
+int captureint(void) {
   int a = 0, b = 0, c = 0;
 // Test for atomic capture
 #pragma omp atomic capture
@@ -381,7 +381,7 @@ int captureint() {
   return 0;
 }
 
-void hint() {
+void hint(void) {
   int a = 0;
 #pragma omp atomic hint // omp45-error {{unexpected OpenMP clause 'hint' in directive '#pragma omp atomic'}} expected-error {{expected '(' after 'hint'}}
   a += 1;
@@ -398,10 +398,10 @@ void hint() {
 }
 
 #ifdef OMP51
-extern void bbar();
-extern int ffoo();
+extern void bbar(void);
+extern int ffoo(void);
 
-void compare() {
+void compare(void) {
   int x = 0;
   int d = 0;
   int e = 0;

diff  --git a/clang/test/OpenMP/atomic_read_codegen.c b/clang/test/OpenMP/atomic_read_codegen.c
index d4b68f2c3aa73..356f27127eb29 100644
--- a/clang/test/OpenMP/atomic_read_codegen.c
+++ b/clang/test/OpenMP/atomic_read_codegen.c
@@ -83,7 +83,7 @@ float2 float2x;
 register int rix __asm__("esp");
 
 // CHECK-LABEL: @main(
-int main() {
+int main(void) {
 // CHECK: load atomic i8, i8* {{.*}} monotonic, align 1
 // CHECK: store i8
 #pragma omp atomic read

diff  --git a/clang/test/OpenMP/atomic_update_codegen.cpp b/clang/test/OpenMP/atomic_update_codegen.cpp
index 063009ef3424c..f410b96e67951 100644
--- a/clang/test/OpenMP/atomic_update_codegen.cpp
+++ b/clang/test/OpenMP/atomic_update_codegen.cpp
@@ -81,7 +81,7 @@ float2 float2x;
 // register int rix __asm__("0");
 register int rix __asm__("esp");
 
-int main() {
+int main(void) {
 // CHECK-NOT: atomicrmw
 #pragma omp atomic
   ++dv;

diff  --git a/clang/test/OpenMP/atomic_write_codegen.c b/clang/test/OpenMP/atomic_write_codegen.c
index eecde89cdd2bd..1fdc094debbe0 100644
--- a/clang/test/OpenMP/atomic_write_codegen.c
+++ b/clang/test/OpenMP/atomic_write_codegen.c
@@ -82,7 +82,7 @@ float2 float2x;
 // register int rix __asm__("0");
 register int rix __asm__("esp");
 
-int main() {
+int main(void) {
 // CHECK: store atomic i32 1, i32* getelementptr inbounds ({ i32, i32 }, { i32, i32 }* @civ, i32 0, i32 1) monotonic, align 4
 #pragma omp atomic write
  __imag(civ) = 1;

diff  --git a/clang/test/OpenMP/begin_declare_variant_range_withouth_end.c b/clang/test/OpenMP/begin_declare_variant_range_withouth_end.c
index 30dd0c25fccf1..bbd8b473914d7 100644
--- a/clang/test/OpenMP/begin_declare_variant_range_withouth_end.c
+++ b/clang/test/OpenMP/begin_declare_variant_range_withouth_end.c
@@ -28,6 +28,6 @@ int also_after(void) {
   return 0;
 }
 
-int test() {
+int test(void) {
   return also_after() + also_before();
 }

diff  --git a/clang/test/OpenMP/declare_mapper_ast_print.c b/clang/test/OpenMP/declare_mapper_ast_print.c
index b7c9976c122af..55ebd8334c587 100644
--- a/clang/test/OpenMP/declare_mapper_ast_print.c
+++ b/clang/test/OpenMP/declare_mapper_ast_print.c
@@ -42,7 +42,7 @@ struct dat {
 // CHECK: #pragma omp declare mapper (default : struct dat d) map(to: d.d){{$}}
 
 // CHECK: int main() {
-int main() {
+int main(void) {
 #pragma omp declare mapper(id: struct vec v) map(v.len)
 // CHECK: #pragma omp declare mapper (id : struct vec v) map(tofrom: v.len)
   {

diff  --git a/clang/test/OpenMP/declare_reduction_ast_print.c b/clang/test/OpenMP/declare_reduction_ast_print.c
index a421886dd3fe2..cdc1685b14ef2 100644
--- a/clang/test/OpenMP/declare_reduction_ast_print.c
+++ b/clang/test/OpenMP/declare_reduction_ast_print.c
@@ -32,7 +32,7 @@ void init(struct SSS *priv, struct SSS orig);
 // CHECK: #pragma omp declare reduction (fun : struct SSS : omp_out = omp_in) initializer(init(&omp_priv, omp_orig))
 
 // CHECK: int main() {
-int main() {
+int main(void) {
 #pragma omp declare reduction(fun : struct SSS : omp_out = omp_in) initializer(init(&omp_priv, omp_orig))
   // CHECK: #pragma omp declare reduction (fun : struct SSS : omp_out = omp_in) initializer(init(&omp_priv, omp_orig))
   {

diff  --git a/clang/test/OpenMP/declare_reduction_codegen.c b/clang/test/OpenMP/declare_reduction_codegen.c
index 438a6895e2cc3..9b540d713bd0f 100644
--- a/clang/test/OpenMP/declare_reduction_codegen.c
+++ b/clang/test/OpenMP/declare_reduction_codegen.c
@@ -112,7 +112,7 @@ void init(struct SSS *priv, struct SSS orig);
 
 // CHECK-LABEL: @main
 // CHECK-LOAD-LABEL: @main
-int main() {
+int main(void) {
 #pragma omp declare reduction(fun : struct SSS : omp_out = omp_in) initializer(init(&omp_priv, omp_orig))
   // CHECK: define internal {{.*}}void @{{[^(]+}}([[SSS_INT]]* noalias noundef %0, [[SSS_INT]]* noalias noundef %1)
   // CHECK: call void @llvm.memcpy
@@ -170,7 +170,7 @@ int main() {
 // CHECK-LABEL: bar
 struct SSS ss;
 int in;
-void bar() {
+void bar(void) {
   // CHECK: [[SS_PRIV:%.+]] = alloca %struct.SSS,
   // CHECK: [[IN_PRIV:%.+]] = alloca i32,
   // CHECK: [[BC:%.+]] = bitcast %struct.SSS* [[SS_PRIV]] to i8*

diff  --git a/clang/test/OpenMP/declare_variant_ast_x86_64.c b/clang/test/OpenMP/declare_variant_ast_x86_64.c
index c0be89a1c6127..f082e8985147b 100644
--- a/clang/test/OpenMP/declare_variant_ast_x86_64.c
+++ b/clang/test/OpenMP/declare_variant_ast_x86_64.c
@@ -3,8 +3,8 @@
 
 #pragma omp begin declare variant match(device={arch(x86_64)})
 
-void bar() {}
+void bar(void) {}
 
-// CHECK: FunctionDecl {{.*}} bar[device={arch(x86_64)}] 'void ()'
+// CHECK: FunctionDecl {{.*}} bar[device={arch(x86_64)}] 'void (void)'
 
 #pragma omp end declare variant

diff  --git a/clang/test/OpenMP/declare_variant_construct_codegen_1.c b/clang/test/OpenMP/declare_variant_construct_codegen_1.c
index 15698eebe113d..efa830206ead7 100644
--- a/clang/test/OpenMP/declare_variant_construct_codegen_1.c
+++ b/clang/test/OpenMP/declare_variant_construct_codegen_1.c
@@ -49,7 +49,7 @@ void t_vxv(int *v1, int *v2, int *v3, int n) {
 
 
 // CK1-LABEL: define {{[^@]+}}@test
-int test() {
+int test(void) {
   int v1[N], v2[N], v3[N];
 
   // init
@@ -222,7 +222,7 @@ int t_simd(int *v1, int *v2, int *v3, int idx) {
 }
 
 // CK3-LABEL: define {{[^@]+}}@test
-void test() {
+void test(void) {
   int v1[N], v2[N], v3[N];
 
   // init
@@ -296,7 +296,7 @@ void all_vxv(int *v1, int *v2, int *v3, int n) {
 #pragma omp end declare target
 
 // CK4-LABEL: define {{[^@]+}}@test
-void test() {
+void test(void) {
     int v1[N], v2[N], v3[N];
 
     //init

diff  --git a/clang/test/OpenMP/declare_variant_messages.c b/clang/test/OpenMP/declare_variant_messages.c
index b53361f11b9f7..66ead8909ad8f 100644
--- a/clang/test/OpenMP/declare_variant_messages.c
+++ b/clang/test/OpenMP/declare_variant_messages.c
@@ -55,7 +55,7 @@ int bar(void);
 #pragma omp declare variant(foo) match(user = {condition(foo)}) // expected-error {{the user condition in the OpenMP context selector needs to be constant; foo is not}}
 #pragma omp declare variant(foo) match(user = {condition(foo())}) // expected-error {{the user condition in the OpenMP context selector needs to be constant; foo() is not}}
 #pragma omp declare variant(foo) match(user = {condition(<expr>)}) // expected-error {{expected expression}} expected-error {{use of undeclared identifier 'expr'}} expected-error {{expected expression}} expected-note {{the ignored selector spans until here}}
-int score_and_cond_non_const();
+int score_and_cond_non_const(void);
 
 #pragma omp declare variant(foo) match(construct={teams,parallel,for,simd})
 #pragma omp declare variant(foo) match(construct={target teams}) // expected-error {{expected ')'}} expected-warning {{expected '}' after the context selectors for the context set "construct"; '}' assumed}} expected-note {{to match this '('}} expected-error {{expected 'match' clause on 'omp declare variant' directive}}
@@ -80,14 +80,14 @@ int var;
 #pragma omp declare variant(foo) match(xxx={}) // expected-error {{function declaration is expected after 'declare variant' directive}}
 #pragma omp declare variant(foo) match(xxx={}) // expected-error {{function declaration is expected after 'declare variant' directive}}
 #pragma options align=packed
-int main();
+int main(void);
 
 
 
 #pragma omp declare variant(foo) match(implementation={vendor(llvm)}) // expected-error {{function declaration is expected after 'declare variant' directive}}
 #pragma omp declare variant(foo) match(implementation={vendor(llvm)}) // expected-error {{function declaration is expected after 'declare variant' directive}}
 #pragma init_seg(compiler)
-int main();
+int main(void);
 
 
 #pragma omp declare variant(foo) match(xxx={}) // expected-error {{single declaration is expected after 'declare variant' directive}} expected-warning {{'xxx' is not a valid context set in a `declare variant`; set ignored}} expected-note {{context set options are: 'construct' 'device' 'implementation' 'user'}} expected-note {{the ignored set spans until here}}
@@ -108,8 +108,8 @@ int 
diff _proto(double); // expected-error {{conflicting types for '
diff _proto'}}
 int 
diff _proto1(double);
 
 int after_use_variant(void);
-int after_use();
-int bar() {
+int after_use(void);
+int bar(void) {
   return after_use();
 }
 
@@ -150,7 +150,7 @@ int unknown_isa_trait2(void);
 #pragma omp declare variant(foo) match(device = {kind(fpga), isa(bar)})
 int ignored_isa_trait(void);
 
-void caller() {
+void caller(void) {
   unknown_isa_trait();  // expected-warning {{isa trait 'foo' is not known to the current target; verify the spelling or consider restricting the context selector with the 'arch' selector further}}
   unknown_isa_trait2(); // expected-warning {{isa trait 'foo' is not known to the current target; verify the spelling or consider restricting the context selector with the 'arch' selector further}}
   ignored_isa_trait();

diff  --git a/clang/test/OpenMP/depend_iterator_bug.c b/clang/test/OpenMP/depend_iterator_bug.c
index b7470f0037616..d8106b017473a 100644
--- a/clang/test/OpenMP/depend_iterator_bug.c
+++ b/clang/test/OpenMP/depend_iterator_bug.c
@@ -9,7 +9,7 @@ int y[100];
 // CHECK-LABEL: @many_iterators_single_clause(
 // CHECK:    [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
 // CHECK:    = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* {{.*}}, i32 {{.*}}, i8* {{.*}}, i32 10, i8* {{.*}}, i32 0, i8* null)
-void many_iterators_single_clause() {
+void many_iterators_single_clause(void) {
     #pragma omp task depend(iterator(j=0:5), in: x[j], y[j])
     {
     }
@@ -18,7 +18,7 @@ void many_iterators_single_clause() {
 // CHECK-LABEL: @many_iterators_many_clauses(
 // CHECK:    [[VLA:%.*]] = alloca [[STRUCT_KMP_DEPEND_INFO:%.*]], i64 10, align 16
 // CHECK:    = call i32 @__kmpc_omp_task_with_deps(%struct.ident_t* {{.*}}, i32 {{.*}}, i8* {{.*}}, i32 10, i8* {{.*}}, i32 0, i8* null)
-void many_iterators_many_clauses() {
+void many_iterators_many_clauses(void) {
     #pragma omp task depend(iterator(j=0:5), in: x[j]) \
                      depend(iterator(j=0:5), in: y[j])
     {

diff  --git a/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
index 6cdf7363a2a3e..5128357baadfa 100644
--- a/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
+++ b/clang/test/OpenMP/distribute_parallel_for_simd_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}}
 #pragma omp distribute parallel for simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp distribute parallel for simd
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -57,7 +57,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -67,7 +67,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp target
@@ -98,8 +98,8 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
-void test_safelen() {
+extern int foo(void);
+void test_safelen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -222,7 +222,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -345,7 +345,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -362,7 +362,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -498,7 +498,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_linear() {
+void test_linear(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -561,7 +561,7 @@ void test_linear() {
     ;
 }
 
-void test_aligned() {
+void test_aligned(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -699,7 +699,7 @@ void test_aligned() {
 }
 
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -759,7 +759,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -819,7 +819,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -882,7 +882,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp target
 #pragma omp teams
@@ -900,7 +900,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp distribute parallel for simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp distribute parallel for simd nontemporal(

diff  --git a/clang/test/OpenMP/distribute_simd_misc_messages.c b/clang/test/OpenMP/distribute_simd_misc_messages.c
index 2403f2f99680f..ed17e9bbea043 100644
--- a/clang/test/OpenMP/distribute_simd_misc_messages.c
+++ b/clang/test/OpenMP/distribute_simd_misc_messages.c
@@ -20,7 +20,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp distribute simd'}}
 #pragma omp distribute simd safelen(4)
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -35,7 +35,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -64,7 +64,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -74,7 +74,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp target
@@ -99,8 +99,8 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
-void test_safelen() {
+extern int foo(void);
+void test_safelen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -224,7 +224,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -347,7 +347,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -364,7 +364,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -511,7 +511,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_linear() {
+void test_linear(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -574,7 +574,7 @@ void test_linear() {
     ;
 }
 
-void test_aligned() {
+void test_aligned(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -713,7 +713,7 @@ void test_aligned() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -773,7 +773,7 @@ void test_private() {
   }
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -784,7 +784,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp target
 #pragma omp teams
@@ -844,7 +844,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_reduction() {
+void test_reduction(void) {
   int i, x, y;
 #pragma omp target
 #pragma omp teams
@@ -992,7 +992,7 @@ void test_reduction() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp target
 #pragma omp teams
@@ -1034,7 +1034,7 @@ void linear_modifiers(int argc) {
   for (k = 0; k < argc; ++k) ++k;
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp distribute simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp distribute simd nontemporal(

diff  --git a/clang/test/OpenMP/fopenmp-extensions.c b/clang/test/OpenMP/fopenmp-extensions.c
index 0ba66c964e3c1..f3ed527e4e24b 100644
--- a/clang/test/OpenMP/fopenmp-extensions.c
+++ b/clang/test/OpenMP/fopenmp-extensions.c
@@ -17,7 +17,7 @@
 // RUN: %clang_cc1 -verify=ompx -fopenmp-simd \
 // RUN:     -fno-openmp-extensions -fopenmp-extensions %s
 
-void foo() {
+void foo(void) {
   int x;
   // ompx-no-diagnostics
   // omp-error at +1 {{incorrect map type modifier}}

diff  --git a/clang/test/OpenMP/for_misc_messages.c b/clang/test/OpenMP/for_misc_messages.c
index bb8e55fb5d4b7..6ad0682057eca 100644
--- a/clang/test/OpenMP/for_misc_messages.c
+++ b/clang/test/OpenMP/for_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp for'}}
 #pragma omp for foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp for
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -56,7 +56,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp for' are ignored}}
@@ -79,7 +79,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -106,9 +106,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -226,7 +226,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -277,7 +277,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -328,7 +328,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -379,7 +379,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}

diff  --git a/clang/test/OpenMP/for_simd_misc_messages.c b/clang/test/OpenMP/for_simd_misc_messages.c
index bd0d86baaaf88..1e42b9247f754 100644
--- a/clang/test/OpenMP/for_simd_misc_messages.c
+++ b/clang/test/OpenMP/for_simd_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp for simd'}}
 #pragma omp for simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp for simd
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -56,7 +56,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp for simd' are ignored}}
@@ -65,7 +65,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -92,8 +92,8 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
-void test_safelen() {
+extern int foo(void);
+void test_safelen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp for simd safelen
@@ -178,7 +178,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp for simd simdlen
@@ -263,7 +263,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 // expected-error at +1 {{the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter}}
 #pragma omp for simd simdlen(6) safelen(5)
@@ -275,7 +275,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -393,7 +393,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_linear() {
+void test_linear(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp for simd linear(
@@ -498,7 +498,7 @@ void test_linear() {
     ;
 }
 
-void test_aligned() {
+void test_aligned(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp for simd aligned(
@@ -596,7 +596,7 @@ void test_aligned() {
 }
 
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -647,7 +647,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -698,7 +698,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -749,7 +749,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}
@@ -765,7 +765,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp for simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp for simd nontemporal(

diff  --git a/clang/test/OpenMP/master_taskloop_misc_messages.c b/clang/test/OpenMP/master_taskloop_misc_messages.c
index 5228736b0c20c..56ccfde86e615 100644
--- a/clang/test/OpenMP/master_taskloop_misc_messages.c
+++ b/clang/test/OpenMP/master_taskloop_misc_messages.c
@@ -15,7 +15,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp master taskloop'}}
 #pragma omp master taskloop foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp master taskloop
   for (i = 0; i < 16; ++i)
@@ -26,7 +26,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -54,7 +54,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp master taskloop' are ignored}}
@@ -67,7 +67,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -95,9 +95,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -205,7 +205,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -256,7 +256,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -307,7 +307,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -358,7 +358,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}

diff  --git a/clang/test/OpenMP/master_taskloop_simd_misc_messages.c b/clang/test/OpenMP/master_taskloop_simd_misc_messages.c
index 3ad50dca4d6e9..9cb609f0acfaa 100644
--- a/clang/test/OpenMP/master_taskloop_simd_misc_messages.c
+++ b/clang/test/OpenMP/master_taskloop_simd_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp master taskloop simd'}}
 #pragma omp master taskloop simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp master taskloop simd
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -56,7 +56,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp master taskloop simd' are ignored}}
@@ -69,7 +69,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -96,9 +96,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -206,7 +206,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -257,7 +257,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -308,7 +308,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -363,7 +363,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}
@@ -385,7 +385,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp master taskloop simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp master taskloop simd nontemporal(

diff  --git a/clang/test/OpenMP/metadirective_device_kind_codegen.c b/clang/test/OpenMP/metadirective_device_kind_codegen.c
index 44fb6c5b7a899..e895458dd26fc 100644
--- a/clang/test/OpenMP/metadirective_device_kind_codegen.c
+++ b/clang/test/OpenMP/metadirective_device_kind_codegen.c
@@ -5,9 +5,9 @@
 #ifndef HEADER
 #define HEADER
 
-void bar();
+void bar(void);
 
-void foo() {
+void foo(void) {
 #pragma omp metadirective when(device = {kind(any)} \
                                : parallel)
   bar();
@@ -47,7 +47,7 @@ void foo() {
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_1]](
-// CHECK: call void {{.+}} @bar
+// CHECK: call void @bar
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_2]](
@@ -61,15 +61,15 @@ void foo() {
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_4]](
-// CHECK: call void {{.+}} @bar
+// CHECK: call void @bar
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_5]](
-// CHECK: call void {{.+}} @bar
+// CHECK: call void @bar
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_6]](
-// CHECK: call void {{.+}} @bar
+// CHECK: call void @bar
 // CHECK: ret void
 
 // CHECK: define internal void [[OUTLINED_7]](

diff  --git a/clang/test/OpenMP/metadirective_implementation_codegen.c b/clang/test/OpenMP/metadirective_implementation_codegen.c
index 2ba7715b5e0b5..13600aa2fb212 100644
--- a/clang/test/OpenMP/metadirective_implementation_codegen.c
+++ b/clang/test/OpenMP/metadirective_implementation_codegen.c
@@ -6,9 +6,9 @@
 #ifndef HEADER
 #define HEADER
 
-void bar();
+void bar(void);
 
-void foo() {
+void foo(void) {
 #pragma omp metadirective when(implementation = {vendor(score(0)  \
                                                         : llvm)}, \
                                device = {kind(cpu)}               \

diff  --git a/clang/test/OpenMP/nvptx_target_printf_codegen.c b/clang/test/OpenMP/nvptx_target_printf_codegen.c
index 0eee1e6088265..d29ca572ba8f1 100644
--- a/clang/test/OpenMP/nvptx_target_printf_codegen.c
+++ b/clang/test/OpenMP/nvptx_target_printf_codegen.c
@@ -9,7 +9,7 @@ extern int printf(const char *, ...);
 
 
 // Check a simple call to printf end-to-end.
-int CheckSimple() {
+int CheckSimple(void) {
 #pragma omp target
   {
     // printf in master-only basic block.
@@ -21,7 +21,7 @@ int CheckSimple() {
   return 0;
 }
 
-void CheckNoArgs() {
+void CheckNoArgs(void) {
 #pragma omp target
   {
     // printf in master-only basic block.
@@ -32,7 +32,7 @@ void CheckNoArgs() {
 // Check that printf's alloca happens in the entry block, not inside the if
 // statement.
 int foo;
-void CheckAllocaIsInEntryBlock() {
+void CheckAllocaIsInEntryBlock(void) {
 #pragma omp target
   {
     if (foo) {

diff  --git a/clang/test/OpenMP/openmp_common.c b/clang/test/OpenMP/openmp_common.c
index feeefc4820ce5..b639fb3c04ec4 100644
--- a/clang/test/OpenMP/openmp_common.c
+++ b/clang/test/OpenMP/openmp_common.c
@@ -6,7 +6,7 @@
 #pragma omp // expected-error {{expected an OpenMP directive}}
 #pragma omp unknown_directive // expected-error {{expected an OpenMP directive}}
 
-void foo() {
+void foo(void) {
 #pragma omp // expected-error {{expected an OpenMP directive}}
 #pragma omp unknown_directive // expected-error {{expected an OpenMP directive}}
 }

diff  --git a/clang/test/OpenMP/openmp_offload_registration.cpp b/clang/test/OpenMP/openmp_offload_registration.cpp
index 02d0ae5c75b61..29c88fe107bb3 100644
--- a/clang/test/OpenMP/openmp_offload_registration.cpp
+++ b/clang/test/OpenMP/openmp_offload_registration.cpp
@@ -3,7 +3,7 @@
 // RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux-gnu -fopenmp-targets=aarch64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
 // expected-no-diagnostics
 
-void foo() {
+void foo(void) {
 #pragma omp target
   {}
 }

diff  --git a/clang/test/OpenMP/ordered_doacross_codegen.c b/clang/test/OpenMP/ordered_doacross_codegen.c
index 5e82a34db906e..505bdd577a020 100644
--- a/clang/test/OpenMP/ordered_doacross_codegen.c
+++ b/clang/test/OpenMP/ordered_doacross_codegen.c
@@ -18,10 +18,10 @@
 // CHECK: [[KMP_DIM:%.+]] = type { i64, i64, i64 }
 extern int n;
 int a[10], b[10], c[10], d[10];
-void foo();
+void foo(void);
 
 // CHECK-LABEL: @main()
-int main() {
+int main(void) {
   int i;
 // CHECK: [[DIMS:%.+]] = alloca [1 x [[KMP_DIM]]],
 // CHECK-NORMAL: [[GTID:%.+]] = call i32 @__kmpc_global_thread_num([[IDENT:%.+]])
@@ -42,7 +42,7 @@ int main() {
   for (i = 0; i < n; ++i) {
     a[i] = b[i] + 1;
     foo();
-// CHECK: call void (...) [[FOO:.+]](
+// CHECK: call void @foo()
 // CHECK: load i32, i32* [[I:%.+]],
 // CHECK-NEXT: sub nsw i32 %{{.+}}, 0
 // CHECK-NEXT: sdiv i32 %{{.+}}, 1
@@ -56,7 +56,7 @@ int main() {
 #pragma omp ordered depend(source)
     c[i] = c[i] + 1;
     foo();
-// CHECK: call void (...) [[FOO]]
+// CHECK: call void @foo()
 // CHECK: load i32, i32* [[I]],
 // CHECK-NEXT: sub nsw i32 %{{.+}}, 2
 // CHECK-NEXT: sub nsw i32 %{{.+}}, 0

diff  --git a/clang/test/OpenMP/parallel_for_misc_messages.c b/clang/test/OpenMP/parallel_for_misc_messages.c
index 2c8643674286c..6536d9414fb61 100644
--- a/clang/test/OpenMP/parallel_for_misc_messages.c
+++ b/clang/test/OpenMP/parallel_for_misc_messages.c
@@ -8,7 +8,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
 #pragma omp parallel for foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp parallel for
   for (i = 0; i < 16; ++i)
@@ -19,7 +19,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -46,7 +46,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
 #pragma omp parallel for foo bar
@@ -54,7 +54,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
@@ -73,9 +73,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp parallel for collapse
@@ -174,7 +174,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -216,7 +216,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -258,7 +258,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -300,7 +300,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp parallel for

diff  --git a/clang/test/OpenMP/parallel_for_simd_misc_messages.c b/clang/test/OpenMP/parallel_for_simd_misc_messages.c
index d39f1b12211ea..8d365c87ddc75 100644
--- a/clang/test/OpenMP/parallel_for_simd_misc_messages.c
+++ b/clang/test/OpenMP/parallel_for_simd_misc_messages.c
@@ -10,7 +10,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
 #pragma omp parallel for simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp parallel for simd
   for (i = 0; i < 16; ++i)
@@ -21,7 +21,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -49,7 +49,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
@@ -58,7 +58,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -85,8 +85,8 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
-void test_safelen() {
+extern int foo(void);
+void test_safelen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp parallel for simd safelen
@@ -171,7 +171,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp parallel for simd simdlen
@@ -256,7 +256,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 // expected-error at +1 {{the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter}}
 #pragma omp parallel for simd simdlen(6) safelen(5)
@@ -268,7 +268,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -384,7 +384,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_linear() {
+void test_linear(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp parallel for simd linear(
@@ -489,7 +489,7 @@ void test_linear() {
     ;
 }
 
-void test_aligned() {
+void test_aligned(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp parallel for simd aligned(
@@ -587,7 +587,7 @@ void test_aligned() {
 }
 
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -638,7 +638,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -689,7 +689,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -740,7 +740,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}
@@ -756,7 +756,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp parallel for simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp parallel for simd nontemporal(

diff  --git a/clang/test/OpenMP/parallel_master_taskloop_misc_messages.c b/clang/test/OpenMP/parallel_master_taskloop_misc_messages.c
index 8993ffdf27bff..8232e902a96e4 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_misc_messages.c
+++ b/clang/test/OpenMP/parallel_master_taskloop_misc_messages.c
@@ -15,7 +15,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel master taskloop'}}
 #pragma omp parallel master taskloop foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp parallel master taskloop
   for (i = 0; i < 16; ++i)
@@ -26,7 +26,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -54,7 +54,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i, a;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel master taskloop' are ignored}}
 #pragma omp parallel master taskloop foo bar
@@ -70,7 +70,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -98,9 +98,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -208,7 +208,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -259,7 +259,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -310,7 +310,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -361,7 +361,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}

diff  --git a/clang/test/OpenMP/parallel_master_taskloop_simd_misc_messages.c b/clang/test/OpenMP/parallel_master_taskloop_simd_misc_messages.c
index 39df42b871db6..4401bff53e9b7 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_simd_misc_messages.c
+++ b/clang/test/OpenMP/parallel_master_taskloop_simd_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel master taskloop simd'}}
 #pragma omp parallel master taskloop simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp parallel master taskloop simd
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -56,7 +56,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i, a;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel master taskloop simd' are ignored}}
 #pragma omp parallel master taskloop simd foo bar
@@ -72,7 +72,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -99,9 +99,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -209,7 +209,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -260,7 +260,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -311,7 +311,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -362,7 +362,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}
@@ -384,7 +384,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp parallel master taskloop simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp parallel master taskloop simd nontemporal(

diff  --git a/clang/test/OpenMP/parallel_sections_misc_messages.c b/clang/test/OpenMP/parallel_sections_misc_messages.c
index 08c704b528fa2..1091f7c672460 100644
--- a/clang/test/OpenMP/parallel_sections_misc_messages.c
+++ b/clang/test/OpenMP/parallel_sections_misc_messages.c
@@ -2,7 +2,7 @@
 
 // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
 
-void foo();
+void foo(void);
 
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel sections'}}
 #pragma omp parallel sections
@@ -10,7 +10,7 @@ void foo();
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp parallel sections'}}
 #pragma omp parallel sections foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp parallel sections
   {
@@ -29,7 +29,7 @@ void test_no_clause() {
 
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -68,7 +68,7 @@ void test_branch_protected_scope() {
   goto L3; // expected-error {{use of undeclared label 'L3'}}
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
 #pragma omp parallel sections foo bar
@@ -80,7 +80,7 @@ void test_invalid_clause() {
   }
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
@@ -108,7 +108,7 @@ void test_non_identifiers() {
   }
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -158,7 +158,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -209,7 +209,7 @@ void test_lastprivate() {
   }
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}

diff  --git a/clang/test/OpenMP/sections_misc_messages.c b/clang/test/OpenMP/sections_misc_messages.c
index cce957c5f4c71..58e1a816007e0 100644
--- a/clang/test/OpenMP/sections_misc_messages.c
+++ b/clang/test/OpenMP/sections_misc_messages.c
@@ -10,7 +10,7 @@ void xxx(int argc) {
 }
 }
 
-void foo();
+void foo(void);
 
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp sections'}}
 #pragma omp sections
@@ -18,7 +18,7 @@ void foo();
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp sections'}}
 #pragma omp sections foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp sections
   {
@@ -50,7 +50,7 @@ void test_no_clause() {
 
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -100,7 +100,7 @@ void test_branch_protected_scope() {
   goto L3; // expected-error {{use of undeclared label 'L3'}}
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
@@ -113,7 +113,7 @@ void test_invalid_clause() {
   }
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -145,7 +145,7 @@ void test_non_identifiers() {
   }
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -204,7 +204,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -264,7 +264,7 @@ void test_lastprivate() {
   }
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -324,7 +324,7 @@ void test_firstprivate() {
   }
 }
 
-void test_nowait() {
+void test_nowait(void) {
 #pragma omp parallel
 #pragma omp sections nowait nowait // expected-error {{directive '#pragma omp sections' cannot contain more than one 'nowait' clause}}
   {

diff  --git a/clang/test/OpenMP/simd_misc_messages.c b/clang/test/OpenMP/simd_misc_messages.c
index a76aad9cec6d9..01b20108d3793 100644
--- a/clang/test/OpenMP/simd_misc_messages.c
+++ b/clang/test/OpenMP/simd_misc_messages.c
@@ -20,7 +20,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp simd'}}
 #pragma omp simd safelen(4)
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp simd
   for (i = 0; i < 16; ++i)
@@ -31,7 +31,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -58,7 +58,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
 #pragma omp simd foo bar
@@ -66,7 +66,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
@@ -90,8 +90,8 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
-void test_safelen() {
+extern int foo(void);
+void test_safelen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp simd safelen
@@ -177,7 +177,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp simd simdlen
@@ -262,7 +262,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 // expected-error at +1 {{the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter}}
 #pragma omp simd simdlen(6) safelen(5)
@@ -274,7 +274,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp simd collapse
@@ -381,7 +381,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_linear() {
+void test_linear(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp simd linear(
@@ -485,7 +485,7 @@ void test_linear() {
     ;
 }
 
-void test_aligned() {
+void test_aligned(void) {
   int i;
 // expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp simd aligned(
@@ -582,7 +582,7 @@ void test_aligned() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -624,7 +624,7 @@ void test_private() {
   }
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
 // expected-error at +2 {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}}
@@ -634,7 +634,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -676,7 +676,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_reduction() {
+void test_reduction(void) {
   int i, x, y;
 // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
 // expected-error at +2 {{expected identifier}}
@@ -778,7 +778,7 @@ void test_reduction() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp simd
@@ -806,7 +806,7 @@ void linear_modifiers(int argc) {
   for (int k = 0; k < argc; ++k) ++k;
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp simd nontemporal(

diff  --git a/clang/test/OpenMP/single_misc_messages.c b/clang/test/OpenMP/single_misc_messages.c
index 96f40c69f50e8..f4c6834714545 100644
--- a/clang/test/OpenMP/single_misc_messages.c
+++ b/clang/test/OpenMP/single_misc_messages.c
@@ -8,7 +8,7 @@ void xxx(int argc) {
   argc = x; // expected-warning {{variable 'x' is uninitialized when used here}}
 }
 
-void foo();
+void foo(void);
 
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp single'}}
 #pragma omp single
@@ -16,7 +16,7 @@ void foo();
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp single'}}
 #pragma omp single foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp single
   foo();
@@ -25,7 +25,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -53,7 +53,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp single' are ignored}}
@@ -61,7 +61,7 @@ void test_invalid_clause() {
   foo();
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -85,7 +85,7 @@ void test_non_identifiers() {
   foo();
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -126,7 +126,7 @@ void test_private() {
   foo();
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -157,7 +157,7 @@ void test_firstprivate() {
   foo();
 }
 
-void test_nowait() {
+void test_nowait(void) {
 #pragma omp single nowait nowait // expected-error {{directive '#pragma omp single' cannot contain more than one 'nowait' clause}}
   for (int i = 0; i < 16; ++i)
     ;

diff  --git a/clang/test/OpenMP/target_data_messages.c b/clang/test/OpenMP/target_data_messages.c
index bc164c3f1796d..50d793d257e52 100644
--- a/clang/test/OpenMP/target_data_messages.c
+++ b/clang/test/OpenMP/target_data_messages.c
@@ -4,7 +4,7 @@
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp45 -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized
 // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify=expected,omp50 -fopenmp-simd -fopenmp-version=50 -ferror-limit 100 -o - %s -Wuninitialized
 
-void foo() { }
+void foo(void) { }
 
 void xxx(int argc) {
   int map; // expected-note {{initialize the variable 'map' to silence this warning}}

diff  --git a/clang/test/OpenMP/target_parallel_for_misc_messages.c b/clang/test/OpenMP/target_parallel_for_misc_messages.c
index b9d34da99c3ce..d225a1e93d53e 100644
--- a/clang/test/OpenMP/target_parallel_for_misc_messages.c
+++ b/clang/test/OpenMP/target_parallel_for_misc_messages.c
@@ -8,7 +8,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target parallel for'}}
 #pragma omp target parallel for foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target parallel for
   for (i = 0; i < 16; ++i)
@@ -19,7 +19,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -46,7 +46,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
 #pragma omp target parallel for foo bar
@@ -54,7 +54,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target parallel for' are ignored}}
@@ -73,9 +73,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target parallel for collapse
@@ -174,7 +174,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -216,7 +216,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -258,7 +258,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -300,7 +300,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target parallel for

diff  --git a/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c
index 8084a89ad1095..6840308ebf2bb 100644
--- a/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c
+++ b/clang/test/OpenMP/target_parallel_for_simd_misc_messages.c
@@ -10,7 +10,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}}
 #pragma omp target parallel for simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target parallel for simd
   for (i = 0; i < 16; ++i)
@@ -21,7 +21,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -48,7 +48,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
 #pragma omp target parallel for simd foo bar
@@ -56,7 +56,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
@@ -75,9 +75,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target parallel for simd collapse
@@ -176,7 +176,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -218,7 +218,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -260,7 +260,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -302,7 +302,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target parallel for simd
@@ -316,7 +316,7 @@ void test_loop_messages() {
   }
 }
 
-void test_safelen() {
+void test_safelen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target parallel for simd safelen
@@ -401,7 +401,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target parallel for simd simdlen
@@ -486,7 +486,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 // expected-error at +1 {{the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter}}
 #pragma omp target parallel for simd simdlen(6) safelen(5)
@@ -498,7 +498,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp target parallel for simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp target parallel for simd nontemporal(

diff  --git a/clang/test/OpenMP/target_simd_misc_messages.c b/clang/test/OpenMP/target_simd_misc_messages.c
index c6b1496490461..7fdad47c1f655 100644
--- a/clang/test/OpenMP/target_simd_misc_messages.c
+++ b/clang/test/OpenMP/target_simd_misc_messages.c
@@ -10,7 +10,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target simd'}}
 #pragma omp target simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target simd
   for (i = 0; i < 16; ++i)
@@ -21,7 +21,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -48,7 +48,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target simd' are ignored}}
 #pragma omp target simd foo bar
@@ -56,7 +56,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target simd' are ignored}}
@@ -75,9 +75,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target simd collapse
@@ -166,7 +166,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -208,7 +208,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -250,7 +250,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -292,7 +292,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target simd
@@ -306,7 +306,7 @@ void test_loop_messages() {
   }
 }
 
-void test_safelen() {
+void test_safelen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target simd safelen
@@ -391,7 +391,7 @@ void test_safelen() {
     ;
 }
 
-void test_simdlen() {
+void test_simdlen(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target simd simdlen
@@ -476,7 +476,7 @@ void test_simdlen() {
     ;
 }
 
-void test_safelen_simdlen() {
+void test_safelen_simdlen(void) {
   int i;
 // expected-error at +1 {{the value of 'simdlen' parameter must be less than or equal to the value of the 'safelen' parameter}}
 #pragma omp target simd simdlen(6) safelen(5)
@@ -488,7 +488,7 @@ void test_safelen_simdlen() {
     ;
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp target simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp target simd nontemporal(

diff  --git a/clang/test/OpenMP/target_teams_distribute_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_misc_messages.c
index 42d6605d1525f..27b924d0bbf50 100644
--- a/clang/test/OpenMP/target_teams_distribute_misc_messages.c
+++ b/clang/test/OpenMP/target_teams_distribute_misc_messages.c
@@ -8,7 +8,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}}
 #pragma omp target teams distribute foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target teams distribute
   for (i = 0; i < 16; ++i)
@@ -19,7 +19,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -46,7 +46,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
 #pragma omp target teams distribute foo bar
@@ -54,7 +54,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}}
@@ -73,9 +73,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target teams distribute collapse
@@ -172,7 +172,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -214,7 +214,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -256,7 +256,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -301,7 +301,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target teams distribute

diff  --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
index 64654f3d293dc..1d771efd7d425 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c
@@ -8,7 +8,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
 #pragma omp target teams distribute parallel for foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target teams distribute parallel for
   for (i = 0; i < 16; ++i)
@@ -19,7 +19,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -46,7 +46,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
 #pragma omp target teams distribute parallel for foo bar
@@ -54,7 +54,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}}
@@ -73,9 +73,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target teams distribute parallel for collapse
@@ -172,7 +172,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -214,7 +214,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -256,7 +256,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -301,7 +301,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target teams distribute parallel for

diff  --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
index 89a71a9646359..dbc9d246953a0 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c
@@ -10,7 +10,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}}
 #pragma omp target teams distribute parallel for simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target teams distribute parallel for simd
   for (i = 0; i < 16; ++i)
@@ -21,7 +21,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -48,7 +48,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
 #pragma omp target teams distribute parallel for simd foo bar
@@ -56,7 +56,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}}
@@ -75,9 +75,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target teams distribute parallel for simd collapse
@@ -174,7 +174,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -216,7 +216,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -258,7 +258,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -307,7 +307,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target teams distribute parallel for simd
@@ -321,7 +321,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp target teams distribute parallel for simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp target teams distribute parallel for simd nontemporal(

diff  --git a/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c b/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c
index f577866534c97..ceb54d4f63ba2 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c
+++ b/clang/test/OpenMP/target_teams_distribute_simd_misc_messages.c
@@ -10,7 +10,7 @@
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}}
 #pragma omp target teams distribute simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp target teams distribute simd
   for (i = 0; i < 16; ++i)
@@ -21,7 +21,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -48,7 +48,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
 #pragma omp target teams distribute simd foo bar
@@ -56,7 +56,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}}
@@ -75,9 +75,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 // expected-error at +1 {{expected '('}}
 #pragma omp target teams distribute simd collapse
@@ -174,7 +174,7 @@ void test_collapse() {
         i += j;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 // expected-error at +2 {{expected expression}}
 // expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
@@ -216,7 +216,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -258,7 +258,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
 // expected-error at +1 {{expected expression}}
@@ -307,7 +307,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 // expected-error at +2 {{variable must be of integer or pointer type}}
 #pragma omp target teams distribute simd
@@ -321,7 +321,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp target teams distribute simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp target teams distribute simd nontemporal(

diff  --git a/clang/test/OpenMP/target_uses_allocators.c b/clang/test/OpenMP/target_uses_allocators.c
index 5d1aaa37d8452..a94c94df69b79 100644
--- a/clang/test/OpenMP/target_uses_allocators.c
+++ b/clang/test/OpenMP/target_uses_allocators.c
@@ -21,7 +21,7 @@ enum omp_allocator_handle_t {
 };
 
 // CHECK: define {{.*}}[[FIE:@.+]]()
-void fie() {
+void fie(void) {
   int x;
   #pragma omp target uses_allocators(omp_null_allocator) allocate(omp_null_allocator: x) firstprivate(x)
   {}

diff  --git a/clang/test/OpenMP/task_codegen.c b/clang/test/OpenMP/task_codegen.c
index c20e0727a9c02..fa5c0e9f425ca 100644
--- a/clang/test/OpenMP/task_codegen.c
+++ b/clang/test/OpenMP/task_codegen.c
@@ -13,10 +13,10 @@
 typedef void *omp_depend_t;
 typedef __UINTPTR_TYPE__ omp_event_handle_t;
 
-void foo();
+void foo(void);
 
 // CHECK-LABEL: @main
-int main() {
+int main(void) {
   omp_depend_t d, x;
   omp_event_handle_t evt;
   int a, *b;
@@ -131,7 +131,7 @@ int main() {
 // CHECK: call void @__kmpc_end_taskgroup(
 
 // CHECK-LINE: @bar
-void bar() {
+void bar(void) {
   int **a;
   // CHECK: call void @__kmpc_for_static_init_4(
 #pragma omp for

diff  --git a/clang/test/OpenMP/task_target_device_codegen.c b/clang/test/OpenMP/task_target_device_codegen.c
index 77230d293e58e..9f5b057cc0063 100644
--- a/clang/test/OpenMP/task_target_device_codegen.c
+++ b/clang/test/OpenMP/task_target_device_codegen.c
@@ -11,7 +11,7 @@
 #ifndef HEADER
 #define HEADER
 
-void test_task_affinity() {
+void test_task_affinity(void) {
   int t;
 #pragma omp task
   {

diff  --git a/clang/test/OpenMP/taskloop_misc_messages.c b/clang/test/OpenMP/taskloop_misc_messages.c
index 5805bfe501900..e2ff1101f19f1 100644
--- a/clang/test/OpenMP/taskloop_misc_messages.c
+++ b/clang/test/OpenMP/taskloop_misc_messages.c
@@ -15,7 +15,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp taskloop'}}
 #pragma omp taskloop foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp taskloop
   for (i = 0; i < 16; ++i)
@@ -26,7 +26,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -54,7 +54,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp taskloop' are ignored}}
@@ -67,7 +67,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -95,9 +95,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -205,7 +205,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -256,7 +256,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -307,7 +307,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -358,7 +358,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}

diff  --git a/clang/test/OpenMP/taskloop_simd_misc_messages.c b/clang/test/OpenMP/taskloop_simd_misc_messages.c
index cbcfc0d30a4cf..7f39482f112c2 100644
--- a/clang/test/OpenMP/taskloop_simd_misc_messages.c
+++ b/clang/test/OpenMP/taskloop_simd_misc_messages.c
@@ -17,7 +17,7 @@ void xxx(int argc) {
 // expected-error at +1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}}
 #pragma omp taskloop simd foo
 
-void test_no_clause() {
+void test_no_clause(void) {
   int i;
 #pragma omp taskloop simd
   for (i = 0; i < 16; ++i)
@@ -28,7 +28,7 @@ void test_no_clause() {
   ++i;
 }
 
-void test_branch_protected_scope() {
+void test_branch_protected_scope(void) {
   int i = 0;
 L1:
   ++i;
@@ -56,7 +56,7 @@ void test_branch_protected_scope() {
     goto L1;
 }
 
-void test_invalid_clause() {
+void test_invalid_clause(void) {
   int i;
 #pragma omp parallel
 // expected-warning at +1 {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
@@ -69,7 +69,7 @@ void test_invalid_clause() {
     ;
 }
 
-void test_non_identifiers() {
+void test_non_identifiers(void) {
   int i, x;
 
 #pragma omp parallel
@@ -96,9 +96,9 @@ void test_non_identifiers() {
     ;
 }
 
-extern int foo();
+extern int foo(void);
 
-void test_collapse() {
+void test_collapse(void) {
   int i;
 #pragma omp parallel
 // expected-error at +1 {{expected '('}}
@@ -206,7 +206,7 @@ void test_collapse() {
     ;
 }
 
-void test_private() {
+void test_private(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected expression}}
@@ -257,7 +257,7 @@ void test_private() {
   }
 }
 
-void test_lastprivate() {
+void test_lastprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -308,7 +308,7 @@ void test_lastprivate() {
     ;
 }
 
-void test_firstprivate() {
+void test_firstprivate(void) {
   int i;
 #pragma omp parallel
 // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
@@ -363,7 +363,7 @@ void test_firstprivate() {
     ;
 }
 
-void test_loop_messages() {
+void test_loop_messages(void) {
   float a[100], b[100], c[100];
 #pragma omp parallel
 // expected-error at +2 {{variable must be of integer or pointer type}}
@@ -385,7 +385,7 @@ void test_loop_messages() {
   }
 }
 
-void test_nontemporal() {
+void test_nontemporal(void) {
   int i;
 // omp45-error at +1 {{unexpected OpenMP clause 'nontemporal' in directive '#pragma omp taskloop simd'}} expected-error at +1 {{expected expression}} expected-error at +1 {{expected ')'}} expected-note at +1 {{to match this '('}}
 #pragma omp taskloop simd nontemporal(

diff  --git a/clang/test/OpenMP/vla_crash.c b/clang/test/OpenMP/vla_crash.c
index fdef87e4c5b5d..c77fe26ea4075 100644
--- a/clang/test/OpenMP/vla_crash.c
+++ b/clang/test/OpenMP/vla_crash.c
@@ -5,7 +5,7 @@
 
 int a;
 
-void foo() {
+void foo(void) {
   int(*b)[a];
   int *(**c)[a];
 #pragma omp parallel if (0)

diff  --git a/clang/test/PCH/Inputs/arc.h b/clang/test/PCH/Inputs/arc.h
index 304e612a0d91a..5d8dea183de66 100644
--- a/clang/test/PCH/Inputs/arc.h
+++ b/clang/test/PCH/Inputs/arc.h
@@ -3,16 +3,16 @@
 typedef const void *CFTypeRef;
 typedef const struct __CFString *CFStringRef;
 
-CFTypeRef CFCreateSomething();
-CFStringRef CFCreateString();
-CFTypeRef CFGetSomething();
-CFStringRef CFGetString();
+CFTypeRef CFCreateSomething(void);
+CFStringRef CFCreateString(void);
+CFTypeRef CFGetSomething(void);
+CFStringRef CFGetString(void);
 
 @interface NSString
 @end
 
-id CreateSomething();
-NSString *CreateNSString();
+id CreateSomething(void);
+NSString *CreateNSString(void);
 
 #if __has_feature(objc_arc)
 #define BRIDGE __bridge

diff  --git a/clang/test/PCH/Inputs/chain-decls1.h b/clang/test/PCH/Inputs/chain-decls1.h
index 9de446164d6df..5700dd73bc7da 100644
--- a/clang/test/PCH/Inputs/chain-decls1.h
+++ b/clang/test/PCH/Inputs/chain-decls1.h
@@ -1,11 +1,11 @@
-void f();
+void f(void);
 
 struct one {};
-void two();
+void two(void);
 
 void many(int i);
 struct many;
 void many(int j);
 struct many;
 
-void noret();
+void noret(void);

diff  --git a/clang/test/PCH/Inputs/chain-decls2.h b/clang/test/PCH/Inputs/chain-decls2.h
index b8b7d0466dc31..c6488a3a738dd 100644
--- a/clang/test/PCH/Inputs/chain-decls2.h
+++ b/clang/test/PCH/Inputs/chain-decls2.h
@@ -1,7 +1,7 @@
-void g();
+void g(void);
 
 struct two {};
-void one();
+void one(void);
 struct three {}; // for verification
 
 void many(int k);
@@ -9,4 +9,4 @@ struct many;
 void many(int l);
 struct many {};
 
-void noret() __attribute__((noreturn));
+void noret(void) __attribute__((noreturn));

diff  --git a/clang/test/PCH/Inputs/chain-macro-override1.h b/clang/test/PCH/Inputs/chain-macro-override1.h
index 7532d7ef58d64..9cd6a66b3d314 100644
--- a/clang/test/PCH/Inputs/chain-macro-override1.h
+++ b/clang/test/PCH/Inputs/chain-macro-override1.h
@@ -1,5 +1,5 @@
-void f() __attribute__((unavailable));
-void g();
+void f(void) __attribute__((unavailable));
+void g(void);
 #define g() f()
 #define h() f()
 #define x x

diff  --git a/clang/test/PCH/Inputs/chain-macro-override2.h b/clang/test/PCH/Inputs/chain-macro-override2.h
index 1e0e3b9671567..9da208c8ba6a3 100644
--- a/clang/test/PCH/Inputs/chain-macro-override2.h
+++ b/clang/test/PCH/Inputs/chain-macro-override2.h
@@ -5,4 +5,4 @@
 int x;
 #undef h2
 
-int h3();
+int h3(void);

diff  --git a/clang/test/PCH/Inputs/chain-macro1.h b/clang/test/PCH/Inputs/chain-macro1.h
index 2e80e47aead04..f2541d77c81ed 100644
--- a/clang/test/PCH/Inputs/chain-macro1.h
+++ b/clang/test/PCH/Inputs/chain-macro1.h
@@ -1 +1 @@
-#define FOOBAR void f();
+#define FOOBAR void f(void);

diff  --git a/clang/test/PCH/Inputs/chain-macro2.h b/clang/test/PCH/Inputs/chain-macro2.h
index e888228a4c003..0f895a93f0f9b 100644
--- a/clang/test/PCH/Inputs/chain-macro2.h
+++ b/clang/test/PCH/Inputs/chain-macro2.h
@@ -1 +1 @@
-#define BARFOO void g();
+#define BARFOO void g(void);

diff  --git a/clang/test/PCH/Inputs/chain-selectors1.h b/clang/test/PCH/Inputs/chain-selectors1.h
index b0b68f8332c11..989b490a555ca 100644
--- a/clang/test/PCH/Inputs/chain-selectors1.h
+++ b/clang/test/PCH/Inputs/chain-selectors1.h
@@ -5,7 +5,7 @@
   -(void)h:(int)p1 foo:(int)p2;
 @end
 
-void foo1() {
+void foo1(void) {
   // FIXME: Can't verify warnings in headers
   //(void)@selector(x);
   (void)@selector(f);

diff  --git a/clang/test/PCH/Inputs/chain-selectors2.h b/clang/test/PCH/Inputs/chain-selectors2.h
index 741da9288a0c4..655f5659d22b1 100644
--- a/clang/test/PCH/Inputs/chain-selectors2.h
+++ b/clang/test/PCH/Inputs/chain-selectors2.h
@@ -6,7 +6,7 @@
   -(void)e;
 @end
 
-void foo2() {
+void foo2(void) {
   // FIXME: Can't verify warnings in headers
   //(void)@selector(y);
   //(void)@selector(e);

diff  --git a/clang/test/PCH/asm.h b/clang/test/PCH/asm.h
index 5a7268eff6e6a..01734b61a1af5 100644
--- a/clang/test/PCH/asm.h
+++ b/clang/test/PCH/asm.h
@@ -1,6 +1,6 @@
 // Header for the PCH test asm.c
 
-void f() {
+void f(void) {
   int i,cond;
 
   asm ("foo\n" : : "a" (i + 2));
@@ -11,7 +11,7 @@ void f() {
   return;
 }
 
-void clobbers() {
+void clobbers(void) {
   asm ("nop" : : : "ax", "#ax", "%ax");
   asm ("nop" : : : "eax", "rax", "ah", "al");
   asm ("nop" : : : "0", "%0", "#0");

diff  --git a/clang/test/PCH/attrs-PR8406.c b/clang/test/PCH/attrs-PR8406.c
index 85225f5a9cf1d..5e16a74ee21f9 100644
--- a/clang/test/PCH/attrs-PR8406.c
+++ b/clang/test/PCH/attrs-PR8406.c
@@ -16,7 +16,7 @@ struct Bar
 
 #else
 
-void foo() {
+void foo(void) {
   struct Bar bar;
 }
 

diff  --git a/clang/test/PCH/attrs.c b/clang/test/PCH/attrs.c
index 3bf660cf28e06..5a2ce91cc2627 100644
--- a/clang/test/PCH/attrs.c
+++ b/clang/test/PCH/attrs.c
@@ -16,6 +16,6 @@ int g(int) __attribute__((abi_tag("foo", "bar", "baz"), no_sanitize("address", "
 float f(float);
 double f(double); // expected-error{{overloadable}}
                   // expected-note at -2{{previous unmarked overload}}
-void h() { g(0); }
+void h(void) { g(0); }
 
 #endif

diff  --git a/clang/test/PCH/builtins.c b/clang/test/PCH/builtins.c
index da9eef7496cd8..c6f5773aec26a 100644
--- a/clang/test/PCH/builtins.c
+++ b/clang/test/PCH/builtins.c
@@ -7,6 +7,6 @@
 
 // expected-no-diagnostics
 
-void hello() {
+void hello(void) {
   printf("Hello, World!");
 }

diff  --git a/clang/test/PCH/chain-decls.c b/clang/test/PCH/chain-decls.c
index bffa09228f90c..9011f22cdd59c 100644
--- a/clang/test/PCH/chain-decls.c
+++ b/clang/test/PCH/chain-decls.c
@@ -12,7 +12,7 @@
 // CHECK: void f();
 // CHECK: void g();
 
-int h() {
+int h(void) {
   f();
   g();
 

diff  --git a/clang/test/PCH/chain-macro-override.c b/clang/test/PCH/chain-macro-override.c
index 24a7b3edf640d..38025e87a6a99 100644
--- a/clang/test/PCH/chain-macro-override.c
+++ b/clang/test/PCH/chain-macro-override.c
@@ -6,7 +6,7 @@
 // RUN: %clang_cc1 -emit-pch -o %t2 %S/Inputs/chain-macro-override2.h -include-pch %t1 -detailed-preprocessing-record 
 // RUN: %clang_cc1 -include-pch %t2 -fsyntax-only -verify %s
 
-int foo() {
+int foo(void) {
   f();
   g();
   h();

diff  --git a/clang/test/PCH/chain-selectors.m b/clang/test/PCH/chain-selectors.m
index 2551c643cc8bd..c211ec8e3db99 100644
--- a/clang/test/PCH/chain-selectors.m
+++ b/clang/test/PCH/chain-selectors.m
@@ -11,7 +11,7 @@ -(void)g: (int)p {}
 -(void)h: (int)p1 foo: (int)p2 {}
 @end
 
-void bar() {
+void bar(void) {
   id a = 0;
   [a nothing]; // expected-warning {{method '-nothing' not found}}
   [a f];

diff  --git a/clang/test/PCH/debug-info-limited-struct.h b/clang/test/PCH/debug-info-limited-struct.h
index 593e722ce9c0a..ca4c096e6459c 100644
--- a/clang/test/PCH/debug-info-limited-struct.h
+++ b/clang/test/PCH/debug-info-limited-struct.h
@@ -2,7 +2,7 @@ struct foo {
   int i;
 };
 
-void func() {
+void func(void) {
   struct foo *f;
   f->i = 3;
 }


        


More information about the cfe-commits mailing list