[clang] 7de7161 - Use functions with prototypes when appropriate; NFC
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 14:16:20 PST 2022
Author: Aaron Ballman
Date: 2022-02-09T17:16:10-05:00
New Revision: 7de71613049fa1333ef819b6dc740356ff4efff5
URL: https://github.com/llvm/llvm-project/commit/7de71613049fa1333ef819b6dc740356ff4efff5
DIFF: https://github.com/llvm/llvm-project/commit/7de71613049fa1333ef819b6dc740356ff4efff5.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 sixth batch of tests being updated (there are a significant
number of other tests left to be updated).
Added:
Modified:
clang/test/Driver/attr-availability-fuchsia.c
clang/test/Driver/cc-log-diagnostics.c
clang/test/Driver/cl-options.c
clang/test/Driver/cl-x86-flags.c
clang/test/Driver/darwin-iphone-defaults.m
clang/test/Driver/debug-pass-structure.c
clang/test/Driver/exceptions.m
clang/test/Driver/extract-api.c
clang/test/Driver/implicit-function-as-error.c
clang/test/Driver/no-objc-arr.m
clang/test/Driver/ppc-mprivileged-support-check.c
clang/test/Driver/ppc-p10-features-support-check.c
clang/test/Driver/redzone.c
clang/test/Driver/riscv32-toolchain.c
clang/test/Driver/riscv64-toolchain.c
clang/test/Driver/types.c
clang/test/Driver/x86-mgeneral-regs-only.c
clang/test/FixIt/auto-fixit.m
clang/test/FixIt/auto-isa-fixit.m
clang/test/FixIt/fixit-availability-maccatalyst.m
clang/test/FixIt/fixit-availability.c
clang/test/FixIt/fixit-class-method-messaging.m
clang/test/FixIt/fixit-errors.c
clang/test/FixIt/fixit-format-darwin.m
clang/test/FixIt/fixit-format-ios-nopedantic.m
clang/test/FixIt/fixit-format-ios.m
clang/test/FixIt/fixit-multiple-selector-warnings.m
clang/test/FixIt/fixit-newline-style.c
clang/test/FixIt/fixit-nsstring-compare.m
clang/test/FixIt/fixit-objc.m
clang/test/FixIt/fixit-recursive-block.c
clang/test/FixIt/fixit-static-object-decl.m
clang/test/FixIt/fixit-uninit.c
clang/test/FixIt/fixit.c
clang/test/FixIt/format-darwin.m
clang/test/FixIt/format.m
clang/test/FixIt/multiarg-selector-fixit.m
clang/test/FixIt/no-macro-fixit.c
clang/test/FixIt/objc-literals.m
clang/test/FixIt/property-access-fixit.m
clang/test/FixIt/typo.c
clang/test/FixIt/typo.m
clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
clang/test/Frontend/Inputs/absolute-paths.h
clang/test/Frontend/Inputs/line-directive.h
clang/test/Frontend/Inputs/rewrite-includes-messages.h
clang/test/Frontend/absolute-paths.c
clang/test/Frontend/ast-codegen.c
clang/test/Frontend/ast-main.c
clang/test/Frontend/backend-diagnostic.c
clang/test/Frontend/embed-bitcode-noopt.c
clang/test/Frontend/fixed_point_add.c
clang/test/Frontend/fixed_point_comparisons.c
clang/test/Frontend/fixed_point_compound.c
clang/test/Frontend/fixed_point_conversions.c
clang/test/Frontend/fixed_point_conversions_half.c
clang/test/Frontend/fixed_point_crash.c
clang/test/Frontend/fixed_point_div.c
clang/test/Frontend/fixed_point_errors.c
clang/test/Frontend/fixed_point_mul.c
clang/test/Frontend/fixed_point_same_fbits.c
clang/test/Frontend/fixed_point_shift.c
clang/test/Frontend/fixed_point_sub.c
clang/test/Frontend/fixed_point_to_bool.c
clang/test/Frontend/fixed_point_unary.c
clang/test/Frontend/fixed_point_unknown_conversions.c
clang/test/Frontend/ir-support.c
clang/test/Frontend/noderef.c
clang/test/Frontend/noderef_on_non_pointers.m
clang/test/Frontend/stdin-input.c
clang/test/Frontend/system-header-line-directive-ms-lineendings.c
clang/test/Frontend/system-header-line-directive.c
clang/test/Frontend/verify-prefixes.c
clang/test/Frontend/warning-mapping-2.c
clang/test/Headers/altivec-intrin.c
clang/test/Headers/arm-acle-header.c
clang/test/Headers/c11.c
clang/test/Headers/typedef_guards.c
clang/test/Headers/x86-header-warnings.c
clang/test/Index/Core/index-pch.c
clang/test/Index/Inputs/Headers/a.h
clang/test/Index/Inputs/Headers/a_extensions.h
clang/test/Index/Inputs/Headers/crash.h
clang/test/Index/annotate-comments-objc.m
clang/test/Index/crash-recovery-modules.m
clang/test/Index/pragma-diag-reparse.c
clang/test/Index/preamble-reparse-cmd-define.c
clang/test/Index/preamble-reparse-cmd-define.c.remap
clang/test/Index/preamble-reparse-import.m
clang/test/Index/preamble-reparse-warn-macro.c
clang/test/Index/warning-flags.c
clang/test/Integration/thinlto_profile_sample_accurate.c
clang/test/InterfaceStubs/externstatic.c
clang/test/InterfaceStubs/inline.c
clang/test/InterfaceStubs/inline.h
clang/test/Lexer/c90.c
clang/test/Lexer/char-escapes-delimited.c
clang/test/Lexer/conflict-marker.c
clang/test/Lexer/ms-extensions.c
clang/test/Lexer/multiple-include.c
clang/test/Lexer/newline-eof.c
clang/test/Lexer/numeric-literal-trash.c
clang/test/Lexer/objc_macros.m
clang/test/Lexer/pragma-region.c
clang/test/Lexer/string_concat.cpp
clang/test/Lexer/unicode.c
clang/test/Lexer/wchar.c
clang/test/Misc/Inputs/remapped-file-2
clang/test/Misc/caret-diags-macros.c
clang/test/Misc/clear-ast-before-backend.c
clang/test/Misc/diag-macro-backtrace2.c
clang/test/Misc/loop-opt-setup.c
clang/test/Misc/printer.c
clang/test/Misc/remap-file.c
clang/test/Misc/serialized-diags-driver.c
clang/test/Misc/serialized-diags-no-issue.c
clang/test/Misc/serialized-diags-single-issue.c
clang/test/Misc/serialized-diags-stable.c
clang/test/Misc/serialized-diags.c
clang/test/Misc/wrong-encoding.c
clang/test/Misc/wrong-encoding2.c
Removed:
################################################################################
diff --git a/clang/test/Driver/attr-availability-fuchsia.c b/clang/test/Driver/attr-availability-fuchsia.c
index 379a685d1a3f0..c59a4f176c78e 100644
--- a/clang/test/Driver/attr-availability-fuchsia.c
+++ b/clang/test/Driver/attr-availability-fuchsia.c
@@ -29,11 +29,11 @@
// CHECK-ERROR: error: invalid integral value '16.0.0' in '-ffuchsia-api-level=16.0.0'
#if __Fuchsia_API_level__ >= 16
-void f16() {
+void f16(void) {
}
#else
-void f15() {
+void f15(void) {
}
#endif
diff --git a/clang/test/Driver/cc-log-diagnostics.c b/clang/test/Driver/cc-log-diagnostics.c
index 069d2ad629226..c6c0afa2a1e20 100644
--- a/clang/test/Driver/cc-log-diagnostics.c
+++ b/clang/test/Driver/cc-log-diagnostics.c
@@ -4,7 +4,7 @@
// RUN: %clang -Wfoobar -no-canonical-prefixes -target x86_64-apple-darwin10 -fsyntax-only %s
// RUN: FileCheck %s < %t.log
-int f0() {}
+int f0(void) {}
// CHECK: <dict>
// CHECK: <key>main-file</key>
@@ -27,7 +27,7 @@ int f0() {}
// CHECK: <key>line</key>
// CHECK: <integer>7</integer>
// CHECK: <key>column</key>
-// CHECK: <integer>11</integer>
+// CHECK: <integer>15</integer>
// CHECK: <key>message</key>
// CHECK: <string>non-void function does not return a value</string>
// CHECK: </dict>
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 8d240e6e6e5c6..50c2443c21899 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -772,4 +772,4 @@
// FAKEDIR: "-libpath:/foo{{/|\\\\}}Lib{{/|\\\\}}10.0.12345.0{{/|\\\\}}ucrt
// FAKEDIR: "-libpath:/foo{{/|\\\\}}Lib{{/|\\\\}}10.0.12345.0{{/|\\\\}}um
-void f() { }
+void f(void) { }
diff --git a/clang/test/Driver/cl-x86-flags.c b/clang/test/Driver/cl-x86-flags.c
index 8d7b74ffb87ac..51b16f0ce3546 100644
--- a/clang/test/Driver/cl-x86-flags.c
+++ b/clang/test/Driver/cl-x86-flags.c
@@ -133,5 +133,5 @@
// tune: "-target-cpu" "sandybridge"
// tune-SAME: "-tune-cpu" "haswell"
-void f() {
+void f(void) {
}
diff --git a/clang/test/Driver/darwin-iphone-defaults.m b/clang/test/Driver/darwin-iphone-defaults.m
index fe50bbda5a501..ec9507fd091a3 100644
--- a/clang/test/Driver/darwin-iphone-defaults.m
+++ b/clang/test/Driver/darwin-iphone-defaults.m
@@ -6,8 +6,8 @@
// CHECK-NOT: msgSend_fixup_alloc
// CHECK: OBJC_SELECTOR_REFERENCES
-int f0() {
- return ^(){ return 0; }();
+int f0(void) {
+ return ^(void){ return 0; }();
}
@interface I0
@@ -22,7 +22,7 @@ @interface I1
+(id) alloc;
@end
-void f1() {
+void f1(void) {
[I1 alloc];
}
diff --git a/clang/test/Driver/debug-pass-structure.c b/clang/test/Driver/debug-pass-structure.c
index 5fde11e4d80dc..8f75c00e8638e 100644
--- a/clang/test/Driver/debug-pass-structure.c
+++ b/clang/test/Driver/debug-pass-structure.c
@@ -12,4 +12,4 @@
// LEGACYPM: Pass Arguments:
-void f() {}
+void f(void) {}
diff --git a/clang/test/Driver/exceptions.m b/clang/test/Driver/exceptions.m
index 9b747bb84d197..51f1dd241bca2 100644
--- a/clang/test/Driver/exceptions.m
+++ b/clang/test/Driver/exceptions.m
@@ -1,11 +1,11 @@
// RUN: %clang -target x86_64-apple-darwin9 \
// RUN: -fsyntax-only -fno-exceptions %s
-void f1() {
+void f1(void) {
@throw @"A";
}
-void f0() {
+void f0(void) {
@try {
f1();
} @catch (id x) {
@@ -13,7 +13,7 @@ void f0() {
}
}
-int main() {
+int main(void) {
f0();
return 0;
}
diff --git a/clang/test/Driver/extract-api.c b/clang/test/Driver/extract-api.c
index f58d3a42ee241..4aba3ba9f61ab 100644
--- a/clang/test/Driver/extract-api.c
+++ b/clang/test/Driver/extract-api.c
@@ -12,5 +12,5 @@
// FIXME: Check for the dummy output now to verify that the custom action was executed.
// RUN: %clang -extract-api %s | FileCheck -check-prefix DUMMY-OUTPUT %s
-void dummy_function();
+void dummy_function(void);
// DUMMY-OUTPUT: dummy_function
diff --git a/clang/test/Driver/implicit-function-as-error.c b/clang/test/Driver/implicit-function-as-error.c
index d6309963ff730..9c45e2021245f 100644
--- a/clang/test/Driver/implicit-function-as-error.c
+++ b/clang/test/Driver/implicit-function-as-error.c
@@ -5,7 +5,7 @@
// For 64-bit iOS, automatically promote -Wimplicit-function-declaration
// to an error.
-void radar_10894044() {
+void radar_10894044(void) {
printf("Hi\n"); // expected-error {{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} expected-note {{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
radar_10894044_not_declared(); // expected-error {{implicit declaration of function 'radar_10894044_not_declared' is invalid in C99}}
}
diff --git a/clang/test/Driver/no-objc-arr.m b/clang/test/Driver/no-objc-arr.m
index 21246a37a6afa..fba284f8bef1c 100644
--- a/clang/test/Driver/no-objc-arr.m
+++ b/clang/test/Driver/no-objc-arr.m
@@ -2,7 +2,7 @@
// expected-no-diagnostics
// rdar://8949617
-void * FOO() {
+void * FOO(void) {
id string = @"Hello World.\n";
void *pointer = string; // No error must be issued
return pointer;
diff --git a/clang/test/Driver/ppc-mprivileged-support-check.c b/clang/test/Driver/ppc-mprivileged-support-check.c
index 88b8103b79b1d..85b7259908a10 100644
--- a/clang/test/Driver/ppc-mprivileged-support-check.c
+++ b/clang/test/Driver/ppc-mprivileged-support-check.c
@@ -17,7 +17,7 @@
// RUN: -mcpu=power7 -mprivileged %s 2>&1 | FileCheck %s --check-prefix=NOPRIV
// __SP__ TODO: Fix this test case to check for the attribute.
-int test() {
+int test(void) {
return 0;
}
diff --git a/clang/test/Driver/ppc-p10-features-support-check.c b/clang/test/Driver/ppc-p10-features-support-check.c
index 20812552ee632..494514a9c1b90 100644
--- a/clang/test/Driver/ppc-p10-features-support-check.c
+++ b/clang/test/Driver/ppc-p10-features-support-check.c
@@ -38,7 +38,7 @@
// RUN: -mpcrel -mprefixed %s 2>&1 | FileCheck %s \
// RUN: --check-prefix=NOPCREL-PREFIX
-int test_p10_features() {
+int test_p10_features(void) {
return 0;
}
diff --git a/clang/test/Driver/redzone.c b/clang/test/Driver/redzone.c
index 7d6d424679524..1ab71716fe728 100644
--- a/clang/test/Driver/redzone.c
+++ b/clang/test/Driver/redzone.c
@@ -3,4 +3,4 @@
// RUN: %clang -target i386-unknown-unknown -mred-zone %s -S -emit-llvm -o %t.log
// RUN: grep -v 'noredzone' %t.log
-int foo() { return 42; }
+int foo(void) { return 42; }
diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c
index 3d03704a2b186..fb262a19a0439 100644
--- a/clang/test/Driver/riscv32-toolchain.c
+++ b/clang/test/Driver/riscv32-toolchain.c
@@ -329,46 +329,46 @@ int size_a_ld = sizeof(_Atomic(long double));
// Check types
// CHECK: zeroext i8 @check_char()
-char check_char() { return 0; }
+char check_char(void) { return 0; }
// CHECK: define dso_local signext i16 @check_short()
-short check_short() { return 0; }
+short check_short(void) { return 0; }
// CHECK: define dso_local i32 @check_int()
-int check_int() { return 0; }
+int check_int(void) { return 0; }
// CHECK: define dso_local i32 @check_wchar_t()
-int check_wchar_t() { return 0; }
+int check_wchar_t(void) { return 0; }
// CHECK: define dso_local i32 @check_long()
-long check_long() { return 0; }
+long check_long(void) { return 0; }
// CHECK: define dso_local i64 @check_longlong()
-long long check_longlong() { return 0; }
+long long check_longlong(void) { return 0; }
// CHECK: define dso_local zeroext i8 @check_uchar()
-unsigned char check_uchar() { return 0; }
+unsigned char check_uchar(void) { return 0; }
// CHECK: define dso_local zeroext i16 @check_ushort()
-unsigned short check_ushort() { return 0; }
+unsigned short check_ushort(void) { return 0; }
// CHECK: define dso_local i32 @check_uint()
-unsigned int check_uint() { return 0; }
+unsigned int check_uint(void) { return 0; }
// CHECK: define dso_local i32 @check_ulong()
-unsigned long check_ulong() { return 0; }
+unsigned long check_ulong(void) { return 0; }
// CHECK: define dso_local i64 @check_ulonglong()
-unsigned long long check_ulonglong() { return 0; }
+unsigned long long check_ulonglong(void) { return 0; }
// CHECK: define dso_local i32 @check_size_t()
-size_t check_size_t() { return 0; }
+size_t check_size_t(void) { return 0; }
// CHECK: define dso_local float @check_float()
-float check_float() { return 0; }
+float check_float(void) { return 0; }
// CHECK: define dso_local double @check_double()
-double check_double() { return 0; }
+double check_double(void) { return 0; }
// CHECK: define dso_local fp128 @check_longdouble()
-long double check_longdouble() { return 0; }
+long double check_longdouble(void) { return 0; }
diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c
index daa34a22e7087..2774e004854c3 100644
--- a/clang/test/Driver/riscv64-toolchain.c
+++ b/clang/test/Driver/riscv64-toolchain.c
@@ -285,46 +285,46 @@ int size_a_ld = sizeof(_Atomic(long double));
// Check types
// CHECK: define dso_local zeroext i8 @check_char()
-char check_char() { return 0; }
+char check_char(void) { return 0; }
// CHECK: define dso_local signext i16 @check_short()
-short check_short() { return 0; }
+short check_short(void) { return 0; }
// CHECK: define dso_local signext i32 @check_int()
-int check_int() { return 0; }
+int check_int(void) { return 0; }
// CHECK: define dso_local signext i32 @check_wchar_t()
-int check_wchar_t() { return 0; }
+int check_wchar_t(void) { return 0; }
// CHECK: define dso_local i64 @check_long()
-long check_long() { return 0; }
+long check_long(void) { return 0; }
// CHECK: define dso_local i64 @check_longlong()
-long long check_longlong() { return 0; }
+long long check_longlong(void) { return 0; }
// CHECK: define dso_local zeroext i8 @check_uchar()
-unsigned char check_uchar() { return 0; }
+unsigned char check_uchar(void) { return 0; }
// CHECK: define dso_local zeroext i16 @check_ushort()
-unsigned short check_ushort() { return 0; }
+unsigned short check_ushort(void) { return 0; }
// CHECK: define dso_local signext i32 @check_uint()
-unsigned int check_uint() { return 0; }
+unsigned int check_uint(void) { return 0; }
// CHECK: define dso_local i64 @check_ulong()
-unsigned long check_ulong() { return 0; }
+unsigned long check_ulong(void) { return 0; }
// CHECK: define dso_local i64 @check_ulonglong()
-unsigned long long check_ulonglong() { return 0; }
+unsigned long long check_ulonglong(void) { return 0; }
// CHECK: define dso_local i64 @check_size_t()
-size_t check_size_t() { return 0; }
+size_t check_size_t(void) { return 0; }
// CHECK: define dso_local float @check_float()
-float check_float() { return 0; }
+float check_float(void) { return 0; }
// CHECK: define dso_local double @check_double()
-double check_double() { return 0; }
+double check_double(void) { return 0; }
// CHECK: define dso_local fp128 @check_longdouble()
-long double check_longdouble() { return 0; }
+long double check_longdouble(void) { return 0; }
diff --git a/clang/test/Driver/types.c b/clang/test/Driver/types.c
index febce5c709ea7..76823ad702b6b 100644
--- a/clang/test/Driver/types.c
+++ b/clang/test/Driver/types.c
@@ -15,7 +15,7 @@
// RUN: %clang -c --target=powerpc64-ibm-aix -fsyntax-only %s \
// RUN: 2>&1
-void a() {
+void a(void) {
__int128_t s;
__uint128_t t;
}
diff --git a/clang/test/Driver/x86-mgeneral-regs-only.c b/clang/test/Driver/x86-mgeneral-regs-only.c
index 35f96795eb9de..2d417bafb8a02 100644
--- a/clang/test/Driver/x86-mgeneral-regs-only.c
+++ b/clang/test/Driver/x86-mgeneral-regs-only.c
@@ -20,7 +20,7 @@
// CMD: "-target-feature" "-sse"
// CMD-AFTER: "-target-feature" "+avx2"
-void foo() { }
+void foo(void) { }
// IR-GPR: attributes {{.*}} = { {{.*}} "target-features"="{{.*}}-avx{{.*}}-avx2{{.*}}-avx512f{{.*}}-sse{{.*}}-sse2{{.*}}-ssse3{{.*}}-x87{{.*}}"
// IR-AVX2: attributes {{.*}} = { {{.*}} "target-features"="{{.*}}+avx{{.*}}+avx2{{.*}}+sse{{.*}}+sse2{{.*}}+ssse3{{.*}}-avx512f{{.*}}-x87{{.*}}"
diff --git a/clang/test/FixIt/auto-fixit.m b/clang/test/FixIt/auto-fixit.m
index d09f04c2b7976..4d33ea30e21d8 100644
--- a/clang/test/FixIt/auto-fixit.m
+++ b/clang/test/FixIt/auto-fixit.m
@@ -5,7 +5,7 @@
// rdar://9036633
-int main() {
+int main(void) {
auto int i = 0;
return i;
}
diff --git a/clang/test/FixIt/auto-isa-fixit.m b/clang/test/FixIt/auto-isa-fixit.m
index 3f22c1838ac09..5af90f52bdf3c 100644
--- a/clang/test/FixIt/auto-isa-fixit.m
+++ b/clang/test/FixIt/auto-isa-fixit.m
@@ -6,7 +6,7 @@
void object_setClass(id, id);
Class object_getClass(id);
-id rhs();
+id rhs(void);
Class pr6302(id x123) {
x123->isa = 0;
diff --git a/clang/test/FixIt/fixit-availability-maccatalyst.m b/clang/test/FixIt/fixit-availability-maccatalyst.m
index 3c370992c14d6..2fa03d718eded 100644
--- a/clang/test/FixIt/fixit-availability-maccatalyst.m
+++ b/clang/test/FixIt/fixit-availability-maccatalyst.m
@@ -5,7 +5,7 @@
void anotherFunction(int function);
-int use() {
+int use(void) {
function();
// CHECK: fix-it:{{.*}}:{[[@LINE-1]]:3-[[@LINE-1]]:3}:"if (@available(macCatalyst 13.2, *)) {\n "
// CHECK-NEXT: fix-it:{{.*}}:{[[@LINE-2]]:14-[[@LINE-2]]:14}:"\n } else {\n // Fallback on earlier versions\n }"
diff --git a/clang/test/FixIt/fixit-availability.c b/clang/test/FixIt/fixit-availability.c
index 4b3c8a43920d1..d21799635af2e 100644
--- a/clang/test/FixIt/fixit-availability.c
+++ b/clang/test/FixIt/fixit-availability.c
@@ -3,7 +3,7 @@
__attribute__((availability(macos, introduced=10.12)))
int function(void);
-void use() {
+void use(void) {
function();
// CHECK: fix-it:{{.*}}:{[[@LINE-1]]:3-[[@LINE-1]]:3}:"if (__builtin_available(macOS 10.12, *)) {\n "
// CHECK-NEXT: fix-it:{{.*}}:{[[@LINE-2]]:14-[[@LINE-2]]:14}:"\n } else {\n // Fallback on earlier versions\n }"
diff --git a/clang/test/FixIt/fixit-class-method-messaging.m b/clang/test/FixIt/fixit-class-method-messaging.m
index e2592d0c87f8e..aa29b9c020616 100644
--- a/clang/test/FixIt/fixit-class-method-messaging.m
+++ b/clang/test/FixIt/fixit-class-method-messaging.m
@@ -11,7 +11,7 @@ - (I*) MethInstPI;
I* pi;
-I* foobar();
+I* foobar(void);
@implementation I
- (id) PrivInstMeth {
diff --git a/clang/test/FixIt/fixit-errors.c b/clang/test/FixIt/fixit-errors.c
index 1ac9d1c643206..a4dd263e0ad88 100644
--- a/clang/test/FixIt/fixit-errors.c
+++ b/clang/test/FixIt/fixit-errors.c
@@ -16,19 +16,19 @@ struct Point {
float x, y, z;
};
-struct Point *get_origin();
+struct Point *get_origin(void);
-void test_point() {
+void test_point(void) {
(void)get_origin->x; // expected-error {{base of member reference is a function; perhaps you meant to call it with no arguments?}}
}
// These errors require C11.
#if __STDC_VERSION__ > 199901L
-void noreturn_1() _Noreturn; // expected-error {{must precede function declarator}}
-void noreturn_1() {
+void noreturn_1(void) _Noreturn; // expected-error {{must precede function declarator}}
+void noreturn_1(void) {
return; // expected-warning {{should not return}}
}
-void noreturn_2() _Noreturn { // expected-error {{must precede function declarator}}
+void noreturn_2(void) _Noreturn { // expected-error {{must precede function declarator}}
return; // expected-warning {{should not return}}
}
#endif
diff --git a/clang/test/FixIt/fixit-format-darwin.m b/clang/test/FixIt/fixit-format-darwin.m
index 54d25d92c2b30..f3981a7c01525 100644
--- a/clang/test/FixIt/fixit-format-darwin.m
+++ b/clang/test/FixIt/fixit-format-darwin.m
@@ -16,9 +16,9 @@
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
-CFIndex getCFIndex();
-NSInteger getNSInteger();
-NSUInteger getNSUInteger();
+CFIndex getCFIndex(void);
+NSInteger getNSInteger(void);
+NSUInteger getNSUInteger(void);
#define Log1(...) \
do { \
@@ -37,7 +37,7 @@
printf(X, Z); \
} while (0) \
-void test() {
+void test(void) {
printf("test 1: %s", getNSInteger());
// CHECK: printf("test 1: %ld", (long)getNSInteger());
printf("test 2: %s %s", getNSInteger(), getNSInteger());
@@ -71,14 +71,14 @@ void test() {
Outer1(__VA_ARGS__); Outer1(__VA_ARGS__); \
} while (0)
-void bug33447() {
+void bug33447(void) {
Outer2("test 8: %s", getNSInteger());
// CHECK: Outer2("test 8: %ld", (long)getNSInteger());
Outer2("test 9: %s %s", getNSInteger(), getNSInteger());
// CHECK: Outer2("test 9: %ld %ld", (long)getNSInteger(), (long)getNSInteger());
}
-void testCFIndex() {
+void testCFIndex(void) {
printf("test 10: %s", getCFIndex());
// CHECK: printf("test 10: %ld", (long)getCFIndex());
printf("test 11: %s %s", getCFIndex(), getCFIndex());
diff --git a/clang/test/FixIt/fixit-format-ios-nopedantic.m b/clang/test/FixIt/fixit-format-ios-nopedantic.m
index 0b332376c068e..740a86bc82a1e 100644
--- a/clang/test/FixIt/fixit-format-ios-nopedantic.m
+++ b/clang/test/FixIt/fixit-format-ios-nopedantic.m
@@ -4,10 +4,10 @@
int printf(const char *restrict, ...);
typedef unsigned int NSUInteger;
typedef int NSInteger;
-NSUInteger getNSUInteger();
-NSInteger getNSInteger();
+NSUInteger getNSUInteger(void);
+NSInteger getNSInteger(void);
-void test() {
+void test(void) {
// For thumbv7-apple-ios8.0.0 the underlying type of ssize_t is long
// and the underlying type of size_t is unsigned long.
diff --git a/clang/test/FixIt/fixit-format-ios.m b/clang/test/FixIt/fixit-format-ios.m
index 9c3670d0c8496..c4592c80042d3 100644
--- a/clang/test/FixIt/fixit-format-ios.m
+++ b/clang/test/FixIt/fixit-format-ios.m
@@ -5,10 +5,10 @@
int printf(const char * restrict, ...);
typedef unsigned int NSUInteger;
typedef int NSInteger;
-NSUInteger getNSUInteger();
-NSInteger getNSInteger();
+NSUInteger getNSUInteger(void);
+NSInteger getNSInteger(void);
-void test() {
+void test(void) {
// For thumbv7-apple-ios8.0.0 the underlying type of ssize_t is long
// and the underlying type of size_t is unsigned long.
diff --git a/clang/test/FixIt/fixit-multiple-selector-warnings.m b/clang/test/FixIt/fixit-multiple-selector-warnings.m
index 391728d0a9c18..4b9ff7b3a1842 100644
--- a/clang/test/FixIt/fixit-multiple-selector-warnings.m
+++ b/clang/test/FixIt/fixit-multiple-selector-warnings.m
@@ -13,7 +13,7 @@ @interface J
- (id) compare: (id) arg1;
@end
-SEL func()
+SEL func(void)
{
(void)@selector( compare: );
(void)@selector (compare:);
diff --git a/clang/test/FixIt/fixit-newline-style.c b/clang/test/FixIt/fixit-newline-style.c
index c43eb3789e680..8c5f424c39873 100644
--- a/clang/test/FixIt/fixit-newline-style.c
+++ b/clang/test/FixIt/fixit-newline-style.c
@@ -5,7 +5,7 @@
// CHECK: warning: unused label 'ddd'
// CHECK-NEXT: {{^ ddd:}}
// CHECK-NEXT: {{^ \^~~~$}}
-void f() {
+void f(void) {
ddd:
;
}
diff --git a/clang/test/FixIt/fixit-nsstring-compare.m b/clang/test/FixIt/fixit-nsstring-compare.m
index 6f0877c0590d4..d74cee5cf1570 100644
--- a/clang/test/FixIt/fixit-nsstring-compare.m
+++ b/clang/test/FixIt/fixit-nsstring-compare.m
@@ -10,7 +10,7 @@ - (BOOL)isEqual:(id)object;
@interface NSString<NSObject>
@end
-int main() {
+int main(void) {
NSString *stringA = @"stringA";
BOOL comparison = stringA==@"stringB";
diff --git a/clang/test/FixIt/fixit-objc.m b/clang/test/FixIt/fixit-objc.m
index 3e9ff605233b8..756d0fcb62ba3 100644
--- a/clang/test/FixIt/fixit-objc.m
+++ b/clang/test/FixIt/fixit-objc.m
@@ -10,7 +10,7 @@
@protocol X;
-void foo() {
+void foo(void) {
<X> *P; // expected-warning{{protocol has no object type specified; defaults to qualified 'id'}}
}
diff --git a/clang/test/FixIt/fixit-recursive-block.c b/clang/test/FixIt/fixit-recursive-block.c
index fec5b8028f907..eee6ec9a3687f 100644
--- a/clang/test/FixIt/fixit-recursive-block.c
+++ b/clang/test/FixIt/fixit-recursive-block.c
@@ -4,8 +4,8 @@
// rdar://10817031
-int main() {
- void (^arc_fail)() = ^() {
+int main(void) {
+ void (^arc_fail)(void) = ^(void) {
#ifdef ARC
// expected-warning at -2 {{block pointer variable 'arc_fail' is null when captured by block}}
#else
diff --git a/clang/test/FixIt/fixit-static-object-decl.m b/clang/test/FixIt/fixit-static-object-decl.m
index 5f4feada4905a..6d6f55500518b 100644
--- a/clang/test/FixIt/fixit-static-object-decl.m
+++ b/clang/test/FixIt/fixit-static-object-decl.m
@@ -19,12 +19,12 @@ @interface NSArray
+ (id) arrayWithObjects;
@end
-NSArray func() {
+NSArray func(void) {
NSArray P;
return P;
}
-NSArray (func2)() { return 0; }
+NSArray (func2)(void) { return 0; }
#ifdef __cplusplus
void test_result_type() {
@@ -32,6 +32,6 @@ void test_result_type() {
}
#endif
-int main() {
+int main(void) {
NSArray pluginNames = [NSArray arrayWithObjects];
}
diff --git a/clang/test/FixIt/fixit-uninit.c b/clang/test/FixIt/fixit-uninit.c
index 853041e05b074..4993ea6ecda6b 100644
--- a/clang/test/FixIt/fixit-uninit.c
+++ b/clang/test/FixIt/fixit-uninit.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -verify %s
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
-_Bool test_bool_no_false() {
+_Bool test_bool_no_false(void) {
_Bool var; // expected-note {{initialize}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:12-[[@LINE-1]]:12}:" = 0"
return var; // expected-warning {{uninitialized}}
@@ -10,13 +10,13 @@ _Bool test_bool_no_false() {
#define bool _Bool
#define false (bool)0
#define true (bool)1
-bool test_bool_with_false() {
+bool test_bool_with_false(void) {
bool var; // expected-note {{initialize}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:11}:" = false"
return var; // expected-warning {{uninitialized}}
}
-bool test_bool_with_false_undefined() {
+bool test_bool_with_false_undefined(void) {
bool
#undef false
var; // expected-note {{initialize}}
diff --git a/clang/test/FixIt/fixit.c b/clang/test/FixIt/fixit.c
index a46558c7fb0b5..f94b1eff8a928 100644
--- a/clang/test/FixIt/fixit.c
+++ b/clang/test/FixIt/fixit.c
@@ -74,13 +74,13 @@ void removeUnusedLabels(char c) {
}
int oopsAComma = 0, // expected-error {{';'}}
-void oopsMoreCommas() {
+void oopsMoreCommas(void) {
static int a[] = { 0, 1, 2 }, // expected-error {{';'}}
static int b[] = { 3, 4, 5 }, // expected-error {{';'}}
&a == &b ? oopsMoreCommas() : removeUnusedLabels(a[0]);
}
-int commaAtEndOfStatement() {
+int commaAtEndOfStatement(void) {
int a = 1;
a = 5, // expected-error {{';'}}
int m = 5, // expected-error {{';'}}
diff --git a/clang/test/FixIt/format-darwin.m b/clang/test/FixIt/format-darwin.m
index fcc81036fcf39..af2973668dc37 100644
--- a/clang/test/FixIt/format-darwin.m
+++ b/clang/test/FixIt/format-darwin.m
@@ -28,14 +28,14 @@
EnumValueB
} NSIntegerEnum;
-CFIndex getCFIndex();
-NSInteger getNSInteger();
-NSUInteger getNSUInteger();
-SInt32 getSInt32();
-UInt32 getUInt32();
-NSIntegerEnum getNSIntegerEnum();
-
-void testCorrectionInAllCases() {
+CFIndex getCFIndex(void);
+NSInteger getNSInteger(void);
+NSUInteger getNSUInteger(void);
+SInt32 getSInt32(void);
+UInt32 getUInt32(void);
+NSIntegerEnum getNSIntegerEnum(void);
+
+void testCorrectionInAllCases(void) {
printf("%s", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%s", getNSUInteger()); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
printf("%s", getSInt32()); // expected-warning{{values of type 'SInt32' should not be used as format arguments; add an explicit cast to 'int' instead}}
@@ -105,7 +105,7 @@ void testParens(Foo *obj, struct Bar *record) {
#if __LP64__
-void testWarn() {
+void testWarn(void) {
printf("%d", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%u", getNSUInteger()); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
printf("%ld", getSInt32()); // expected-warning{{values of type 'SInt32' should not be used as format arguments; add an explicit cast to 'int' instead}}
@@ -134,7 +134,7 @@ void testWarn() {
// CHECK-64: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:16}:"(long)"
}
-void testPreserveHex() {
+void testPreserveHex(void) {
printf("%x", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%x", getNSUInteger()); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
@@ -155,7 +155,7 @@ void testSignedness(NSInteger i, NSUInteger u) {
// CHECK-64: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:13}:"%ld"
}
-void testNoWarn() {
+void testNoWarn(void) {
printf("%ld", getNSInteger()); // no-warning
printf("%lu", getNSUInteger()); // no-warning
printf("%d", getSInt32()); // no-warning
@@ -165,7 +165,7 @@ void testNoWarn() {
#else
-void testWarn() {
+void testWarn(void) {
printf("%ld", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%lu", getNSUInteger()); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
printf("%d", getSInt32()); // expected-warning{{values of type 'SInt32' should not be used as format arguments; add an explicit cast to 'int' instead}}
@@ -185,7 +185,7 @@ void testWarn() {
// CHECK-32: fix-it:"{{.*}}":{[[@LINE-2]]:17-[[@LINE-2]]:17}:"(long)"
}
-void testPreserveHex() {
+void testPreserveHex(void) {
printf("%lx", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%lx", getNSUInteger()); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
@@ -193,7 +193,7 @@ void testPreserveHex() {
// CHECK-32: fix-it:"{{.*}}":{[[@LINE-3]]:17-[[@LINE-3]]:17}:"(unsigned long)"
}
-void testNoWarn() {
+void testNoWarn(void) {
printf("%d", getNSInteger()); // no-warning
printf("%u", getNSUInteger()); // no-warning
printf("%ld", getSInt32()); // no-warning
@@ -212,7 +212,7 @@ void testSignedness(NSInteger i, NSUInteger u) {
#endif
-void testCasts() {
+void testCasts(void) {
printf("%s", (NSInteger)0); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
printf("%s", (NSUInteger)0); // expected-warning{{values of type 'NSUInteger' should not be used as format arguments; add an explicit cast to 'unsigned long' instead}}
printf("%s", (SInt32)0); // expected-warning{{values of type 'SInt32' should not be used as format arguments; add an explicit cast to 'int' instead}}
@@ -241,7 +241,7 @@ void testCasts() {
// CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:25}:"(long)"
}
-void testCapitals() {
+void testCapitals(void) {
printf("%D", 1); // expected-warning{{conversion specifier is not supported by ISO C}} expected-note {{did you mean to use 'd'?}}
printf("%U", 1); // expected-warning{{conversion specifier is not supported by ISO C}} expected-note {{did you mean to use 'u'?}}
printf("%O", 1); // expected-warning{{conversion specifier is not supported by ISO C}} expected-note {{did you mean to use 'o'?}}
diff --git a/clang/test/FixIt/format.m b/clang/test/FixIt/format.m
index af2d2ce797a49..966cf79b2e0f7 100644
--- a/clang/test/FixIt/format.m
+++ b/clang/test/FixIt/format.m
@@ -177,7 +177,7 @@ void test_char(char c, signed char s, unsigned char u, uint8_t n) {
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:15}:"%d"
}
-void multichar_constants_false_negative() {
+void multichar_constants_false_negative(void) {
// The value of a multi-character constant is implementation-defined, but
// almost certainly shouldn't be printed with %c. However, the current
// type-checker expects %c to correspond to an integer argument, because
@@ -188,7 +188,7 @@ void multichar_constants_false_negative() {
}
-void test_percent_C() {
+void test_percent_C(void) {
const unsigned short data = 'a';
NSLog(@"%C", data); // no-warning
@@ -233,7 +233,7 @@ void testSignedness(long i, unsigned long u) {
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:14}:"%+ld"
}
-void testSizeTypes() {
+void testSizeTypes(void) {
printf("%zu", 0.f); // expected-warning-re{{format specifies type 'size_t' (aka '{{.+}}') but the argument has type 'float'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:14}:"%f"
@@ -260,7 +260,7 @@ void testSizeTypes() {
short : (unsigned short)0, \
signed char : (unsigned char)0))
-void testPtrDiffTypes() {
+void testPtrDiffTypes(void) {
__UNSIGNED_PTRDIFF_TYPE__ p1 = 0;
printf("%tu", p1); // No warning.
@@ -291,7 +291,7 @@ void testPtrDiffTypes() {
#endif // !defined(__ANDROID__) && !defined(__Fuchsia__)
}
-void testEnum() {
+void testEnum(void) {
typedef enum {
ImplicitA = 1,
ImplicitB = 2
diff --git a/clang/test/FixIt/multiarg-selector-fixit.m b/clang/test/FixIt/multiarg-selector-fixit.m
index d60d31282ce72..39ffa5c13cc8a 100644
--- a/clang/test/FixIt/multiarg-selector-fixit.m
+++ b/clang/test/FixIt/multiarg-selector-fixit.m
@@ -9,7 +9,7 @@ @interface NSObject
- (void)testDataSource:(id)object withMultipleArguments:(id)arguments;
@end
-int main() {
+int main(void) {
id obj;
[obj TestDataSource:nil withMultipleArguments:nil];
}
diff --git a/clang/test/FixIt/no-macro-fixit.c b/clang/test/FixIt/no-macro-fixit.c
index b6a9285e22f08..8e1d400e50874 100644
--- a/clang/test/FixIt/no-macro-fixit.c
+++ b/clang/test/FixIt/no-macro-fixit.c
@@ -4,7 +4,7 @@
#define va_arg(ap, type) __builtin_va_arg(ap, type)
typedef __builtin_va_list va_list;
-void myFunc() {
+void myFunc(void) {
va_list values;
int value;
diff --git a/clang/test/FixIt/objc-literals.m b/clang/test/FixIt/objc-literals.m
index 549cfde20250a..dbed87b757339 100644
--- a/clang/test/FixIt/objc-literals.m
+++ b/clang/test/FixIt/objc-literals.m
@@ -35,7 +35,7 @@ + (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count
@interface NSString : NSObject
@end
-void fixes() {
+void fixes(void) {
id arr = @[
17, // expected-error{{numeric literal must be prefixed by '@' in a collection}}
'a', // expected-error{{character literal must be prefixed by '@'}}
diff --git a/clang/test/FixIt/property-access-fixit.m b/clang/test/FixIt/property-access-fixit.m
index 8623d29b9629d..c0c1c4b0e279a 100644
--- a/clang/test/FixIt/property-access-fixit.m
+++ b/clang/test/FixIt/property-access-fixit.m
@@ -22,7 +22,7 @@ - (void) endit
}
@end
-int main()
+int main(void)
{
X *obj = [X new];
obj.X = 3;
diff --git a/clang/test/FixIt/typo.c b/clang/test/FixIt/typo.c
index 4f4c67b538f24..295d2cbd45fa0 100644
--- a/clang/test/FixIt/typo.c
+++ b/clang/test/FixIt/typo.c
@@ -29,7 +29,7 @@ struct Window window = {
2.71818, 5.0, 6.0, Red
};
-void test() {
+void test(void) {
Rectangle r1; // expected-error{{must use 'struct' tag to refer to type 'Rectangle'}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:3-[[@LINE-1]]:3}:"struct "
r1.top_left.x = 0;
diff --git a/clang/test/FixIt/typo.m b/clang/test/FixIt/typo.m
index 53afe7257d2a0..5544eab05eb97 100644
--- a/clang/test/FixIt/typo.m
+++ b/clang/test/FixIt/typo.m
@@ -8,7 +8,7 @@ @interface NSString // expected-note 2{{'NSString' declared here}}
+ (int)method:(int)x;
@end
-void test() {
+void test(void) {
NSstring *str = @"A string"; // expected-error{{unknown type name 'NSstring'; did you mean 'NSString'?}}
}
diff --git a/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h b/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
index c4c15e58e4d7d..a7902fcafd21e 100644
--- a/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
+++ b/clang/test/Frontend/Inputs/SystemHeaderPrefix/line-directive-in-system.h
@@ -1,2 +1,2 @@
#line 1 "foo.h"
-foo();
+foo(void);
diff --git a/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h b/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
index a280f9a5cce66..7e6c37af261a6 100644
--- a/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
+++ b/clang/test/Frontend/Inputs/SystemHeaderPrefix/noline.h
@@ -1 +1 @@
-foo();
+foo(void);
diff --git a/clang/test/Frontend/Inputs/absolute-paths.h b/clang/test/Frontend/Inputs/absolute-paths.h
index 5e682c7347074..abcd0212cafbb 100644
--- a/clang/test/Frontend/Inputs/absolute-paths.h
+++ b/clang/test/Frontend/Inputs/absolute-paths.h
@@ -1,3 +1,3 @@
-int f() {
+int f(void) {
// Oops, no return.
}
diff --git a/clang/test/Frontend/Inputs/line-directive.h b/clang/test/Frontend/Inputs/line-directive.h
index e05e9f51677e9..446d1095cb61b 100644
--- a/clang/test/Frontend/Inputs/line-directive.h
+++ b/clang/test/Frontend/Inputs/line-directive.h
@@ -1,2 +1,2 @@
#line 10 "foo.h"
-foo(); // will warn if not treated as a system header
+foo(void); // will warn if not treated as a system header
diff --git a/clang/test/Frontend/Inputs/rewrite-includes-messages.h b/clang/test/Frontend/Inputs/rewrite-includes-messages.h
index e5f0eb251473d..664bef429a10f 100644
--- a/clang/test/Frontend/Inputs/rewrite-includes-messages.h
+++ b/clang/test/Frontend/Inputs/rewrite-includes-messages.h
@@ -1,4 +1,4 @@
-void f()
+void f(void)
{
int unused_variable;
}
diff --git a/clang/test/Frontend/absolute-paths.c b/clang/test/Frontend/absolute-paths.c
index 07c81832ede44..6192213841325 100644
--- a/clang/test/Frontend/absolute-paths.c
+++ b/clang/test/Frontend/absolute-paths.c
@@ -12,6 +12,6 @@
// For files which don't exist, just print the filename.
#line 123 "non-existant.c"
-int g() {}
-// NORMAL: non-existant.c:123:10: warning: non-void function does not return a value
-// ABSOLUTE: non-existant.c:123:10: warning: non-void function does not return a value
+int g(void) {}
+// NORMAL: non-existant.c:123:14: warning: non-void function does not return a value
+// ABSOLUTE: non-existant.c:123:14: warning: non-void function does not return a value
diff --git a/clang/test/Frontend/ast-codegen.c b/clang/test/Frontend/ast-codegen.c
index b45377850a231..53721a463217f 100644
--- a/clang/test/Frontend/ast-codegen.c
+++ b/clang/test/Frontend/ast-codegen.c
@@ -9,5 +9,5 @@ __asm__("foo");
int g0;
// CHECK: define dso_local i32 @f0()
-int f0() {
+int f0(void) {
}
diff --git a/clang/test/Frontend/ast-main.c b/clang/test/Frontend/ast-main.c
index 74e8bcf6db662..cdc74219f73ac 100644
--- a/clang/test/Frontend/ast-main.c
+++ b/clang/test/Frontend/ast-main.c
@@ -3,6 +3,6 @@
// RUN: env SDKROOT="/" %clang -emit-llvm -S -o %t2.ll -x ast - < %t.ast
// RUN:
diff %t1.ll %t2.ll
-int main() {
+int main(void) {
return 0;
}
diff --git a/clang/test/Frontend/backend-diagnostic.c b/clang/test/Frontend/backend-diagnostic.c
index e5dc4a6bacac4..94431683fc8b4 100644
--- a/clang/test/Frontend/backend-diagnostic.c
+++ b/clang/test/Frontend/backend-diagnostic.c
@@ -18,7 +18,7 @@ extern void doIt(char *);
// REGULAR: warning: stack frame size ([[#]]) exceeds limit ([[#]]) in 'stackSizeWarning'
// PROMOTE: error: stack frame size ([[#]]) exceeds limit ([[#]]) in 'stackSizeWarning'
// IGNORE-NOT: stack frame size ([[#]]) exceeds limit ([[#]]) in 'stackSizeWarning'
-void stackSizeWarning() {
+void stackSizeWarning(void) {
char buffer[80];
doIt(buffer);
}
diff --git a/clang/test/Frontend/embed-bitcode-noopt.c b/clang/test/Frontend/embed-bitcode-noopt.c
index b72f90bb015e9..437be11879365 100644
--- a/clang/test/Frontend/embed-bitcode-noopt.c
+++ b/clang/test/Frontend/embed-bitcode-noopt.c
@@ -20,11 +20,11 @@
// CHECK-BC-LABEL: attributes #0 = {{.*}} alwaysinline
// CHECK-CMD: -O2
-__attribute__((always_inline)) void bar() {
+__attribute__((always_inline)) void bar(void) {
return;
}
-void foo() {
+void foo(void) {
bar();
return;
}
diff --git a/clang/test/Frontend/fixed_point_add.c b/clang/test/Frontend/fixed_point_add.c
index d01989c5eab0f..2629eb3428d71 100644
--- a/clang/test/Frontend/fixed_point_add.c
+++ b/clang/test/Frontend/fixed_point_add.c
@@ -36,7 +36,7 @@ _Bool b;
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sadd_sasasa() {
+void sadd_sasasa(void) {
sa = sa + sa;
}
@@ -50,7 +50,7 @@ void sadd_sasasa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sadd_asaa() {
+void sadd_asaa(void) {
a = sa + a;
}
@@ -63,7 +63,7 @@ void sadd_asaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sadd_sasasf() {
+void sadd_sasasf(void) {
sa = sa + sf;
}
@@ -80,7 +80,7 @@ void sadd_sasasf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sadd_sasaf() {
+void sadd_sasaf(void) {
sa = sa + f;
}
@@ -94,7 +94,7 @@ void sadd_sasaf() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sadd_aasf() {
+void sadd_aasf(void) {
a = a + sf;
}
@@ -111,7 +111,7 @@ void sadd_aasf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sadd_aalf() {
+void sadd_aalf(void) {
a = a + lf;
}
@@ -136,7 +136,7 @@ void sadd_aalf() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sadd_sasausa() {
+void sadd_sasausa(void) {
sa = sa + usa;
}
@@ -163,7 +163,7 @@ void sadd_sasausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void sadd_asaua() {
+void sadd_asaua(void) {
a = sa + ua;
}
@@ -189,7 +189,7 @@ void sadd_asaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sadd_sasausf() {
+void sadd_sasausf(void) {
sa = sa + usf;
}
@@ -219,7 +219,7 @@ void sadd_sasausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sadd_sasaulf() {
+void sadd_sasaulf(void) {
sa = sa + ulf;
}
@@ -235,7 +235,7 @@ void sadd_sasaulf() {
// CHECK-NEXT: store i32 [[TMP6]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sadd_aaaaa() {
+void sadd_aaaaa(void) {
a = a + a2 + a3 + a4;
}
@@ -248,7 +248,7 @@ void sadd_aaaaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void uadd_usausausa() {
+void uadd_usausausa(void) {
usa = usa + usa;
}
@@ -262,7 +262,7 @@ void uadd_usausausa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void uadd_uausaua() {
+void uadd_uausaua(void) {
ua = usa + ua;
}
@@ -275,7 +275,7 @@ void uadd_uausaua() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void uadd_usausausf() {
+void uadd_usausausf(void) {
usa = usa + usf;
}
@@ -292,7 +292,7 @@ void uadd_usausausf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void uadd_usausauf() {
+void uadd_usausauf(void) {
usa = usa + uf;
}
@@ -309,7 +309,7 @@ void uadd_usausauf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasai() {
+void int_sasai(void) {
sa = sa + i;
}
@@ -325,7 +325,7 @@ void int_sasai() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasaui() {
+void int_sasaui(void) {
sa = sa + ui;
}
@@ -353,7 +353,7 @@ void int_sasaui() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausai() {
+void int_usausai(void) {
usa = usa + i;
}
@@ -381,7 +381,7 @@ void int_usausai() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausaui() {
+void int_usausaui(void) {
usa = usa + ui;
}
@@ -397,7 +397,7 @@ void int_usausaui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void int_lflfui() {
+void int_lflfui(void) {
lf = lf + ui;
}
@@ -415,7 +415,7 @@ void int_lflfui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aab() {
+void int_aab(void) {
a = a + b;
}
@@ -428,7 +428,7 @@ void int_aab() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasas() {
+void sat_sassasas(void) {
sa_sat = sa + sa_sat;
}
@@ -450,7 +450,7 @@ void sat_sassasas() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusausas() {
+void sat_usasusausas(void) {
usa_sat = usa + usa_sat;
}
@@ -476,7 +476,7 @@ void sat_usasusausas() {
// UNSIGNED-NEXT: store i32 [[RESIZE2]], i32* @ua_sat, align 4
// UNSIGNED-NEXT: ret void
//
-void sat_uasuausas() {
+void sat_uasuausas(void) {
ua_sat = ua + usa_sat;
}
@@ -496,7 +496,7 @@ void sat_uasuausas() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasi() {
+void sat_sassasi(void) {
sa_sat = sa_sat + i;
}
@@ -516,7 +516,7 @@ void sat_sassasi() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasui() {
+void sat_sassasui(void) {
sa_sat = sa_sat + ui;
}
@@ -538,7 +538,7 @@ void sat_sassasui() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @uf_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_ufsufsufs() {
+void sat_ufsufsufs(void) {
uf_sat = uf_sat + uf_sat;
}
@@ -574,6 +574,6 @@ void sat_ufsufsufs() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusasi() {
+void sat_usasusasi(void) {
usa_sat = usa_sat + i;
}
diff --git a/clang/test/Frontend/fixed_point_comparisons.c b/clang/test/Frontend/fixed_point_comparisons.c
index 385d0c1352f3c..2c2e3a2ad7a98 100644
--- a/clang/test/Frontend/fixed_point_comparisons.c
+++ b/clang/test/Frontend/fixed_point_comparisons.c
@@ -53,7 +53,7 @@ _Bool b_sne_true = 2.6hk != 2.6uhk;
_Bool b_seq_true = 2.0hk == 2u; // CHECK-DAG: @b_seq_true = {{.*}}global i8 1, align 1
_Bool b_seq_true2 = 2.0uhk == 2; // CHECK-DAG: @b_seq_true2 = {{.*}}global i8 1, align 1
-void TestComparisons() {
+void TestComparisons(void) {
short _Accum sa;
_Accum a;
unsigned short _Accum usa;
@@ -132,7 +132,7 @@ void TestComparisons() {
// CHECK-NEXT: {{.*}} = icmp ule i32 [[UPSCALE_A]], [[A2]]
}
-void TestIntComparisons() {
+void TestIntComparisons(void) {
short _Accum sa;
unsigned short _Accum usa;
@@ -288,7 +288,7 @@ void TestIntComparisons() {
// PADDED-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_I]]
}
-void TestComparisonSignage() {
+void TestComparisonSignage(void) {
short _Accum sa;
unsigned short _Accum usa;
int i;
@@ -327,7 +327,7 @@ void TestComparisonSignage() {
// PADDED-NEXT: {{.*}} = icmp eq i39 [[RESIZE_A]], [[UPSCALE_I]]
}
-void TestSaturationComparisons() {
+void TestSaturationComparisons(void) {
short _Accum sa;
_Accum a;
_Sat short _Accum sat_sa;
@@ -361,7 +361,7 @@ void TestSaturationComparisons() {
// PADDED-NEXT: {{.*}} = icmp eq i16 [[A]], [[A2]]
}
-void StoreBooleanResult() {
+void StoreBooleanResult(void) {
short _Accum sa;
_Accum a;
int res;
diff --git a/clang/test/Frontend/fixed_point_compound.c b/clang/test/Frontend/fixed_point_compound.c
index 5dcc7fba0da70..adf3aa9036144 100644
--- a/clang/test/Frontend/fixed_point_compound.c
+++ b/clang/test/Frontend/fixed_point_compound.c
@@ -31,7 +31,7 @@ float fl;
// CHECK-NEXT: store i8 [[RESIZE1]], i8* @shf, align 1
// CHECK-NEXT: ret void
//
-void add_shfa() {
+void add_shfa(void) {
shf += a;
}
@@ -57,7 +57,7 @@ void add_shfa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void add_auf() {
+void add_auf(void) {
a += uf;
}
@@ -73,7 +73,7 @@ void add_auf() {
// CHECK-NEXT: store i16 [[RESIZE1]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void add_ufula() {
+void add_ufula(void) {
uf += ula;
}
@@ -101,7 +101,7 @@ void add_ufula() {
// UNSIGNED-NEXT: store i64 [[TMP2]], i64* @ula, align 8
// UNSIGNED-NEXT: ret void
//
-void add_ulashf() {
+void add_ulashf(void) {
ula += shf;
}
@@ -129,7 +129,7 @@ void add_ulashf() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @uf, align 2
// UNSIGNED-NEXT: ret void
//
-void add_ufshf() {
+void add_ufshf(void) {
uf += shf;
}
@@ -143,7 +143,7 @@ void add_ufshf() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void add_ashf() {
+void add_ashf(void) {
a += shf;
}
@@ -159,7 +159,7 @@ void add_ashf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void add_ai() {
+void add_ai(void) {
a += i;
}
@@ -175,7 +175,7 @@ void add_ai() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void add_au() {
+void add_au(void) {
a += u;
}
@@ -201,7 +201,7 @@ void add_au() {
// UNSIGNED-NEXT: store i64 [[TMP2]], i64* @ula, align 8
// UNSIGNED-NEXT: ret void
//
-void add_ulai() {
+void add_ulai(void) {
ula += i;
}
@@ -231,7 +231,7 @@ void add_ulai() {
// UNSIGNED-NEXT: store i32 [[RESIZE1]], i32* @i, align 4
// UNSIGNED-NEXT: ret void
//
-void add_iula() {
+void add_iula(void) {
i += ula;
}
@@ -253,7 +253,7 @@ void add_iula() {
// CHECK-NEXT: store i8 [[RESIZE3]], i8* @c, align 1
// CHECK-NEXT: ret void
//
-void add_ca() {
+void add_ca(void) {
c += a;
}
@@ -273,7 +273,7 @@ void add_ca() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void add_sai() {
+void add_sai(void) {
sa += i;
}
@@ -299,7 +299,7 @@ void add_sai() {
// CHECK-NEXT: store i8 [[RESIZE3]], i8* @c, align 1
// CHECK-NEXT: ret void
//
-void add_csa() {
+void add_csa(void) {
c += sa;
}
@@ -325,7 +325,7 @@ void add_csa() {
// UNSIGNED-NEXT: store i64 [[RESIZE2]], i64* @sula, align 8
// UNSIGNED-NEXT: ret void
//
-void add_sulau() {
+void add_sulau(void) {
sula += u;
}
@@ -356,7 +356,7 @@ void add_sulau() {
// UNSIGNED-NEXT: store i8 [[RESIZE1]], i8* @sshf, align 1
// UNSIGNED-NEXT: ret void
//
-void add_sshsuf() {
+void add_sshsuf(void) {
sshf += suf;
}
@@ -372,7 +372,7 @@ void add_sshsuf() {
// CHECK-NEXT: store i32 [[TMP5]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void add_afl() {
+void add_afl(void) {
a += fl;
}
@@ -386,7 +386,7 @@ void add_afl() {
// CHECK-NEXT: store float [[ADD]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void add_fla() {
+void add_fla(void) {
fl += a;
}
@@ -402,7 +402,7 @@ void add_fla() {
// CHECK-NEXT: store i32 [[TMP5]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void add_safl() {
+void add_safl(void) {
sa += fl;
}
@@ -416,7 +416,7 @@ void add_safl() {
// CHECK-NEXT: store float [[ADD]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void add_flsa() {
+void add_flsa(void) {
fl += sa;
}
@@ -445,7 +445,7 @@ void add_flsa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void sub_auf() {
+void sub_auf(void) {
a -= uf;
}
@@ -461,7 +461,7 @@ void sub_auf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sub_ai() {
+void sub_ai(void) {
a -= i;
}
@@ -487,7 +487,7 @@ void sub_ai() {
// CHECK-NEXT: store i8 [[RESIZE3]], i8* @c, align 1
// CHECK-NEXT: ret void
//
-void sub_csa() {
+void sub_csa(void) {
c -= sa;
}
@@ -503,7 +503,7 @@ void sub_csa() {
// CHECK-NEXT: store i32 [[TMP5]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sub_afl() {
+void sub_afl(void) {
a -= fl;
}
@@ -530,7 +530,7 @@ void sub_afl() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void mul_auf() {
+void mul_auf(void) {
a *= uf;
}
@@ -546,7 +546,7 @@ void mul_auf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void mul_ai() {
+void mul_ai(void) {
a *= i;
}
@@ -572,7 +572,7 @@ void mul_ai() {
// CHECK-NEXT: store i8 [[RESIZE3]], i8* @c, align 1
// CHECK-NEXT: ret void
//
-void mul_csa() {
+void mul_csa(void) {
c *= sa;
}
@@ -588,7 +588,7 @@ void mul_csa() {
// CHECK-NEXT: store i32 [[TMP5]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void mul_afl() {
+void mul_afl(void) {
a *= fl;
}
@@ -615,7 +615,7 @@ void mul_afl() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void div_auf() {
+void div_auf(void) {
a /= uf;
}
@@ -631,7 +631,7 @@ void div_auf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void div_ai() {
+void div_ai(void) {
a /= i;
}
@@ -657,7 +657,7 @@ void div_ai() {
// CHECK-NEXT: store i8 [[RESIZE3]], i8* @c, align 1
// CHECK-NEXT: ret void
//
-void div_csa() {
+void div_csa(void) {
c /= sa;
}
@@ -673,7 +673,7 @@ void div_csa() {
// CHECK-NEXT: store i32 [[TMP5]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void div_afl() {
+void div_afl(void) {
a /= fl;
}
@@ -686,7 +686,7 @@ void div_afl() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void shft_ai() {
+void shft_ai(void) {
a <<= i;
}
@@ -708,7 +708,7 @@ void shft_ai() {
// UNSIGNED-NEXT: store i16 [[TMP3]], i16* @suf, align 2
// UNSIGNED-NEXT: ret void
//
-void shft_sufi() {
+void shft_sufi(void) {
suf <<= i;
}
@@ -721,6 +721,6 @@ void shft_sufi() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @ula, align 8
// CHECK-NEXT: ret void
//
-void shft_ulai() {
+void shft_ulai(void) {
ula >>= i;
}
diff --git a/clang/test/Frontend/fixed_point_conversions.c b/clang/test/Frontend/fixed_point_conversions.c
index 96bc352d94dc6..d7dcd26d05b62 100644
--- a/clang/test/Frontend/fixed_point_conversions.c
+++ b/clang/test/Frontend/fixed_point_conversions.c
@@ -41,7 +41,7 @@ double d;
// CHECK-NEXT: store i32 [[TMP0]], i32* @a2, align 4
// CHECK-NEXT: ret void
//
-void fix_same1() {
+void fix_same1(void) {
a2 = a;
}
@@ -51,7 +51,7 @@ void fix_same1() {
// CHECK-NEXT: store i32 [[TMP0]], i32* @a2, align 4
// CHECK-NEXT: ret void
//
-void fix_same2() {
+void fix_same2(void) {
a2 = (_Accum)a;
}
@@ -64,7 +64,7 @@ void fix_same2() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castdown1() {
+void fix_castdown1(void) {
a = la;
}
@@ -76,7 +76,7 @@ void fix_castdown1() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castdown2() {
+void fix_castdown2(void) {
a = (_Accum)la;
}
@@ -88,7 +88,7 @@ void fix_castdown2() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void fix_castdown3() {
+void fix_castdown3(void) {
sa = a;
}
@@ -100,7 +100,7 @@ void fix_castdown3() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void fix_castdown4() {
+void fix_castdown4(void) {
sa = a;
}
@@ -113,7 +113,7 @@ void fix_castdown4() {
// CHECK-NEXT: store i32 [[UPSCALE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castup1() {
+void fix_castup1(void) {
a = sa;
}
@@ -125,7 +125,7 @@ void fix_castup1() {
// CHECK-NEXT: store i32 [[UPSCALE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castup2() {
+void fix_castup2(void) {
a = (_Accum)sa;
}
@@ -137,7 +137,7 @@ void fix_castup2() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castup3() {
+void fix_castup3(void) {
a = la;
}
@@ -149,7 +149,7 @@ void fix_castup3() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_castup4() {
+void fix_castup4(void) {
a = (long _Accum)la;
}
@@ -167,7 +167,7 @@ void fix_castup4() {
// UNSIGNED-NEXT: store i32 [[TMP0]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sign1() {
+void fix_sign1(void) {
ua = a;
}
@@ -184,7 +184,7 @@ void fix_sign1() {
// UNSIGNED-NEXT: store i32 [[TMP0]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sign2() {
+void fix_sign2(void) {
a = ua;
}
@@ -201,7 +201,7 @@ void fix_sign2() {
// UNSIGNED-NEXT: store i32 [[TMP0]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sign3() {
+void fix_sign3(void) {
ua = (unsigned _Accum)a;
}
@@ -218,7 +218,7 @@ void fix_sign3() {
// UNSIGNED-NEXT: store i32 [[TMP0]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sign4() {
+void fix_sign4(void) {
a = (_Accum)ua;
}
@@ -238,7 +238,7 @@ void fix_sign4() {
// UNSIGNED-NEXT: store i64 [[UPSCALE]], i64* @ula, align 8
// UNSIGNED-NEXT: ret void
//
-void fix_sign5() {
+void fix_sign5(void) {
ula = a;
}
@@ -255,7 +255,7 @@ void fix_sign5() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @sat_sa, align 2
// CHECK-NEXT: ret void
//
-void fix_sat1() {
+void fix_sat1(void) {
// Casting down between types
sat_sa = sat_a;
}
@@ -272,7 +272,7 @@ void fix_sat1() {
// CHECK-NEXT: store i8 [[RESIZE]], i8* @sat_sf, align 1
// CHECK-NEXT: ret void
//
-void fix_sat2() {
+void fix_sat2(void) {
// Accum to Fract, decreasing scale
sat_sf = sat_a;
}
@@ -288,7 +288,7 @@ void fix_sat2() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @sat_f, align 2
// CHECK-NEXT: ret void
//
-void fix_sat3() {
+void fix_sat3(void) {
// Accum to Fract, same scale
sat_f = a;
}
@@ -306,7 +306,7 @@ void fix_sat3() {
// CHECK-NEXT: store i32 [[RESIZE1]], i32* @sat_lf, align 4
// CHECK-NEXT: ret void
//
-void fix_sat4() {
+void fix_sat4(void) {
// Accum to Fract, increasing scale
sat_lf = sat_a;
}
@@ -335,7 +335,7 @@ void fix_sat4() {
// UNSIGNED-NEXT: store i16 [[RESIZE]], i16* @sat_usa, align 2
// UNSIGNED-NEXT: ret void
//
-void fix_sat5() {
+void fix_sat5(void) {
// Signed to unsigned, decreasing scale
sat_usa = sat_a;
}
@@ -359,7 +359,7 @@ void fix_sat5() {
// UNSIGNED-NEXT: store i32 [[SATMIN]], i32* @sat_ua, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sat6() {
+void fix_sat6(void) {
// Signed to unsigned, increasing scale
sat_ua = sat_a;
}
@@ -370,7 +370,7 @@ void fix_sat6() {
// CHECK-NEXT: store i32 [[TMP0]], i32* @sat_a, align 4
// CHECK-NEXT: ret void
//
-void fix_sat7() {
+void fix_sat7(void) {
// Nothing when saturating to the same type and size
sat_a = a;
}
@@ -381,7 +381,7 @@ void fix_sat7() {
// CHECK-NEXT: store i32 [[TMP0]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_sat8() {
+void fix_sat8(void) {
// Nothing when assigning back
a = sat_a;
}
@@ -393,7 +393,7 @@ void fix_sat8() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @sat_a, align 4
// CHECK-NEXT: ret void
//
-void fix_sat9() {
+void fix_sat9(void) {
// No overflow when casting from fract to signed accum
sat_a = sat_f;
}
@@ -418,7 +418,7 @@ void fix_sat9() {
// UNSIGNED-NEXT: store i32 [[SATMIN]], i32* @sat_ua, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_sat10() {
+void fix_sat10(void) {
// Only get overflow checking if signed fract to unsigned accum
sat_ua = sat_sf;
}
@@ -432,7 +432,7 @@ void fix_sat10() {
// CHECK-NEXT: store i8 [[RESIZE]], i8* @sf, align 1
// CHECK-NEXT: ret void
//
-void fix_fract1() {
+void fix_fract1(void) {
// To lower scale
sf = a;
}
@@ -445,7 +445,7 @@ void fix_fract1() {
// CHECK-NEXT: store i32 [[UPSCALE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_fract2() {
+void fix_fract2(void) {
// To higher scale
a = sf;
}
@@ -457,7 +457,7 @@ void fix_fract2() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void fix_fract3() {
+void fix_fract3(void) {
// To same scale
f = a;
}
@@ -469,7 +469,7 @@ void fix_fract3() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void fix_fract4() {
+void fix_fract4(void) {
a = f;
}
@@ -480,7 +480,7 @@ void fix_fract4() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void fix_fract5() {
+void fix_fract5(void) {
// To unsigned
ua = uf;
}
@@ -492,7 +492,7 @@ void fix_fract5() {
// CHECK-NEXT: store i16 [[RESIZE]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void fix_fract6() {
+void fix_fract6(void) {
uf = ua;
}
@@ -508,7 +508,7 @@ void fix_fract6() {
// CHECK-NEXT: store i32 [[RESIZE]], i32* @i, align 4
// CHECK-NEXT: ret void
//
-void fix_int1() {
+void fix_int1(void) {
// Will need to check for negative values
i = sa;
}
@@ -529,7 +529,7 @@ void fix_int1() {
// UNSIGNED-NEXT: store i32 [[RESIZE]], i32* @i, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_int2() {
+void fix_int2(void) {
// No check needed for unsigned fixed points. Can just right shift.
i = usa;
}
@@ -543,7 +543,7 @@ void fix_int2() {
// CHECK-NEXT: store i16 [[UPSCALE]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_fix1() {
+void int_fix1(void) {
sa = i;
}
@@ -555,7 +555,7 @@ void int_fix1() {
// CHECK-NEXT: store i16 [[UPSCALE]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_fix2() {
+void int_fix2(void) {
sa = ui;
}
@@ -575,7 +575,7 @@ void int_fix2() {
// UNSIGNED-NEXT: store i16 [[UPSCALE]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_fix3() {
+void int_fix3(void) {
usa = i;
}
@@ -595,7 +595,7 @@ void int_fix3() {
// UNSIGNED-NEXT: store i16 [[UPSCALE]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_fix4() {
+void int_fix4(void) {
usa = ui;
}
@@ -607,7 +607,7 @@ void int_fix4() {
// CHECK-NEXT: store i64 [[UPSCALE]], i64* @la, align 8
// CHECK-NEXT: ret void
//
-void int_fix5() {
+void int_fix5(void) {
la = s;
}
@@ -625,7 +625,7 @@ void int_fix5() {
// CHECK-NEXT: store i16 [[RESIZE1]], i16* @sat_sa, align 2
// CHECK-NEXT: ret void
//
-void int_sat1() {
+void int_sat1(void) {
sat_sa = i;
}
@@ -640,7 +640,7 @@ void int_sat1() {
// CHECK-NEXT: store i16 [[RESIZE1]], i16* @sat_sa, align 2
// CHECK-NEXT: ret void
//
-void int_sat2() {
+void int_sat2(void) {
sat_sa = ui;
}
@@ -670,7 +670,7 @@ void int_sat2() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @sat_usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_sat3() {
+void int_sat3(void) {
sat_usa = i;
}
@@ -696,7 +696,7 @@ void int_sat3() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @sat_usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_sat4() {
+void int_sat4(void) {
sat_usa = ui;
}
@@ -709,7 +709,7 @@ void int_sat4() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void float_fix1() {
+void float_fix1(void) {
sa = fl;
}
@@ -721,7 +721,7 @@ void float_fix1() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void float_fix2() {
+void float_fix2(void) {
a = fl;
}
@@ -733,7 +733,7 @@ void float_fix2() {
// CHECK-NEXT: store i64 [[TMP2]], i64* @la, align 8
// CHECK-NEXT: ret void
//
-void float_fix3() {
+void float_fix3(void) {
la = fl;
}
@@ -745,7 +745,7 @@ void float_fix3() {
// CHECK-NEXT: store i8 [[TMP2]], i8* @sf, align 1
// CHECK-NEXT: ret void
//
-void float_fix4() {
+void float_fix4(void) {
sf = fl;
}
@@ -757,7 +757,7 @@ void float_fix4() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void float_fix5() {
+void float_fix5(void) {
lf = fl;
}
@@ -777,7 +777,7 @@ void float_fix5() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void float_fix6() {
+void float_fix6(void) {
ua = fl;
}
@@ -797,7 +797,7 @@ void float_fix6() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @uf, align 2
// UNSIGNED-NEXT: ret void
//
-void float_fix7() {
+void float_fix7(void) {
uf = fl;
}
@@ -810,7 +810,7 @@ void float_fix7() {
// CHECK-NEXT: store float [[TMP2]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void fix_float1() {
+void fix_float1(void) {
fl = sa;
}
@@ -822,7 +822,7 @@ void fix_float1() {
// CHECK-NEXT: store float [[TMP2]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void fix_float2() {
+void fix_float2(void) {
fl = a;
}
@@ -834,7 +834,7 @@ void fix_float2() {
// CHECK-NEXT: store float [[TMP2]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void fix_float3() {
+void fix_float3(void) {
fl = la;
}
@@ -846,7 +846,7 @@ void fix_float3() {
// CHECK-NEXT: store float [[TMP2]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void fix_float4() {
+void fix_float4(void) {
fl = sf;
}
@@ -858,7 +858,7 @@ void fix_float4() {
// CHECK-NEXT: store float [[TMP2]], float* @fl, align 4
// CHECK-NEXT: ret void
//
-void fix_float5() {
+void fix_float5(void) {
fl = lf;
}
@@ -878,7 +878,7 @@ void fix_float5() {
// UNSIGNED-NEXT: store float [[TMP2]], float* @fl, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_float6() {
+void fix_float6(void) {
fl = ua;
}
@@ -898,7 +898,7 @@ void fix_float6() {
// UNSIGNED-NEXT: store float [[TMP2]], float* @fl, align 4
// UNSIGNED-NEXT: ret void
//
-void fix_float7() {
+void fix_float7(void) {
fl = uf;
}
@@ -911,7 +911,7 @@ void fix_float7() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sat_sa, align 2
// CHECK-NEXT: ret void
//
-void float_sat1() {
+void float_sat1(void) {
sat_sa = fl;
}
@@ -923,7 +923,7 @@ void float_sat1() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @sat_a, align 4
// CHECK-NEXT: ret void
//
-void float_sat2() {
+void float_sat2(void) {
sat_a = fl;
}
@@ -935,7 +935,7 @@ void float_sat2() {
// CHECK-NEXT: store i64 [[TMP2]], i64* @sat_la, align 8
// CHECK-NEXT: ret void
//
-void float_sat3() {
+void float_sat3(void) {
sat_la = fl;
}
@@ -947,7 +947,7 @@ void float_sat3() {
// CHECK-NEXT: store i8 [[TMP2]], i8* @sat_sf, align 1
// CHECK-NEXT: ret void
//
-void float_sat4() {
+void float_sat4(void) {
sat_sf = fl;
}
@@ -969,7 +969,7 @@ void float_sat4() {
// UNSIGNED-NEXT: store i32 [[SATMIN]], i32* @sat_ua, align 4
// UNSIGNED-NEXT: ret void
//
-void float_sat5() {
+void float_sat5(void) {
sat_ua = fl;
}
@@ -991,6 +991,6 @@ void float_sat5() {
// UNSIGNED-NEXT: store i16 [[SATMIN]], i16* @sat_uf, align 2
// UNSIGNED-NEXT: ret void
//
-void float_sat6() {
+void float_sat6(void) {
sat_uf = fl;
}
diff --git a/clang/test/Frontend/fixed_point_conversions_half.c b/clang/test/Frontend/fixed_point_conversions_half.c
index 18261edf44740..7b84f2abe8d9d 100644
--- a/clang/test/Frontend/fixed_point_conversions_half.c
+++ b/clang/test/Frontend/fixed_point_conversions_half.c
@@ -31,7 +31,7 @@ _Float16 h;
// CHECK-NEXT: store i8 [[TMP2]], i8* @sf, align 1
// CHECK-NEXT: ret void
//
-void half_fix1() {
+void half_fix1(void) {
sf = h;
}
@@ -44,7 +44,7 @@ void half_fix1() {
// CHECK-NEXT: store i32 [[TMP3]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void half_fix2() {
+void half_fix2(void) {
lf = h;
}
@@ -56,7 +56,7 @@ void half_fix2() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void half_fix3() {
+void half_fix3(void) {
sa = h;
}
@@ -69,7 +69,7 @@ void half_fix3() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @la, align 8
// CHECK-NEXT: ret void
//
-void half_fix4() {
+void half_fix4(void) {
la = h;
}
@@ -90,7 +90,7 @@ void half_fix4() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void half_fix5() {
+void half_fix5(void) {
usa = h;
}
@@ -112,7 +112,7 @@ void half_fix5() {
// UNSIGNED-NEXT: store i64 [[TMP3]], i64* @ula, align 8
// UNSIGNED-NEXT: ret void
//
-void half_fix6() {
+void half_fix6(void) {
ula = h;
}
@@ -125,7 +125,7 @@ void half_fix6() {
// CHECK-NEXT: store i8 [[TMP2]], i8* @sf_sat, align 1
// CHECK-NEXT: ret void
//
-void half_sat1() {
+void half_sat1(void) {
sf_sat = h;
}
@@ -138,7 +138,7 @@ void half_sat1() {
// CHECK-NEXT: store i32 [[TMP3]], i32* @lf_sat, align 4
// CHECK-NEXT: ret void
//
-void half_sat2() {
+void half_sat2(void) {
lf_sat = h;
}
@@ -150,7 +150,7 @@ void half_sat2() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void half_sat3() {
+void half_sat3(void) {
sa_sat = h;
}
@@ -163,7 +163,7 @@ void half_sat3() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @la_sat, align 8
// CHECK-NEXT: ret void
//
-void half_sat4() {
+void half_sat4(void) {
la_sat = h;
}
@@ -186,7 +186,7 @@ void half_sat4() {
// UNSIGNED-NEXT: store i16 [[SATMIN]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void half_sat5() {
+void half_sat5(void) {
usa_sat = h;
}
@@ -210,7 +210,7 @@ void half_sat5() {
// UNSIGNED-NEXT: store i64 [[SATMIN]], i64* @ula_sat, align 8
// UNSIGNED-NEXT: ret void
//
-void half_sat6() {
+void half_sat6(void) {
ula_sat = h;
}
@@ -223,7 +223,7 @@ void half_sat6() {
// CHECK-NEXT: store half [[TMP2]], half* @h, align 2
// CHECK-NEXT: ret void
//
-void fix_half1() {
+void fix_half1(void) {
h = sf;
}
@@ -236,7 +236,7 @@ void fix_half1() {
// CHECK-NEXT: store half [[TMP3]], half* @h, align 2
// CHECK-NEXT: ret void
//
-void fix_half2() {
+void fix_half2(void) {
h = lf;
}
@@ -248,7 +248,7 @@ void fix_half2() {
// CHECK-NEXT: store half [[TMP2]], half* @h, align 2
// CHECK-NEXT: ret void
//
-void fix_half3() {
+void fix_half3(void) {
h = sa;
}
@@ -261,7 +261,7 @@ void fix_half3() {
// CHECK-NEXT: store half [[TMP3]], half* @h, align 2
// CHECK-NEXT: ret void
//
-void fix_half4() {
+void fix_half4(void) {
h = la;
}
@@ -282,7 +282,7 @@ void fix_half4() {
// UNSIGNED-NEXT: store half [[TMP2]], half* @h, align 2
// UNSIGNED-NEXT: ret void
//
-void fix_half5() {
+void fix_half5(void) {
h = usa;
}
@@ -304,6 +304,6 @@ void fix_half5() {
// UNSIGNED-NEXT: store half [[TMP3]], half* @h, align 2
// UNSIGNED-NEXT: ret void
//
-void fix_half6() {
+void fix_half6(void) {
h = ula;
}
diff --git a/clang/test/Frontend/fixed_point_crash.c b/clang/test/Frontend/fixed_point_crash.c
index 869b7ee9355a3..3b3911117400c 100644
--- a/clang/test/Frontend/fixed_point_crash.c
+++ b/clang/test/Frontend/fixed_point_crash.c
@@ -5,13 +5,13 @@ union a {
int i;
};
-int fn1() {
+int fn1(void) {
union a m;
m.x = 5.6k;
return m.i;
}
-int fn2() {
+int fn2(void) {
union a m;
m.x = 7, 5.6k; // expected-warning {{expression result unused}}
return m.x, m.i; // expected-warning {{left operand of comma operator has no effect}}
diff --git a/clang/test/Frontend/fixed_point_div.c b/clang/test/Frontend/fixed_point_div.c
index d54ba3bf48b0d..ddb6b39413179 100644
--- a/clang/test/Frontend/fixed_point_div.c
+++ b/clang/test/Frontend/fixed_point_div.c
@@ -36,7 +36,7 @@ _Bool b;
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sdiv_sasasa() {
+void sdiv_sasasa(void) {
sa = sa / sa;
}
@@ -50,7 +50,7 @@ void sdiv_sasasa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sdiv_asaa() {
+void sdiv_asaa(void) {
a = sa / a;
}
@@ -63,7 +63,7 @@ void sdiv_asaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sdiv_sasasf() {
+void sdiv_sasasf(void) {
sa = sa / sf;
}
@@ -80,7 +80,7 @@ void sdiv_sasasf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sdiv_sasaf() {
+void sdiv_sasaf(void) {
sa = sa / f;
}
@@ -94,7 +94,7 @@ void sdiv_sasaf() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sdiv_aasf() {
+void sdiv_aasf(void) {
a = a / sf;
}
@@ -111,7 +111,7 @@ void sdiv_aasf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sdiv_aalf() {
+void sdiv_aalf(void) {
a = a / lf;
}
@@ -136,7 +136,7 @@ void sdiv_aalf() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sdiv_sasausa() {
+void sdiv_sasausa(void) {
sa = sa / usa;
}
@@ -163,7 +163,7 @@ void sdiv_sasausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void sdiv_asaua() {
+void sdiv_asaua(void) {
a = sa / ua;
}
@@ -189,7 +189,7 @@ void sdiv_asaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sdiv_sasausf() {
+void sdiv_sasausf(void) {
sa = sa / usf;
}
@@ -219,7 +219,7 @@ void sdiv_sasausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void sdiv_sasaulf() {
+void sdiv_sasaulf(void) {
sa = sa / ulf;
}
@@ -235,7 +235,7 @@ void sdiv_sasaulf() {
// CHECK-NEXT: store i32 [[TMP6]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sdiv_aaaaa() {
+void sdiv_aaaaa(void) {
a = a / a2 / a3 / a4;
}
@@ -256,7 +256,7 @@ void sdiv_aaaaa() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void udiv_usausausa() {
+void udiv_usausausa(void) {
usa = usa / usa;
}
@@ -280,7 +280,7 @@ void udiv_usausausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void udiv_uausaua() {
+void udiv_uausaua(void) {
ua = usa / ua;
}
@@ -302,7 +302,7 @@ void udiv_uausaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void udiv_usausausf() {
+void udiv_usausausf(void) {
usa = usa / usf;
}
@@ -332,7 +332,7 @@ void udiv_usausausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void udiv_usausauf() {
+void udiv_usausauf(void) {
usa = usa / uf;
}
@@ -349,7 +349,7 @@ void udiv_usausauf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasai() {
+void int_sasai(void) {
sa = sa / i;
}
@@ -365,7 +365,7 @@ void int_sasai() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasaui() {
+void int_sasaui(void) {
sa = sa / ui;
}
@@ -393,7 +393,7 @@ void int_sasaui() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausai() {
+void int_usausai(void) {
usa = usa / i;
}
@@ -421,7 +421,7 @@ void int_usausai() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausaui() {
+void int_usausaui(void) {
usa = usa / ui;
}
@@ -437,7 +437,7 @@ void int_usausaui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void int_lflfui() {
+void int_lflfui(void) {
lf = lf / ui;
}
@@ -455,7 +455,7 @@ void int_lflfui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aab() {
+void int_aab(void) {
a = a / b;
}
@@ -471,7 +471,7 @@ void int_aab() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aia() {
+void int_aia(void) {
a = i / a;
}
@@ -499,7 +499,7 @@ void int_aia() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usauiusa() {
+void int_usauiusa(void) {
usa = ui / usa;
}
@@ -515,7 +515,7 @@ void int_usauiusa() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sauisa() {
+void int_sauisa(void) {
sa = ui / sa;
}
@@ -528,7 +528,7 @@ void int_sauisa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasas() {
+void sat_sassasas(void) {
sa_sat = sa / sa_sat;
}
@@ -550,7 +550,7 @@ void sat_sassasas() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusausas() {
+void sat_usasusausas(void) {
usa_sat = usa / usa_sat;
}
@@ -576,7 +576,7 @@ void sat_usasusausas() {
// UNSIGNED-NEXT: store i32 [[RESIZE2]], i32* @ua_sat, align 4
// UNSIGNED-NEXT: ret void
//
-void sat_uasuausas() {
+void sat_uasuausas(void) {
ua_sat = ua / usa_sat;
}
@@ -596,7 +596,7 @@ void sat_uasuausas() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasi() {
+void sat_sassasi(void) {
sa_sat = sa_sat / i;
}
@@ -616,7 +616,7 @@ void sat_sassasi() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasui() {
+void sat_sassasui(void) {
sa_sat = sa_sat / ui;
}
@@ -638,7 +638,7 @@ void sat_sassasui() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @uf_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_ufsufsufs() {
+void sat_ufsufsufs(void) {
uf_sat = uf_sat / uf_sat;
}
@@ -674,6 +674,6 @@ void sat_ufsufsufs() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusasi() {
+void sat_usasusasi(void) {
usa_sat = usa_sat / i;
}
diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c
index 6c41bf6df163d..2d12a1ebb10b9 100644
--- a/clang/test/Frontend/fixed_point_errors.c
+++ b/clang/test/Frontend/fixed_point_errors.c
@@ -149,7 +149,7 @@ _Accum dec_with_hex_exp2 = 0.1P10k; // expected-error{{invalid suffix 'P10k'
_Accum hex_with_dex_exp1 = 0x0.1e10k; // expected-error{{hexadecimal floating constant requires an exponent}}
_Accum hex_with_dex_exp2 = 0x0.1E10k; // expected-error{{hexadecimal floating constant requires an exponent}}
-void CheckSuffixOnIntegerLiterals() {
+void CheckSuffixOnIntegerLiterals(void) {
_Accum short_acc_int;
_Accum acc_int;
_Accum long_acc_int;
diff --git a/clang/test/Frontend/fixed_point_mul.c b/clang/test/Frontend/fixed_point_mul.c
index eeb80dd08d94d..e4a6b8c83b06d 100644
--- a/clang/test/Frontend/fixed_point_mul.c
+++ b/clang/test/Frontend/fixed_point_mul.c
@@ -36,7 +36,7 @@ _Bool b;
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void smul_sasasa() {
+void smul_sasasa(void) {
sa = sa * sa;
}
@@ -50,7 +50,7 @@ void smul_sasasa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void smul_asaa() {
+void smul_asaa(void) {
a = sa * a;
}
@@ -63,7 +63,7 @@ void smul_asaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void smul_sasasf() {
+void smul_sasasf(void) {
sa = sa * sf;
}
@@ -80,7 +80,7 @@ void smul_sasasf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void smul_sasaf() {
+void smul_sasaf(void) {
sa = sa * f;
}
@@ -94,7 +94,7 @@ void smul_sasaf() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void smul_aasf() {
+void smul_aasf(void) {
a = a * sf;
}
@@ -111,7 +111,7 @@ void smul_aasf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void smul_aalf() {
+void smul_aalf(void) {
a = a * lf;
}
@@ -136,7 +136,7 @@ void smul_aalf() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void smul_sasausa() {
+void smul_sasausa(void) {
sa = sa * usa;
}
@@ -163,7 +163,7 @@ void smul_sasausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void smul_asaua() {
+void smul_asaua(void) {
a = sa * ua;
}
@@ -189,7 +189,7 @@ void smul_asaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void smul_sasausf() {
+void smul_sasausf(void) {
sa = sa * usf;
}
@@ -219,7 +219,7 @@ void smul_sasausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void smul_sasaulf() {
+void smul_sasaulf(void) {
sa = sa * ulf;
}
@@ -235,7 +235,7 @@ void smul_sasaulf() {
// CHECK-NEXT: store i32 [[TMP6]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void smul_aaaaa() {
+void smul_aaaaa(void) {
a = a * a2 * a3 * a4;
}
@@ -256,7 +256,7 @@ void smul_aaaaa() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void umul_usausausa() {
+void umul_usausausa(void) {
usa = usa * usa;
}
@@ -280,7 +280,7 @@ void umul_usausausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void umul_uausaua() {
+void umul_uausaua(void) {
ua = usa * ua;
}
@@ -302,7 +302,7 @@ void umul_uausaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void umul_usausausf() {
+void umul_usausausf(void) {
usa = usa * usf;
}
@@ -332,7 +332,7 @@ void umul_usausausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void umul_usausauf() {
+void umul_usausauf(void) {
usa = usa * uf;
}
@@ -349,7 +349,7 @@ void umul_usausauf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasai() {
+void int_sasai(void) {
sa = sa * i;
}
@@ -365,7 +365,7 @@ void int_sasai() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasaui() {
+void int_sasaui(void) {
sa = sa * ui;
}
@@ -393,7 +393,7 @@ void int_sasaui() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausai() {
+void int_usausai(void) {
usa = usa * i;
}
@@ -421,7 +421,7 @@ void int_usausai() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausaui() {
+void int_usausaui(void) {
usa = usa * ui;
}
@@ -437,7 +437,7 @@ void int_usausaui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void int_lflfui() {
+void int_lflfui(void) {
lf = lf * ui;
}
@@ -455,7 +455,7 @@ void int_lflfui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aab() {
+void int_aab(void) {
a = a * b;
}
@@ -471,7 +471,7 @@ void int_aab() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aia() {
+void int_aia(void) {
a = i * a;
}
@@ -499,7 +499,7 @@ void int_aia() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usauiusa() {
+void int_usauiusa(void) {
usa = ui * usa;
}
@@ -515,7 +515,7 @@ void int_usauiusa() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sauisa() {
+void int_sauisa(void) {
sa = ui * sa;
}
@@ -528,7 +528,7 @@ void int_sauisa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasas() {
+void sat_sassasas(void) {
sa_sat = sa * sa_sat;
}
@@ -550,7 +550,7 @@ void sat_sassasas() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusausas() {
+void sat_usasusausas(void) {
usa_sat = usa * usa_sat;
}
@@ -576,7 +576,7 @@ void sat_usasusausas() {
// UNSIGNED-NEXT: store i32 [[RESIZE2]], i32* @ua_sat, align 4
// UNSIGNED-NEXT: ret void
//
-void sat_uasuausas() {
+void sat_uasuausas(void) {
ua_sat = ua * usa_sat;
}
@@ -596,7 +596,7 @@ void sat_uasuausas() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasi() {
+void sat_sassasi(void) {
sa_sat = sa_sat * i;
}
@@ -616,7 +616,7 @@ void sat_sassasi() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasui() {
+void sat_sassasui(void) {
sa_sat = sa_sat * ui;
}
@@ -638,7 +638,7 @@ void sat_sassasui() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @uf_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_ufsufsufs() {
+void sat_ufsufsufs(void) {
uf_sat = uf_sat * uf_sat;
}
@@ -674,6 +674,6 @@ void sat_ufsufsufs() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusasi() {
+void sat_usasusasi(void) {
usa_sat = usa_sat * i;
}
diff --git a/clang/test/Frontend/fixed_point_same_fbits.c b/clang/test/Frontend/fixed_point_same_fbits.c
index 1d116b7dfa21c..43c6392f46792 100644
--- a/clang/test/Frontend/fixed_point_same_fbits.c
+++ b/clang/test/Frontend/fixed_point_same_fbits.c
@@ -4,7 +4,7 @@
/* The scale for unsigned fixed point types should be the same as that of signed
* fixed point types when -fsame-fbits is enabled. */
-void func() {
+void func(void) {
unsigned short _Accum u_short_accum = 0.5uhk;
unsigned _Accum u_accum = 0.5uk;
unsigned long _Accum u_long_accum = 0.5ulk;
diff --git a/clang/test/Frontend/fixed_point_shift.c b/clang/test/Frontend/fixed_point_shift.c
index a3d758798dfa9..f334f028d69bf 100644
--- a/clang/test/Frontend/fixed_point_shift.c
+++ b/clang/test/Frontend/fixed_point_shift.c
@@ -43,7 +43,7 @@ unsigned u;
// CHECK-NEXT: store i16 [[TMP3]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sleft_sasai() {
+void sleft_sasai(void) {
sa = sa << i;
}
@@ -55,7 +55,7 @@ void sleft_sasai() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sleft_aai() {
+void sleft_aai(void) {
a = a << i;
}
@@ -68,7 +68,7 @@ void sleft_aai() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @la, align 8
// CHECK-NEXT: ret void
//
-void sleft_lalai() {
+void sleft_lalai(void) {
la = la << i;
}
@@ -81,7 +81,7 @@ void sleft_lalai() {
// CHECK-NEXT: store i8 [[TMP3]], i8* @sf, align 1
// CHECK-NEXT: ret void
//
-void sleft_sfsfi() {
+void sleft_sfsfi(void) {
sf = sf << i;
}
@@ -94,7 +94,7 @@ void sleft_sfsfi() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void sleft_ffi() {
+void sleft_ffi(void) {
f = f << i;
}
@@ -106,7 +106,7 @@ void sleft_ffi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void sleft_lflfi() {
+void sleft_lflfi(void) {
lf = lf << i;
}
@@ -118,7 +118,7 @@ void sleft_lflfi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sleft_aau() {
+void sleft_aau(void) {
a = a << u;
}
@@ -131,7 +131,7 @@ void sleft_aau() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void sleft_ffu() {
+void sleft_ffu(void) {
f = f << u;
}
@@ -145,7 +145,7 @@ void sleft_ffu() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void uleft_usausai() {
+void uleft_usausai(void) {
usa = usa << i;
}
@@ -157,7 +157,7 @@ void uleft_usausai() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void uleft_uauai() {
+void uleft_uauai(void) {
ua = ua << i;
}
@@ -170,7 +170,7 @@ void uleft_uauai() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @ula, align 8
// CHECK-NEXT: ret void
//
-void uleft_ulaulai() {
+void uleft_ulaulai(void) {
ula = ula << i;
}
@@ -183,7 +183,7 @@ void uleft_ulaulai() {
// CHECK-NEXT: store i8 [[TMP3]], i8* @usf, align 1
// CHECK-NEXT: ret void
//
-void uleft_usfusfi() {
+void uleft_usfusfi(void) {
usf = usf << i;
}
@@ -196,7 +196,7 @@ void uleft_usfusfi() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void uleft_ufufi() {
+void uleft_ufufi(void) {
uf = uf << i;
}
@@ -208,7 +208,7 @@ void uleft_ufufi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ulf, align 4
// CHECK-NEXT: ret void
//
-void uleft_ulfulfi() {
+void uleft_ulfulfi(void) {
ulf = ulf << i;
}
@@ -220,7 +220,7 @@ void uleft_ulfulfi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void uleft_uauau() {
+void uleft_uauau(void) {
ua = ua << u;
}
@@ -233,7 +233,7 @@ void uleft_uauau() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void uleft_ufufu() {
+void uleft_ufufu(void) {
uf = uf << u;
}
@@ -247,7 +247,7 @@ void uleft_ufufu() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void sright_sasai() {
+void sright_sasai(void) {
sa = sa >> i;
}
@@ -259,7 +259,7 @@ void sright_sasai() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sright_aai() {
+void sright_aai(void) {
a = a >> i;
}
@@ -272,7 +272,7 @@ void sright_aai() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @la, align 8
// CHECK-NEXT: ret void
//
-void sright_lalai() {
+void sright_lalai(void) {
la = la >> i;
}
@@ -285,7 +285,7 @@ void sright_lalai() {
// CHECK-NEXT: store i8 [[TMP3]], i8* @sf, align 1
// CHECK-NEXT: ret void
//
-void sright_sfsfi() {
+void sright_sfsfi(void) {
sf = sf >> i;
}
@@ -298,7 +298,7 @@ void sright_sfsfi() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void sright_ffi() {
+void sright_ffi(void) {
f = f >> i;
}
@@ -310,7 +310,7 @@ void sright_ffi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void sright_lflfi() {
+void sright_lflfi(void) {
lf = lf >> i;
}
@@ -322,7 +322,7 @@ void sright_lflfi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void sright_aau() {
+void sright_aau(void) {
a = a >> u;
}
@@ -335,7 +335,7 @@ void sright_aau() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void sright_ffu() {
+void sright_ffu(void) {
f = f >> u;
}
@@ -349,7 +349,7 @@ void sright_ffu() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void uright_usausai() {
+void uright_usausai(void) {
usa = usa >> i;
}
@@ -361,7 +361,7 @@ void uright_usausai() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void uright_uauai() {
+void uright_uauai(void) {
ua = ua >> i;
}
@@ -374,7 +374,7 @@ void uright_uauai() {
// CHECK-NEXT: store i64 [[TMP3]], i64* @ula, align 8
// CHECK-NEXT: ret void
//
-void uright_ulaulai() {
+void uright_ulaulai(void) {
ula = ula >> i;
}
@@ -387,7 +387,7 @@ void uright_ulaulai() {
// CHECK-NEXT: store i8 [[TMP3]], i8* @usf, align 1
// CHECK-NEXT: ret void
//
-void uright_usfusfi() {
+void uright_usfusfi(void) {
usf = usf >> i;
}
@@ -400,7 +400,7 @@ void uright_usfusfi() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void uright_ufufi() {
+void uright_ufufi(void) {
uf = uf >> i;
}
@@ -412,7 +412,7 @@ void uright_ufufi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ulf, align 4
// CHECK-NEXT: ret void
//
-void uright_ulfulfi() {
+void uright_ulfulfi(void) {
ulf = ulf >> i;
}
@@ -424,7 +424,7 @@ void uright_ulfulfi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void uright_uauau() {
+void uright_uauau(void) {
ua = ua >> u;
}
@@ -437,7 +437,7 @@ void uright_uauau() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void uright_ufufu() {
+void uright_ufufu(void) {
uf = uf >> u;
}
@@ -451,7 +451,7 @@ void uright_ufufu() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void satleft_sassasi() {
+void satleft_sassasi(void) {
sa_sat = sa_sat << i;
}
@@ -463,7 +463,7 @@ void satleft_sassasi() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a_sat, align 4
// CHECK-NEXT: ret void
//
-void satleft_asasi() {
+void satleft_asasi(void) {
a_sat = a_sat << i;
}
@@ -476,7 +476,7 @@ void satleft_asasi() {
// CHECK-NEXT: store i8 [[TMP3]], i8* @sf_sat, align 1
// CHECK-NEXT: ret void
//
-void satleft_sfssfsi() {
+void satleft_sfssfsi(void) {
sf_sat = sf_sat << i;
}
@@ -489,7 +489,7 @@ void satleft_sfssfsi() {
// CHECK-NEXT: store i16 [[TMP3]], i16* @f_sat, align 2
// CHECK-NEXT: ret void
//
-void satleft_fsfsi() {
+void satleft_fsfsi(void) {
f_sat = f_sat << i;
}
@@ -511,7 +511,7 @@ void satleft_fsfsi() {
// UNSIGNED-NEXT: store i16 [[TMP3]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void satleft_usasusasi() {
+void satleft_usasusasi(void) {
usa_sat = usa_sat << i;
}
@@ -531,7 +531,7 @@ void satleft_usasusasi() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @ua_sat, align 4
// UNSIGNED-NEXT: ret void
//
-void satleft_uasuasi() {
+void satleft_uasuasi(void) {
ua_sat = ua_sat << i;
}
@@ -553,7 +553,7 @@ void satleft_uasuasi() {
// UNSIGNED-NEXT: store i8 [[TMP3]], i8* @usf_sat, align 1
// UNSIGNED-NEXT: ret void
//
-void satleft_usfsusfsi() {
+void satleft_usfsusfsi(void) {
usf_sat = usf_sat << i;
}
@@ -575,6 +575,6 @@ void satleft_usfsusfsi() {
// UNSIGNED-NEXT: store i16 [[TMP3]], i16* @uf_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void satleft_ufsufsi() {
+void satleft_ufsufsi(void) {
uf_sat = uf_sat << i;
}
diff --git a/clang/test/Frontend/fixed_point_sub.c b/clang/test/Frontend/fixed_point_sub.c
index 6446d76fbaa56..e321a60cd67be 100644
--- a/clang/test/Frontend/fixed_point_sub.c
+++ b/clang/test/Frontend/fixed_point_sub.c
@@ -36,7 +36,7 @@ _Bool b;
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void ssub_sasasa() {
+void ssub_sasasa(void) {
sa = sa - sa;
}
@@ -50,7 +50,7 @@ void ssub_sasasa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void ssub_asaa() {
+void ssub_asaa(void) {
a = sa - a;
}
@@ -63,7 +63,7 @@ void ssub_asaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void ssub_sasasf() {
+void ssub_sasasf(void) {
sa = sa - sf;
}
@@ -80,7 +80,7 @@ void ssub_sasasf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void ssub_sasaf() {
+void ssub_sasaf(void) {
sa = sa - f;
}
@@ -94,7 +94,7 @@ void ssub_sasaf() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void ssub_aasf() {
+void ssub_aasf(void) {
a = a - sf;
}
@@ -111,7 +111,7 @@ void ssub_aasf() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void ssub_aalf() {
+void ssub_aalf(void) {
a = a - lf;
}
@@ -136,7 +136,7 @@ void ssub_aalf() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void ssub_sasausa() {
+void ssub_sasausa(void) {
sa = sa - usa;
}
@@ -163,7 +163,7 @@ void ssub_sasausa() {
// UNSIGNED-NEXT: store i32 [[TMP2]], i32* @a, align 4
// UNSIGNED-NEXT: ret void
//
-void ssub_asaua() {
+void ssub_asaua(void) {
a = sa - ua;
}
@@ -189,7 +189,7 @@ void ssub_asaua() {
// UNSIGNED-NEXT: store i16 [[TMP2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void ssub_sasausf() {
+void ssub_sasausf(void) {
sa = sa - usf;
}
@@ -219,7 +219,7 @@ void ssub_sasausf() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// UNSIGNED-NEXT: ret void
//
-void ssub_sasaulf() {
+void ssub_sasaulf(void) {
sa = sa - ulf;
}
@@ -235,7 +235,7 @@ void ssub_sasaulf() {
// CHECK-NEXT: store i32 [[TMP6]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void ssub_aaaaa() {
+void ssub_aaaaa(void) {
a = a - a2 - a3 - a4;
}
@@ -248,7 +248,7 @@ void ssub_aaaaa() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void usub_usausausa() {
+void usub_usausausa(void) {
usa = usa - usa;
}
@@ -262,7 +262,7 @@ void usub_usausausa() {
// CHECK-NEXT: store i32 [[TMP2]], i32* @ua, align 4
// CHECK-NEXT: ret void
//
-void usub_uausaua() {
+void usub_uausaua(void) {
ua = usa - ua;
}
@@ -275,7 +275,7 @@ void usub_uausaua() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void usub_usausausf() {
+void usub_usausausf(void) {
usa = usa - usf;
}
@@ -292,7 +292,7 @@ void usub_usausausf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void usub_usausauf() {
+void usub_usausauf(void) {
usa = usa - uf;
}
@@ -309,7 +309,7 @@ void usub_usausauf() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasai() {
+void int_sasai(void) {
sa = sa - i;
}
@@ -325,7 +325,7 @@ void int_sasai() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa, align 2
// CHECK-NEXT: ret void
//
-void int_sasaui() {
+void int_sasaui(void) {
sa = sa - ui;
}
@@ -353,7 +353,7 @@ void int_sasaui() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausai() {
+void int_usausai(void) {
usa = usa - i;
}
@@ -381,7 +381,7 @@ void int_usausai() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void int_usausaui() {
+void int_usausaui(void) {
usa = usa - ui;
}
@@ -397,7 +397,7 @@ void int_usausaui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void int_lflfui() {
+void int_lflfui(void) {
lf = lf - ui;
}
@@ -415,7 +415,7 @@ void int_lflfui() {
// CHECK-NEXT: store i32 [[RESIZE2]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void int_aab() {
+void int_aab(void) {
a = a - b;
}
@@ -428,7 +428,7 @@ void int_aab() {
// CHECK-NEXT: store i16 [[TMP2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasas() {
+void sat_sassasas(void) {
sa_sat = sa - sa_sat;
}
@@ -452,7 +452,7 @@ void sat_sassasas() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusausas() {
+void sat_usasusausas(void) {
usa_sat = usa - usa_sat;
}
@@ -480,7 +480,7 @@ void sat_usasusausas() {
// UNSIGNED-NEXT: store i32 [[RESIZE2]], i32* @ua_sat, align 4
// UNSIGNED-NEXT: ret void
//
-void sat_uasuausas() {
+void sat_uasuausas(void) {
ua_sat = ua - usa_sat;
}
@@ -500,7 +500,7 @@ void sat_uasuausas() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasi() {
+void sat_sassasi(void) {
sa_sat = sa_sat - i;
}
@@ -520,7 +520,7 @@ void sat_sassasi() {
// CHECK-NEXT: store i16 [[RESIZE2]], i16* @sa_sat, align 2
// CHECK-NEXT: ret void
//
-void sat_sassasui() {
+void sat_sassasui(void) {
sa_sat = sa_sat - ui;
}
@@ -544,7 +544,7 @@ void sat_sassasui() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @uf_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_ufsufsufs() {
+void sat_ufsufsufs(void) {
uf_sat = uf_sat - uf_sat;
}
@@ -580,6 +580,6 @@ void sat_ufsufsufs() {
// UNSIGNED-NEXT: store i16 [[RESIZE2]], i16* @usa_sat, align 2
// UNSIGNED-NEXT: ret void
//
-void sat_usasusasi() {
+void sat_usasusasi(void) {
usa_sat = usa_sat - i;
}
diff --git a/clang/test/Frontend/fixed_point_to_bool.c b/clang/test/Frontend/fixed_point_to_bool.c
index 13b39b8e7ac4f..20482b8c9d85d 100644
--- a/clang/test/Frontend/fixed_point_to_bool.c
+++ b/clang/test/Frontend/fixed_point_to_bool.c
@@ -4,7 +4,7 @@
_Bool global_b = 1.0k; // @global_b = {{*.}}global i8 1, align 1
_Bool global_b2 = 0.0k; // @global_b2 = {{*.}}global i8 0, align 1
-void func() {
+void func(void) {
_Accum a = 0.5k;
unsigned _Accum ua = 0.5uk;
_Bool b;
diff --git a/clang/test/Frontend/fixed_point_unary.c b/clang/test/Frontend/fixed_point_unary.c
index 6ce760daba115..90595040b52f9 100644
--- a/clang/test/Frontend/fixed_point_unary.c
+++ b/clang/test/Frontend/fixed_point_unary.c
@@ -25,7 +25,7 @@ int i;
// CHECK-NEXT: store i32 [[TMP1]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void inc_a() {
+void inc_a(void) {
a++;
}
@@ -36,7 +36,7 @@ void inc_a() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void inc_f() {
+void inc_f(void) {
f++;
}
@@ -47,7 +47,7 @@ void inc_f() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void inc_lf() {
+void inc_lf(void) {
lf++;
}
@@ -65,7 +65,7 @@ void inc_lf() {
// UNSIGNED-NEXT: store i32 [[TMP1]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void inc_ua() {
+void inc_ua(void) {
ua++;
}
@@ -83,7 +83,7 @@ void inc_ua() {
// UNSIGNED-NEXT: store i16 [[TMP1]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void inc_usa() {
+void inc_usa(void) {
usa++;
}
@@ -101,7 +101,7 @@ void inc_usa() {
// UNSIGNED-NEXT: store i16 [[TMP1]], i16* @uf, align 2
// UNSIGNED-NEXT: ret void
//
-void inc_uf() {
+void inc_uf(void) {
uf++;
}
@@ -112,7 +112,7 @@ void inc_uf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void inc_sa() {
+void inc_sa(void) {
sa++;
}
@@ -123,7 +123,7 @@ void inc_sa() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @sf, align 2
// CHECK-NEXT: ret void
//
-void inc_sf() {
+void inc_sf(void) {
sf++;
}
@@ -134,7 +134,7 @@ void inc_sf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @slf, align 4
// CHECK-NEXT: ret void
//
-void inc_slf() {
+void inc_slf(void) {
slf++;
}
@@ -154,7 +154,7 @@ void inc_slf() {
// UNSIGNED-NEXT: store i32 [[RESIZE1]], i32* @sua, align 4
// UNSIGNED-NEXT: ret void
//
-void inc_sua() {
+void inc_sua(void) {
sua++;
}
@@ -174,7 +174,7 @@ void inc_sua() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @susa, align 2
// UNSIGNED-NEXT: ret void
//
-void inc_susa() {
+void inc_susa(void) {
susa++;
}
@@ -194,7 +194,7 @@ void inc_susa() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @suf, align 2
// UNSIGNED-NEXT: ret void
//
-void inc_suf() {
+void inc_suf(void) {
suf++;
}
@@ -206,7 +206,7 @@ void inc_suf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void dec_a() {
+void dec_a(void) {
a--;
}
@@ -217,7 +217,7 @@ void dec_a() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void dec_f() {
+void dec_f(void) {
f--;
}
@@ -228,7 +228,7 @@ void dec_f() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @lf, align 4
// CHECK-NEXT: ret void
//
-void dec_lf() {
+void dec_lf(void) {
lf--;
}
@@ -246,7 +246,7 @@ void dec_lf() {
// UNSIGNED-NEXT: store i32 [[TMP1]], i32* @ua, align 4
// UNSIGNED-NEXT: ret void
//
-void dec_ua() {
+void dec_ua(void) {
ua--;
}
@@ -264,7 +264,7 @@ void dec_ua() {
// UNSIGNED-NEXT: store i16 [[TMP1]], i16* @usa, align 2
// UNSIGNED-NEXT: ret void
//
-void dec_usa() {
+void dec_usa(void) {
usa--;
}
@@ -282,7 +282,7 @@ void dec_usa() {
// UNSIGNED-NEXT: store i16 [[TMP1]], i16* @uf, align 2
// UNSIGNED-NEXT: ret void
//
-void dec_uf() {
+void dec_uf(void) {
uf--;
}
@@ -293,7 +293,7 @@ void dec_uf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void dec_sa() {
+void dec_sa(void) {
sa--;
}
@@ -304,7 +304,7 @@ void dec_sa() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @sf, align 2
// CHECK-NEXT: ret void
//
-void dec_sf() {
+void dec_sf(void) {
sf--;
}
@@ -315,7 +315,7 @@ void dec_sf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @slf, align 4
// CHECK-NEXT: ret void
//
-void dec_slf() {
+void dec_slf(void) {
slf--;
}
@@ -337,7 +337,7 @@ void dec_slf() {
// UNSIGNED-NEXT: store i32 [[RESIZE1]], i32* @sua, align 4
// UNSIGNED-NEXT: ret void
//
-void dec_sua() {
+void dec_sua(void) {
sua--;
}
@@ -359,7 +359,7 @@ void dec_sua() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @susa, align 2
// UNSIGNED-NEXT: ret void
//
-void dec_susa() {
+void dec_susa(void) {
susa--;
}
@@ -381,7 +381,7 @@ void dec_susa() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @suf, align 2
// UNSIGNED-NEXT: ret void
//
-void dec_suf() {
+void dec_suf(void) {
suf--;
}
@@ -393,7 +393,7 @@ void dec_suf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void neg_a() {
+void neg_a(void) {
a = -a;
}
@@ -404,7 +404,7 @@ void neg_a() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @f, align 2
// CHECK-NEXT: ret void
//
-void neg_f() {
+void neg_f(void) {
f = -f;
}
@@ -415,7 +415,7 @@ void neg_f() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @usa, align 2
// CHECK-NEXT: ret void
//
-void neg_usa() {
+void neg_usa(void) {
usa = -usa;
}
@@ -426,7 +426,7 @@ void neg_usa() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void neg_uf() {
+void neg_uf(void) {
uf = -uf;
}
@@ -437,7 +437,7 @@ void neg_uf() {
// CHECK-NEXT: store i32 [[TMP1]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void neg_sa() {
+void neg_sa(void) {
sa = -sa;
}
@@ -448,7 +448,7 @@ void neg_sa() {
// CHECK-NEXT: store i16 [[TMP1]], i16* @sf, align 2
// CHECK-NEXT: ret void
//
-void neg_sf() {
+void neg_sf(void) {
sf = -sf;
}
@@ -470,7 +470,7 @@ void neg_sf() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @susa, align 2
// UNSIGNED-NEXT: ret void
//
-void neg_susa() {
+void neg_susa(void) {
susa = -susa;
}
@@ -492,7 +492,7 @@ void neg_susa() {
// UNSIGNED-NEXT: store i16 [[RESIZE1]], i16* @suf, align 2
// UNSIGNED-NEXT: ret void
//
-void neg_suf() {
+void neg_suf(void) {
suf = -suf;
}
@@ -503,7 +503,7 @@ void neg_suf() {
// CHECK-NEXT: store i32 [[TMP0]], i32* @a, align 4
// CHECK-NEXT: ret void
//
-void plus_a() {
+void plus_a(void) {
a = +a;
}
@@ -513,7 +513,7 @@ void plus_a() {
// CHECK-NEXT: store i16 [[TMP0]], i16* @uf, align 2
// CHECK-NEXT: ret void
//
-void plus_uf() {
+void plus_uf(void) {
uf = +uf;
}
@@ -523,7 +523,7 @@ void plus_uf() {
// CHECK-NEXT: store i32 [[TMP0]], i32* @sa, align 4
// CHECK-NEXT: ret void
//
-void plus_sa() {
+void plus_sa(void) {
sa = +sa;
}
@@ -537,7 +537,7 @@ void plus_sa() {
// CHECK-NEXT: store i32 [[LNOT_EXT]], i32* @i, align 4
// CHECK-NEXT: ret void
//
-void not_a() {
+void not_a(void) {
i = !a;
}
@@ -550,7 +550,7 @@ void not_a() {
// CHECK-NEXT: store i32 [[LNOT_EXT]], i32* @i, align 4
// CHECK-NEXT: ret void
//
-void not_uf() {
+void not_uf(void) {
i = !uf;
}
@@ -563,6 +563,6 @@ void not_uf() {
// CHECK-NEXT: store i32 [[LNOT_EXT]], i32* @i, align 4
// CHECK-NEXT: ret void
//
-void not_susa() {
+void not_susa(void) {
i = !susa;
}
diff --git a/clang/test/Frontend/fixed_point_unknown_conversions.c b/clang/test/Frontend/fixed_point_unknown_conversions.c
index 8595901f9e9c3..b80c571307ccf 100644
--- a/clang/test/Frontend/fixed_point_unknown_conversions.c
+++ b/clang/test/Frontend/fixed_point_unknown_conversions.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -verify -ffixed-point %s
-void func() {
+void func(void) {
_Bool b;
char c;
int i;
diff --git a/clang/test/Frontend/ir-support.c b/clang/test/Frontend/ir-support.c
index f69161e8705cd..d0c7dfa418cad 100644
--- a/clang/test/Frontend/ir-support.c
+++ b/clang/test/Frontend/ir-support.c
@@ -16,4 +16,4 @@
// RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s
// RUN:
diff %t.s %t.ll.s
-int f() { return 0; }
+int f(void) { return 0; }
diff --git a/clang/test/Frontend/noderef.c b/clang/test/Frontend/noderef.c
index d136ff0c71926..6b9a143168172 100644
--- a/clang/test/Frontend/noderef.c
+++ b/clang/test/Frontend/noderef.c
@@ -23,7 +23,7 @@ int NODEREF *func(int NODEREF *arg) { // expected-note{{arg declared here}}
void func2(int x) {}
-int test() {
+int test(void) {
int NODEREF *p; // expected-note 34 {{p declared here}}
int *p2;
diff --git a/clang/test/Frontend/noderef_on_non_pointers.m b/clang/test/Frontend/noderef_on_non_pointers.m
index ced7627bb5e8d..de2f9dbde4895 100644
--- a/clang/test/Frontend/noderef_on_non_pointers.m
+++ b/clang/test/Frontend/noderef_on_non_pointers.m
@@ -6,6 +6,6 @@ @interface NSObject
+ (id)new;
@end
-void func() {
+void func(void) {
id NODEREF obj = [NSObject new]; // expected-warning{{'noderef' can only be used on an array or pointer type}}
}
diff --git a/clang/test/Frontend/stdin-input.c b/clang/test/Frontend/stdin-input.c
index 7b15482b8c513..e8c890efa09ec 100644
--- a/clang/test/Frontend/stdin-input.c
+++ b/clang/test/Frontend/stdin-input.c
@@ -4,4 +4,4 @@
// CHECK: source_filename = "test/foo.c"
// CHECK: !DIFile(filename: "test/foo.c"
-int main() {}
+int main(void) {}
diff --git a/clang/test/Frontend/system-header-line-directive-ms-lineendings.c b/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
index 57b7a27ea49cb..92fc07f65e0d4 100644
--- a/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
+++ b/clang/test/Frontend/system-header-line-directive-ms-lineendings.c
@@ -9,12 +9,12 @@
// CHECK: # 1 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
// CHECK: # 1 "{{.*}}noline.h" 1 3
-// CHECK: foo();
+// CHECK: foo(void);
// CHECK: # 3 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
// The "3" below indicates that "foo.h" is considered a system header.
// CHECK: # 1 "foo.h" 3
-// CHECK: foo();
+// CHECK: foo(void);
// CHECK: # 4 "{{.*}}system-header-line-directive-ms-lineendings.c" 2
// CHECK: # 1 "{{.*}}line-directive.h" 1
// CHECK: # 10 "foo.h"{{$}}
diff --git a/clang/test/Frontend/system-header-line-directive.c b/clang/test/Frontend/system-header-line-directive.c
index 9d4f09885f941..0de69196d76e2 100644
--- a/clang/test/Frontend/system-header-line-directive.c
+++ b/clang/test/Frontend/system-header-line-directive.c
@@ -12,12 +12,12 @@
// CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
// CHECK: # 1 "{{.*}}noline.h" 1 3
-// CHECK: foo();
+// CHECK: foo(void);
// CHECK: # 4 "{{.*}}system-header-line-directive.c" 2
// CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
// The "3" below indicates that "foo.h" is considered a system header.
// CHECK: # 1 "foo.h" 3
-// CHECK: foo();
+// CHECK: foo(void);
// CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
// CHECK: # 1 "{{.*}}line-directive.h" 1
// CHECK: # 10 "foo.h"{{$}}
diff --git a/clang/test/Frontend/verify-prefixes.c b/clang/test/Frontend/verify-prefixes.c
index c5b545cf84c0d..38c2e57f75c30 100644
--- a/clang/test/Frontend/verify-prefixes.c
+++ b/clang/test/Frontend/verify-prefixes.c
@@ -100,7 +100,7 @@ GCONST int glb = 5;
# define SCONST
#endif
-void foo() {
+void foo(void) {
LCONST int loc = 5;
SCONST static int sta = 5;
// We don't actually expect 1-2 occurrences of this error. We're just
diff --git a/clang/test/Frontend/warning-mapping-2.c b/clang/test/Frontend/warning-mapping-2.c
index 4f7f1ee7606e5..d2a2a21f17111 100644
--- a/clang/test/Frontend/warning-mapping-2.c
+++ b/clang/test/Frontend/warning-mapping-2.c
@@ -4,4 +4,4 @@
// Expect *not* to see a diagnostic for "implicit declaration of function"
// expected-no-diagnostics
-void f0() { f1(); }
+void f0(void) { f1(); }
diff --git a/clang/test/Headers/altivec-intrin.c b/clang/test/Headers/altivec-intrin.c
index c71b48da040dc..50b85c0de3088 100644
--- a/clang/test/Headers/altivec-intrin.c
+++ b/clang/test/Headers/altivec-intrin.c
@@ -7,7 +7,7 @@
__attribute__((__aligned__(16))) float x[20];
-int main()
+int main(void)
{
vector unsigned char l = vec_lvsl (0, &x[1]); // expected-warning {{is deprecated: use assignment for unaligned little endian loads/stores}}
vector unsigned char r = vec_lvsr (0, &x[1]); // expected-warning {{is deprecated: use assignment for unaligned little endian loads/stores}}
diff --git a/clang/test/Headers/arm-acle-header.c b/clang/test/Headers/arm-acle-header.c
index e50a68c64b0f0..1084a8cf87e19 100644
--- a/clang/test/Headers/arm-acle-header.c
+++ b/clang/test/Headers/arm-acle-header.c
@@ -13,4 +13,4 @@
#ifdef _MSC_VER
#include <intrin.h>
#endif
-void f() { __nop(); __dmb(0); __wfi(); }
+void f(void) { __nop(); __dmb(0); __wfi(); }
diff --git a/clang/test/Headers/c11.c b/clang/test/Headers/c11.c
index 6594823c27334..b5896316a82d5 100644
--- a/clang/test/Headers/c11.c
+++ b/clang/test/Headers/c11.c
@@ -4,16 +4,16 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 -fms-compatibility-version=17.00 %s
-noreturn int f(); // expected-error 1+{{}}
+noreturn int f(void); // expected-error 1+{{}}
#include <stdnoreturn.h>
#include <stdnoreturn.h>
#include <stdnoreturn.h>
-int g();
-noreturn int g();
-int noreturn g();
-int g();
+int g(void);
+noreturn int g(void);
+int noreturn g(void);
+int g(void);
#include <stdalign.h>
_Static_assert(__alignas_is_defined, "");
diff --git a/clang/test/Headers/typedef_guards.c b/clang/test/Headers/typedef_guards.c
index 968b26d8c7319..e934250f37070 100644
--- a/clang/test/Headers/typedef_guards.c
+++ b/clang/test/Headers/typedef_guards.c
@@ -22,8 +22,8 @@ typedef __typeof__(*L"") wchar_t;
extern void foo(wchar_t x);
extern void bar(size_t x);
-void *baz() { return NULL; }
-void quz() {
+void *baz(void) { return NULL; }
+void quz(void) {
va_list y;
}
diff --git a/clang/test/Headers/x86-header-warnings.c b/clang/test/Headers/x86-header-warnings.c
index 3306b95c1b485..35c457439c9f9 100644
--- a/clang/test/Headers/x86-header-warnings.c
+++ b/clang/test/Headers/x86-header-warnings.c
@@ -7,7 +7,7 @@
#include <x86intrin.h>
-void test0() {
+void test0(void) {
// expected-no-diagnostics
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_OFF);
diff --git a/clang/test/Index/Core/index-pch.c b/clang/test/Index/Core/index-pch.c
index 773cfc59077e6..f5f53466e039b 100644
--- a/clang/test/Index/Core/index-pch.c
+++ b/clang/test/Index/Core/index-pch.c
@@ -3,10 +3,10 @@
// RUN: c-index-test core -print-source-symbols -module-file %t.pch | FileCheck %s
// CHECK: [[@LINE+1]]:6 | function/C | test1 | [[TEST1_USR:.*]] | [[TEST1_CG:.*]] | Decl | rel: 0
-void test1();
+void test1(void);
// CHECK: [[@LINE+1]]:20 | function/C | test2 | [[TEST2_USR:.*]] | {{.*}} | Def | rel: 0
-static inline void test2() {
+static inline void test2(void) {
// CHECK: [[@LINE+2]]:3 | function/C | test1 | [[TEST1_USR]] | [[TEST1_CG]] | Ref,Call,RelCall,RelCont | rel: 1
// CHECK-NEXT: RelCall,RelCont | test2 | [[TEST2_USR]]
test1();
diff --git a/clang/test/Index/Inputs/Headers/a.h b/clang/test/Index/Inputs/Headers/a.h
index 33c3417676273..c5cc31bfb3dc3 100644
--- a/clang/test/Index/Inputs/Headers/a.h
+++ b/clang/test/Index/Inputs/Headers/a.h
@@ -1,2 +1,2 @@
-int *getA();
+int *getA(void);
diff --git a/clang/test/Index/Inputs/Headers/a_extensions.h b/clang/test/Index/Inputs/Headers/a_extensions.h
index 2155787549249..1027eee383dae 100644
--- a/clang/test/Index/Inputs/Headers/a_extensions.h
+++ b/clang/test/Index/Inputs/Headers/a_extensions.h
@@ -1 +1 @@
-int *getAExtensions();
+int *getAExtensions(void);
diff --git a/clang/test/Index/Inputs/Headers/crash.h b/clang/test/Index/Inputs/Headers/crash.h
index 238359abbe335..76614fe14ade0 100644
--- a/clang/test/Index/Inputs/Headers/crash.h
+++ b/clang/test/Index/Inputs/Headers/crash.h
@@ -3,4 +3,4 @@
# pragma clang __debug crash
#endif
-const char *getCrashString();
+const char *getCrashString(void);
diff --git a/clang/test/Index/annotate-comments-objc.m b/clang/test/Index/annotate-comments-objc.m
index 471bc2bcb2176..b4671519c4d91 100644
--- a/clang/test/Index/annotate-comments-objc.m
+++ b/clang/test/Index/annotate-comments-objc.m
@@ -49,7 +49,7 @@ - (void)method1_isdoxy4; /*!< method1_isdoxy4 IS_DOXYGEN_SINGLE */
// embedded in declarators.
#define DECLARE_FUNCTION() \
- void functionFromMacro() { \
+ void functionFromMacro(void) { \
typedef struct Struct_notdoxy Struct_notdoxy; \
}
diff --git a/clang/test/Index/crash-recovery-modules.m b/clang/test/Index/crash-recovery-modules.m
index 82979f794bea8..72e25a0fbf5f2 100644
--- a/clang/test/Index/crash-recovery-modules.m
+++ b/clang/test/Index/crash-recovery-modules.m
@@ -19,7 +19,7 @@
#pragma clang __debug crash
#endif
-void test() {
+void test(void) {
const char* error = getCrashString();
}
diff --git a/clang/test/Index/pragma-diag-reparse.c b/clang/test/Index/pragma-diag-reparse.c
index aa1413cda089a..e0ce8387ec609 100644
--- a/clang/test/Index/pragma-diag-reparse.c
+++ b/clang/test/Index/pragma-diag-reparse.c
@@ -12,7 +12,7 @@ int main (int argc, const char * argv[])
}
#pragma clang diagnostic ignored "-Wmisleading-indentation"
-void foo() { int b=0; while (b==b); }
+void foo(void) { int b=0; while (b==b); }
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source-reparse 5 local \
// RUN: -I%S/Inputs \
diff --git a/clang/test/Index/preamble-reparse-cmd-define.c b/clang/test/Index/preamble-reparse-cmd-define.c
index 3fa76836d6147..d3513f55f1e04 100644
--- a/clang/test/Index/preamble-reparse-cmd-define.c
+++ b/clang/test/Index/preamble-reparse-cmd-define.c
@@ -4,6 +4,6 @@
// CHECK-NOT: error:
-int foo() {
+int foo(void) {
return x;
}
diff --git a/clang/test/Index/preamble-reparse-cmd-define.c.remap b/clang/test/Index/preamble-reparse-cmd-define.c.remap
index 35c140d08211c..ab0a0dbdca422 100644
--- a/clang/test/Index/preamble-reparse-cmd-define.c.remap
+++ b/clang/test/Index/preamble-reparse-cmd-define.c.remap
@@ -3,6 +3,6 @@
#error CMD_MACRO undefined
#endif
-int foo() {
+int foo(void) {
return x;
}
diff --git a/clang/test/Index/preamble-reparse-import.m b/clang/test/Index/preamble-reparse-import.m
index 9bdb89a1dc505..663fc2706e020 100644
--- a/clang/test/Index/preamble-reparse-import.m
+++ b/clang/test/Index/preamble-reparse-import.m
@@ -7,6 +7,6 @@
#import "preamble-reparse-import.m-1.h"
-void foo();
+void foo(void);
#import "preamble-reparse-import.m-2.h"
#import "preamble-reparse-import.m-1.h"
diff --git a/clang/test/Index/preamble-reparse-warn-macro.c b/clang/test/Index/preamble-reparse-warn-macro.c
index e02fbde784036..d10c1d61d53f6 100644
--- a/clang/test/Index/preamble-reparse-warn-macro.c
+++ b/clang/test/Index/preamble-reparse-warn-macro.c
@@ -8,5 +8,5 @@
#define MAC 1
#include "header.h"
-void test();
+void test(void);
#define MAC 2
diff --git a/clang/test/Index/warning-flags.c b/clang/test/Index/warning-flags.c
index 2d9a1d99cac91..1694c6abab562 100644
--- a/clang/test/Index/warning-flags.c
+++ b/clang/test/Index/warning-flags.c
@@ -1,4 +1,4 @@
-int foo() { }
+int foo(void) { }
int *bar(float *f) { return f; }
// RUN: c-index-test -test-load-source all %s 2>&1|FileCheck -check-prefix=CHECK-BOTH-WARNINGS %s
diff --git a/clang/test/Integration/thinlto_profile_sample_accurate.c b/clang/test/Integration/thinlto_profile_sample_accurate.c
index b756829439cf7..454242736cf6f 100644
--- a/clang/test/Integration/thinlto_profile_sample_accurate.c
+++ b/clang/test/Integration/thinlto_profile_sample_accurate.c
@@ -7,5 +7,5 @@
// CHECK: define{{.*}} void @foo()
// CHECK: attributes{{.*}} "profile-sample-accurate"
-void foo() {
+void foo(void) {
}
diff --git a/clang/test/InterfaceStubs/externstatic.c b/clang/test/InterfaceStubs/externstatic.c
index 298dd24a013f9..d93e1514bc4c2 100644
--- a/clang/test/InterfaceStubs/externstatic.c
+++ b/clang/test/InterfaceStubs/externstatic.c
@@ -24,4 +24,4 @@
// We want to emit extern function symbols.
// CHECK-EXTERN2: bar
STORAGE int foo;
-STORAGE int bar() { return 42; }
+STORAGE int bar(void) { return 42; }
diff --git a/clang/test/InterfaceStubs/inline.c b/clang/test/InterfaceStubs/inline.c
index 1dec4ae677d76..7a30e511d5f3d 100644
--- a/clang/test/InterfaceStubs/inline.c
+++ b/clang/test/InterfaceStubs/inline.c
@@ -39,7 +39,7 @@
// CHECK-STATIC-NOT: foo.var
// CHECK-STD-NOT: foo
#pragma clang diagnostic ignored "-Wstatic-local-in-inline"
-INLINE int foo() {
+INLINE int foo(void) {
static int var = 42;
return var;
}
diff --git a/clang/test/InterfaceStubs/inline.h b/clang/test/InterfaceStubs/inline.h
index d8b1b0a617d56..2f8083c98fdab 100644
--- a/clang/test/InterfaceStubs/inline.h
+++ b/clang/test/InterfaceStubs/inline.h
@@ -1,5 +1,5 @@
// REQUIRES: x86-registered-target
-INLINE int bar() {
+INLINE int bar(void) {
static int var = 42;
return var;
}
diff --git a/clang/test/Lexer/c90.c b/clang/test/Lexer/c90.c
index 649173d71dfbc..8752404c1c199 100644
--- a/clang/test/Lexer/c90.c
+++ b/clang/test/Lexer/c90.c
@@ -11,7 +11,7 @@ b;}
// comment accepted as extension /* expected-error {{// comments are not allowed in this language}}
-void test2() {
+void test2(void) {
const char * str =
"sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds" // expected-error{{string literal of length 845 exceeds maximum length 509 that C90 compilers are required to support}}
"sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds"
@@ -28,13 +28,13 @@ void test2() {
"sdjflksdjf lksdjf skldfjsdkljflksdjf kldsjflkdsj fldks jflsdkjfds";
}
-void test3() {
+void test3(void) {
(void)L"\u1234"; // expected-error {{universal character names are only valid in C99 or C++}}
(void)L'\u1234'; // expected-error {{universal character names are only valid in C99 or C++}}
}
#define PREFIX(x) foo ## x
-int test4() {
+int test4(void) {
int PREFIX(0p) = 0;
int *p = &PREFIX(0p+1);
return p[-1];
diff --git a/clang/test/Lexer/char-escapes-delimited.c b/clang/test/Lexer/char-escapes-delimited.c
index 62465db464bce..461122dcdb119 100644
--- a/clang/test/Lexer/char-escapes-delimited.c
+++ b/clang/test/Lexer/char-escapes-delimited.c
@@ -15,7 +15,7 @@ const char *errors =
"\o{8}" //expected-error {{invalid digit '8' in escape sequence}}
;
-void ucn() {
+void ucn(void) {
char a = '\u{1234}'; // expected-error {{character too large for enclosing character literal type}}
// expected-warning at -1 {{delimited escape sequences are a Clang extension}}
@@ -31,7 +31,7 @@ void ucn() {
unsigned d = U'\u{111111111}'; //expected-error {{hex escape sequence out of range}}
}
-void hex() {
+void hex(void) {
char a = '\x{1}'; // expected-warning {{extension}}
char b = '\x{abcdegggggabc}'; // expected-error 5{{invalid digit 'g' in escape sequence}}
char c = '\x{ff1}'; // expected-error {{hex escape sequence out of range}}
@@ -47,7 +47,7 @@ void hex() {
unsigned i = U'\x{100000000}'; // expected-error {{hex escape sequence out of range}}
}
-void octal() {
+void octal(void) {
char a = '\o{1}'; // expected-warning {{extension}}
char b = '\o{12345678881238}'; // expected-error 4{{invalid digit '8' in escape sequence}}
char c = '\o{777}'; // //expected-error {{octal escape sequence out of range}}
@@ -60,7 +60,7 @@ void octal() {
#endif
}
-void concat() {
+void concat(void) {
(void)"\x{" "12}"; // expected-error {{expected '}'}}
(void)"\u{" "12}"; // expected-error {{expected '}'}}
(void)"\o{" "12}"; // expected-error {{expected '}'}}
@@ -70,7 +70,7 @@ void concat() {
(void)"\o{12" "}"; // expected-error {{expected '}'}}
}
-void separators() {
+void separators(void) {
(void)"\x{12'3}"; // expected-error {{invalid digit ''' in escape sequence}}
(void)"\u{12'3}"; // expected-error {{invalid digit ''' in escape sequence}}
(void)"\o{12'3}"; // expected-error {{invalid digit ''' in escape sequence}}
diff --git a/clang/test/Lexer/conflict-marker.c b/clang/test/Lexer/conflict-marker.c
index 2611827d2ace0..36310187a9cac 100644
--- a/clang/test/Lexer/conflict-marker.c
+++ b/clang/test/Lexer/conflict-marker.c
@@ -32,7 +32,7 @@ int z = 2;
y b;
-int foo() {
+int foo(void) {
y a = x;
return x + a - z;
}
diff --git a/clang/test/Lexer/ms-extensions.c b/clang/test/Lexer/ms-extensions.c
index de7ef93e6b137..dc7c543f00f8d 100644
--- a/clang/test/Lexer/ms-extensions.c
+++ b/clang/test/Lexer/ms-extensions.c
@@ -23,14 +23,14 @@ __complex float c3 = 1.0if;
#define USHORT 0xffffui16
#define UCHAR 0xffui8
-void a() {
+void a(void) {
unsigned long long m = ULLONG_MAX;
unsigned int n = UINT;
unsigned short s = USHORT;
unsigned char c = UCHAR;
}
-void pr_7968()
+void pr_7968(void)
{
int var1 = 0x1111111e+1;
int var2 = 0X1111111e+1;
diff --git a/clang/test/Lexer/multiple-include.c b/clang/test/Lexer/multiple-include.c
index d737f95db271c..25bb22a6dc20e 100644
--- a/clang/test/Lexer/multiple-include.c
+++ b/clang/test/Lexer/multiple-include.c
@@ -11,7 +11,7 @@
#include "multiple-include.c"
#undef XVID_AUTO_INCLUDE
-typedef void ff();
+typedef void ff(void);
typedef struct { ff *a;} S;
S s = { H_Pass_8_C };
@@ -21,7 +21,7 @@ S s = { H_Pass_8_C };
#if defined(XVID_AUTO_INCLUDE) && defined(REFERENCE_CODE)
#elif defined(XVID_AUTO_INCLUDE) && !defined(REFERENCE_CODE)
-static void FUNC_H(){};
+static void FUNC_H(void){};
#undef FUNC_H
#endif
diff --git a/clang/test/Lexer/newline-eof.c b/clang/test/Lexer/newline-eof.c
index 340d9de8d36a8..f8471fefac7cd 100644
--- a/clang/test/Lexer/newline-eof.c
+++ b/clang/test/Lexer/newline-eof.c
@@ -9,7 +9,7 @@
// RUN: %clang_cc1 -fsyntax-only -x c++ -std=c++11 -Werror -pedantic %s
// Make sure the diagnostic shows up properly at the end of the last line.
-// CHECK: newline-eof.c:[[@LINE+3]]:63
+// CHECK: newline-eof.c:[[@LINE+3]]:67
// The following line isn't terminated, don't fix it.
-void foo() {} // expected-warning{{no newline at end of file}}
\ No newline at end of file
+void foo(void) {} // expected-warning{{no newline at end of file}}
\ No newline at end of file
diff --git a/clang/test/Lexer/numeric-literal-trash.c b/clang/test/Lexer/numeric-literal-trash.c
index 60981feee16ba..c3c6b7308504f 100644
--- a/clang/test/Lexer/numeric-literal-trash.c
+++ b/clang/test/Lexer/numeric-literal-trash.c
@@ -7,7 +7,7 @@
int ec(int, int);
- void x() {
+ void x(void) {
XRECORD (XRECORD (1, 1), 1);
}
diff --git a/clang/test/Lexer/objc_macros.m b/clang/test/Lexer/objc_macros.m
index 0223bed4e3b00..c286eb7e1f985 100644
--- a/clang/test/Lexer/objc_macros.m
+++ b/clang/test/Lexer/objc_macros.m
@@ -10,7 +10,7 @@
// No warning because this is the default expansion anyway.
// Check that this still expands to the right text.
-void test() {
+void test(void) {
goto label; // expected-error {{cannot jump from this goto statement to its label}}
__weak id x; // expected-note {{jump bypasses initialization of __weak variable}}
label:
diff --git a/clang/test/Lexer/pragma-region.c b/clang/test/Lexer/pragma-region.c
index 502db22715a80..ba7e10625b477 100644
--- a/clang/test/Lexer/pragma-region.c
+++ b/clang/test/Lexer/pragma-region.c
@@ -17,7 +17,7 @@
void foo(void){}
#pragma endregion long comment
-void inner();
+void inner(void);
__pragma(region) // no sense, but ignored
_Pragma("region")// ditto
diff --git a/clang/test/Lexer/string_concat.cpp b/clang/test/Lexer/string_concat.cpp
index a7eb396fe9f6b..916f1e340c464 100644
--- a/clang/test/Lexer/string_concat.cpp
+++ b/clang/test/Lexer/string_concat.cpp
@@ -7,7 +7,7 @@ typedef __CHAR16_TYPE__ char16_t;
typedef __CHAR32_TYPE__ char32_t;
#endif
-void f() {
+void f(void) {
const char* a = u8"abc" u"abc"; // expected-error {{unsupported non-standard concatenation of string literals}}
const char* b = u8"abc" U"abc"; // expected-error {{unsupported non-standard concatenation of string literals}}
diff --git a/clang/test/Lexer/unicode.c b/clang/test/Lexer/unicode.c
index 35665681d4908..f67b55415f960 100644
--- a/clang/test/Lexer/unicode.c
+++ b/clang/test/Lexer/unicode.c
@@ -55,7 +55,7 @@ extern int ð·ââ; // expected-warning {{declaration does not declare anythi
// A ð¹ by any other name....
extern int ð¹;
int ðµ(int ð») { return ð»+ 1; }
-int main () {
+int main (void) {
int ð· = ðµ(ð¹);
return ð·;
}
diff --git a/clang/test/Lexer/wchar.c b/clang/test/Lexer/wchar.c
index 4ecaee429f739..e6b3467473c7f 100644
--- a/clang/test/Lexer/wchar.c
+++ b/clang/test/Lexer/wchar.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -fwchar-type=short -fno-signed-wchar -verify %s
-void f() {
+void f(void) {
(void)L"\U00010000"; // unicode escape produces UTF-16 sequence, so no warning
(void)L'ab'; // expected-error {{wide character literals may not contain multiple characters}}
diff --git a/clang/test/Misc/Inputs/remapped-file-2 b/clang/test/Misc/Inputs/remapped-file-2
index 9ac034a3b9791..36b1375832cbf 100644
--- a/clang/test/Misc/Inputs/remapped-file-2
+++ b/clang/test/Misc/Inputs/remapped-file-2
@@ -1,3 +1,3 @@
#include "nonexistent.h"
-int *f() { return fp; }
+int *f(void) { return fp; }
diff --git a/clang/test/Misc/caret-diags-macros.c b/clang/test/Misc/caret-diags-macros.c
index 15eebb6d287e5..e60ed389e656c 100644
--- a/clang/test/Misc/caret-diags-macros.c
+++ b/clang/test/Misc/caret-diags-macros.c
@@ -2,7 +2,7 @@
#define M1(x) x
#define M2 1;
-void foo() {
+void foo(void) {
M1(
M2);
// CHECK: {{.*}}:7:{{[0-9]+}}: warning: expression result unused
@@ -13,7 +13,7 @@ void foo() {
#define A(x) x
#define B(x) A(x)
#define C(x) B(x)
-void bar() {
+void bar(void) {
C(1);
// CHECK: {{.*}}:17:5: warning: expression result unused
}
@@ -36,7 +36,7 @@ void baz(char *Msg) {
#define macro_many_args2(x, y, z) macro_many_args1(x, y, z)
#define macro_many_args3(x, y, z) macro_many_args2(x, y, z)
-void test() {
+void test(void) {
macro_args3(11);
// CHECK: {{.*}}:40:15: warning: expression result unused
// Also check that the 'caret' printing agrees with the location here where
@@ -83,7 +83,7 @@ void test() {
#define variadic_args2(x, ...) variadic_args1(x, __VA_ARGS__)
#define variadic_args3(x, y, ...) variadic_args2(x, y, __VA_ARGS__)
-void test2() {
+void test2(void) {
variadic_args3(1, 22, 3, 4);
// CHECK: {{.*}}:87:21: warning: expression result unused
// CHECK-NEXT: variadic_args3(1, 22, 3, 4);
@@ -99,7 +99,7 @@ void test2() {
#define variadic_pasting_args3(x, y, ...) variadic_pasting_args2(x, y, __VA_ARGS__)
#define variadic_pasting_args3a(x, y, ...) variadic_pasting_args2a(x, y, __VA_ARGS__)
-void test3() {
+void test3(void) {
variadic_pasting_args3(1, 2, 3, 4);
// CHECK: {{.*}}:103:32: warning: expression result unused
// CHECK: {{.*}}:99:72: note: expanded from macro 'variadic_pasting_args3'
diff --git a/clang/test/Misc/clear-ast-before-backend.c b/clang/test/Misc/clear-ast-before-backend.c
index ba564dc378c18..ead640854cc40 100644
--- a/clang/test/Misc/clear-ast-before-backend.c
+++ b/clang/test/Misc/clear-ast-before-backend.c
@@ -11,4 +11,4 @@
// STATS: 1 Function decls
// STATS: Total bytes =
-void f() {}
+void f(void) {}
diff --git a/clang/test/Misc/diag-macro-backtrace2.c b/clang/test/Misc/diag-macro-backtrace2.c
index b90dfa16900f2..5faed145e49f8 100644
--- a/clang/test/Misc/diag-macro-backtrace2.c
+++ b/clang/test/Misc/diag-macro-backtrace2.c
@@ -10,7 +10,7 @@
#define g(x) h(x)
#define h(x) x
-void PR16799() {
+void PR16799(void) {
const char str[] = "string";
a(str);
// CHECK: :15:3: error: invalid operands to binary expression
diff --git a/clang/test/Misc/loop-opt-setup.c b/clang/test/Misc/loop-opt-setup.c
index 63a6972b82a08..2ef9f25fb0dd5 100644
--- a/clang/test/Misc/loop-opt-setup.c
+++ b/clang/test/Misc/loop-opt-setup.c
@@ -14,7 +14,7 @@ int foo(void) {
// CHECK-LABEL: foo
// CHECK-NOT: br i1
-void Helper() {
+void Helper(void) {
const int *nodes[5];
int num_active = 5;
diff --git a/clang/test/Misc/printer.c b/clang/test/Misc/printer.c
index 339dda4b4e566..06fff0de1e7fb 100644
--- a/clang/test/Misc/printer.c
+++ b/clang/test/Misc/printer.c
@@ -2,4 +2,4 @@
// RUN: %clang_cc1 -emit-llvm -fexperimental-new-pass-manager -mllvm -print-after-all %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-AFTER
// CHECK-BEFORE: *** IR Dump Before AlwaysInlinerPass
// CHECK-AFTER: *** IR Dump After AlwaysInlinerPass
-void foo() {}
+void foo(void) {}
diff --git a/clang/test/Misc/remap-file.c b/clang/test/Misc/remap-file.c
index 003cd2e469fdc..a2a56d9f18b4b 100644
--- a/clang/test/Misc/remap-file.c
+++ b/clang/test/Misc/remap-file.c
@@ -4,5 +4,5 @@
// CHECK-EXIST: remap-file.c:1:28: warning: incompatible pointer types
// CHECK-NONEXIST: nonexistent.c:1:28: warning: incompatible pointer types
-// CHECK-HEADER: nonexistent.c:3:19: warning: incompatible pointer types
+// CHECK-HEADER: nonexistent.c:3:23: warning: incompatible pointer types
int
diff --git a/clang/test/Misc/serialized-diags-driver.c b/clang/test/Misc/serialized-diags-driver.c
index 9b580317f3cf8..cadf0d864f28c 100644
--- a/clang/test/Misc/serialized-diags-driver.c
+++ b/clang/test/Misc/serialized-diags-driver.c
@@ -15,7 +15,7 @@
// CHECK: note: initialize the variable 'voodoo' to silence this warning []
// CHECK: Number of diagnostics: 2
-void foo() {
+void foo(void) {
int voodoo;
voodoo = voodoo + 1;
}
diff --git a/clang/test/Misc/serialized-diags-no-issue.c b/clang/test/Misc/serialized-diags-no-issue.c
index 5c7da8267db9d..675d33c1fe99c 100644
--- a/clang/test/Misc/serialized-diags-no-issue.c
+++ b/clang/test/Misc/serialized-diags-no-issue.c
@@ -1,4 +1,4 @@
-void foo();
+void foo(void);
// RUN: %clang -Wall -fsyntax-only %s --serialize-diagnostics %t
// RUN: c-index-test -read-diagnostics %t 2>&1 | FileCheck %s
diff --git a/clang/test/Misc/serialized-diags-single-issue.c b/clang/test/Misc/serialized-diags-single-issue.c
index 938dda3f0de77..2d18aabda74d9 100644
--- a/clang/test/Misc/serialized-diags-single-issue.c
+++ b/clang/test/Misc/serialized-diags-single-issue.c
@@ -1,4 +1,4 @@
-void foo() {
+void foo(void) {
int voodoo;
voodoo = voodoo + 1;
}
diff --git a/clang/test/Misc/serialized-diags-stable.c b/clang/test/Misc/serialized-diags-stable.c
index e05e3f01b6a5f..e8ee83ec7499d 100644
--- a/clang/test/Misc/serialized-diags-stable.c
+++ b/clang/test/Misc/serialized-diags-stable.c
@@ -4,7 +4,7 @@
// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s
-int foo() {
+int foo(void) {
// CHECK: serialized-diags-stable.c:[[@LINE+2]]:1: warning: non-void function does not return a value [-Wreturn-type] [Semantic Issue]
// CHECK-NEXT: Number FIXITs = 0
}
@@ -13,7 +13,7 @@ int foo() {
// CHECK-NEXT: Number FIXITs = 0
// CHECK-NEXT: +-{{.*}}serialized-diags-stable.c:[[@LINE+2]]:6: note: previous definition is here [] []
// CHECK-NEXT: Number FIXITs = 0
-void bar() {}
+void bar(void) {}
typedef int bar;
diff --git a/clang/test/Misc/serialized-diags.c b/clang/test/Misc/serialized-diags.c
index 2f4b86fb42f95..5d21ba30b6c66 100644
--- a/clang/test/Misc/serialized-diags.c
+++ b/clang/test/Misc/serialized-diags.c
@@ -1,15 +1,15 @@
-void foo() {
+void foo(void) {
int voodoo;
voodoo = voodoo + 1;
}
-void bar() {
+void bar(void) {
int dragon;
dragon = dragon + 1
}
// Test handling of FixIts that only remove text.
-int baz();
+int baz(void);
void qux(int x) {
if ((x == baz()))
return;
@@ -18,7 +18,7 @@ void qux(int x) {
// Test handling of macros.
void taz(int x, int y);
#define false 0
-void testMacro() {
+void testMacro(void) {
taz(0, 0, false);
}
@@ -26,7 +26,7 @@ void testMacro() {
#include "serialized-diags.h"
// Test handling of warnings that have empty fixits.
-void rdar11040133() {
+void rdar11040133(void) {
unsigned x;
}
diff --git a/clang/test/Misc/wrong-encoding.c b/clang/test/Misc/wrong-encoding.c
index c48402d2a132a..9a303ec7e7e9e 100644
--- a/clang/test/Misc/wrong-encoding.c
+++ b/clang/test/Misc/wrong-encoding.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value %s 2>&1 | FileCheck -strict-whitespace %s
// REQUIRES: asserts
-void foo() {
+void foo(void) {
"§Ã"; // ø
// CHECK: {{^ "<A7><C3>"; // <F8>}}
diff --git a/clang/test/Misc/wrong-encoding2.c b/clang/test/Misc/wrong-encoding2.c
index b60ed7f92b861..92bcb59181de3 100644
--- a/clang/test/Misc/wrong-encoding2.c
+++ b/clang/test/Misc/wrong-encoding2.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -fmessage-length=100 %s 2>&1 | FileCheck -strict-whitespace %s
// REQUIRES: asserts
-int main() {
+int main(void) {
"É#x#p)6Ò)ѽ$û>U êhÑüÃö| থϻgY|`?ò;;Æ¿VjÇ\\ùûݪW9úТ:ÌO EøÛy?SKªy¦¹Øài&n";
}
More information about the cfe-commits
mailing list