mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 21:46:06 +00:00
[libc++] Fix signature of main() in tests
Otherwise, this breaks freestanding builds, where `main()` isn't mangled specially and we need to assume that we have a `int main(int, char**)` entry point in each test for things to work.
This commit is contained in:
parent
dda8b1ceda
commit
c72f22bf16
@ -74,7 +74,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
|
||||
// gcc cannot have mutable member in constant expression
|
||||
|
@ -73,7 +73,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
|
||||
// gcc cannot have mutable member in constant expression
|
||||
|
@ -66,7 +66,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
|
||||
// gcc cannot have mutable member in constant expression
|
||||
|
@ -69,7 +69,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
// gcc cannot have mutable member in constant expression
|
||||
#if !defined(TEST_COMPILER_GCC)
|
||||
|
@ -78,7 +78,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
|
||||
// gcc cannot have mutable member in constant expression
|
||||
|
@ -78,7 +78,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
|
||||
// gcc cannot have mutable member in constant expression
|
||||
|
@ -106,7 +106,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
static_assert(test());
|
||||
|
||||
|
@ -103,7 +103,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
static_assert(test());
|
||||
|
||||
|
@ -85,7 +85,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
static_assert(test());
|
||||
|
||||
|
@ -84,7 +84,7 @@ constexpr bool test() {
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int, char**) {
|
||||
test();
|
||||
static_assert(test());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user