Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libcxx/test/std/localization/codecvt_unicode.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2222,10 +2222,11 @@ void test_utf16_ucs2_codecvts() {
#endif
}

int main() {
int main(int, char**) {
test_utf8_utf32_codecvts();
test_utf8_utf16_codecvts();
test_utf8_ucs2_codecvts();
test_utf16_utf32_codecvts();
test_utf16_ucs2_codecvts();
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ constexpr bool test() {
return true;
}

int main() {
int main(int, char**) {
test();
static_assert(test());
return 0;
}
2 changes: 1 addition & 1 deletion libcxx/utils/libcxx/test/dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def hasAnyLocale(config, locales):
+ name_string_literals
+ """, nullptr,
};
int main() {
int main(int, char**) {
for (size_t i = 0; test_locale_names[i]; i++) {
if (::setlocale(LC_ALL, test_locale_names[i]) != NULL) {
return 0;
Expand Down
8 changes: 4 additions & 4 deletions libcxx/utils/libcxx/test/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _getAndroidDeviceApi(cfg):
r"""
#include <android/api-level.h>
#include <stdio.h>
int main() {
int main(int, char**) {
printf("%d\n", android_get_device_api_level());
return 0;
}
Expand Down Expand Up @@ -66,7 +66,7 @@ def _mingwSupportsModules(cfg):
#else
// __MINGW64_VERSION_MAJOR > 12 should be ok.
#endif
int main() { return 0; }
int main(int, char**) { return 0; }
""",
)

Expand Down Expand Up @@ -474,7 +474,7 @@ def _getLocaleFlagsAction(cfg, locale, alts, members):
#include <wchar.h>

// Print each requested locale conversion member on separate lines.
int main() {
int main(int, char**) {
const char* locales[] = { %s };
for (int loc_i = 0; loc_i < %d; ++loc_i) {
if (!setlocale(LC_ALL, locales[loc_i])) {
Expand Down Expand Up @@ -629,7 +629,7 @@ def _getLocaleFlagsAction(cfg, locale, alts, members):
"""
#include <stdio.h>
#include <windows.h>
int main() {
int main(int, char**) {
CHAR tempDirPath[MAX_PATH];
DWORD tempPathRet = GetTempPathA(MAX_PATH, tempDirPath);
if (tempPathRet == 0 || tempPathRet > MAX_PATH) {
Expand Down
6 changes: 2 additions & 4 deletions libcxxabi/test/forced_unwind4.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

// Android/Bionic does not support pthread_cancel.
#ifdef __BIONIC__
int main() {
return 0;
}
int main(int, char**) { return 0; }
#else

#include <chrono>
Expand All @@ -45,7 +43,7 @@ static void* test(void* arg) {
return (void*)1;
}

int main() {
int main(int, char**) {
pthread_t child_thread;
std::unique_lock<std::mutex> lk(cv_m);
pthread_create(&child_thread, 0, test, (void*)0);
Expand Down
2 changes: 1 addition & 1 deletion libcxxabi/test/native/AArch64/ra_sign_state.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void bazz() {
}
}

int main() {
int main(int, char**) {
try {
bazz();
} catch (int i) {
Expand Down
5 changes: 4 additions & 1 deletion libunwind/test/aarch64_vg_unwind.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ __attribute__((noinline)) void foo() {
// smstop sm
}

int main() { foo(); }
int main(int, char **) {
foo();
return 0;
}
3 changes: 2 additions & 1 deletion libunwind/test/aix_signal_unwind.pass.sh.S
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ extern "C" __attribute__((noinline)) void foo() {
bar();
}

int main() {
int main(int, char**) {
// Set signal handler for SIGSEGV.
signal(SIGSEGV, handler);
foo();
return 0;
}

#else // Assembly code for abc().
Expand Down
5 changes: 4 additions & 1 deletion libunwind/test/bad_unwind_info.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,7 @@ extern "C" void stepper() {
assert(unw_step(&cursor) <= 0);
}

int main() { bad_unwind_info(); }
int main(int, char **) {
bad_unwind_info();
return 0;
}
4 changes: 2 additions & 2 deletions libunwind/test/eh_frame_fde_pc_range.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// RUN: %{build}
// RUN: %{objcopy} --dump-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
// RUN: echo -ne '\xFF' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none
// RUN: echo -ne '\xFF' | dd of=%t_ehf_hdr.bin bs=1 seek=2 count=2 conv=notrunc status=none
// RUN: %{objcopy} --update-section .eh_frame_hdr=%t_ehf_hdr.bin %t.exe
// RUN: %{exec} %t.exe

Expand Down Expand Up @@ -53,7 +53,7 @@ void f() {
assert(fde_fpc == fde_fpc1);
}

int main() {
int main(int, char **) {
f();
return 0;
}
2 changes: 1 addition & 1 deletion libunwind/test/floatregister.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ __attribute__((noinline)) void foo() {
_Unwind_Backtrace(frame_handler, NULL);
}

__attribute__((section("main_func"))) int main() {
__attribute__((section("main_func"))) int main(int, char **) {
foo();
return -2;
}
2 changes: 1 addition & 1 deletion libunwind/test/forceunwind.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ __attribute__((noinline)) void foo() {
_Unwind_ForcedUnwind(e, stop, (void *)&foo);
}

__attribute__((section("main_func"))) int main() {
__attribute__((section("main_func"))) int main(int, char **) {
foo();
return -2;
}
2 changes: 1 addition & 1 deletion libunwind/test/unw_resume.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __attribute__((noinline)) void test_unw_resume() {
unw_resume(&cursor);
}

int main() {
int main(int, char **) {
test_unw_resume();
return 0;
}
7 changes: 5 additions & 2 deletions libunwind/test/unwind_scalable_vectors.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ __attribute__((noinline)) static void foo() {
asm volatile("" ::"vr"(v)); // Dummy inline asm to use v.
}

int main() { foo(); }
int main(int, char **) {
foo();
return 0;
}
#else
int main() { return 0; }
int main(int, char **) { return 0; }
#endif
Loading