Skip to content

Commit e2d9e99

Browse files
[libc] fix -Wextra-semi (#123783)
Found while trying to consolidate our command line flags between tests and underlying object files. error: extra ';' after member function definition [-Werror,-Wextra-semi] Link: #119281
1 parent c95d789 commit e2d9e99

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function(_get_common_test_compile_options output_var c_test flags)
3535
# list(APPEND compile_options "-Wno-sign-conversion")
3636
# list(APPEND compile_options "-Wimplicit-fallthrough")
3737
# list(APPEND compile_options "-Wwrite-strings")
38-
# list(APPEND compile_options "-Wextra-semi")
38+
list(APPEND compile_options "-Wextra-semi")
3939
# Silence this warning because _Complex is a part of C99.
4040
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
4141
if(NOT c_test)

libc/test/src/math/smoke/nan_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LlvmLibcNanTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
2323
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<double>(result);
2424
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<double>(bits);
2525
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
26-
};
26+
}
2727
};
2828

2929
TEST_F(LlvmLibcNanTest, NCharSeq) {

libc/test/src/math/smoke/nanf128_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LlvmLibcNanf128Test : public LIBC_NAMESPACE::testing::FEnvSafeTest {
2828
auto actual_fp = FPBits128(result);
2929
auto expected_fp = FPBits128(bits);
3030
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
31-
};
31+
}
3232
};
3333

3434
TEST_F(LlvmLibcNanf128Test, NCharSeq) {

libc/test/src/math/smoke/nanf16_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LlvmLibcNanf16Test : public LIBC_NAMESPACE::testing::FEnvSafeTest {
2323
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<float16>(result);
2424
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<float16>(bits);
2525
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
26-
};
26+
}
2727
};
2828

2929
TEST_F(LlvmLibcNanf16Test, NCharSeq) {

libc/test/src/math/smoke/nanf_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class LlvmLibcNanfTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
2323
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<float>(result);
2424
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<float>(bits);
2525
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
26-
};
26+
}
2727
};
2828

2929
TEST_F(LlvmLibcNanfTest, NCharSeq) {

libc/test/src/math/smoke/nanl_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class LlvmLibcNanlTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
3333
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<long double>(result);
3434
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<long double>(bits);
3535
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
36-
};
36+
}
3737
};
3838

3939
TEST_F(LlvmLibcNanlTest, NCharSeq) {

0 commit comments

Comments
 (0)