[libc-commits] [libc] [libc] fix -Wextra-semi (PR #123783)
via libc-commits
libc-commits at lists.llvm.org
Tue Jan 21 09:18:58 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Nick Desaulniers (nickdesaulniers)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/123783.diff
6 Files Affected:
- (modified) libc/cmake/modules/LLVMLibCTestRules.cmake (+1-1)
- (modified) libc/test/src/math/smoke/nan_test.cpp (+1-1)
- (modified) libc/test/src/math/smoke/nanf128_test.cpp (+1-1)
- (modified) libc/test/src/math/smoke/nanf16_test.cpp (+1-1)
- (modified) libc/test/src/math/smoke/nanf_test.cpp (+1-1)
- (modified) libc/test/src/math/smoke/nanl_test.cpp (+1-1)
``````````diff
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 4dbe5e046cc686..96fa6c3a707e47 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -35,7 +35,7 @@ function(_get_common_test_compile_options output_var c_test flags)
# list(APPEND compile_options "-Wno-sign-conversion")
# list(APPEND compile_options "-Wimplicit-fallthrough")
# list(APPEND compile_options "-Wwrite-strings")
- # list(APPEND compile_options "-Wextra-semi")
+ list(APPEND compile_options "-Wextra-semi")
# Silence this warning because _Complex is a part of C99.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT c_test)
diff --git a/libc/test/src/math/smoke/nan_test.cpp b/libc/test/src/math/smoke/nan_test.cpp
index 46b9e9aa9563ab..da6beb94c7f05d 100644
--- a/libc/test/src/math/smoke/nan_test.cpp
+++ b/libc/test/src/math/smoke/nan_test.cpp
@@ -23,7 +23,7 @@ class LlvmLibcNanTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<double>(result);
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<double>(bits);
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
- };
+ }
};
TEST_F(LlvmLibcNanTest, NCharSeq) {
diff --git a/libc/test/src/math/smoke/nanf128_test.cpp b/libc/test/src/math/smoke/nanf128_test.cpp
index 25dd2ef1d5b1ca..dd1986f17b9785 100644
--- a/libc/test/src/math/smoke/nanf128_test.cpp
+++ b/libc/test/src/math/smoke/nanf128_test.cpp
@@ -28,7 +28,7 @@ class LlvmLibcNanf128Test : public LIBC_NAMESPACE::testing::FEnvSafeTest {
auto actual_fp = FPBits128(result);
auto expected_fp = FPBits128(bits);
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
- };
+ }
};
TEST_F(LlvmLibcNanf128Test, NCharSeq) {
diff --git a/libc/test/src/math/smoke/nanf16_test.cpp b/libc/test/src/math/smoke/nanf16_test.cpp
index ec640a3b9eef92..5fafb1a36e4cdc 100644
--- a/libc/test/src/math/smoke/nanf16_test.cpp
+++ b/libc/test/src/math/smoke/nanf16_test.cpp
@@ -23,7 +23,7 @@ class LlvmLibcNanf16Test : public LIBC_NAMESPACE::testing::FEnvSafeTest {
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<float16>(result);
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<float16>(bits);
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
- };
+ }
};
TEST_F(LlvmLibcNanf16Test, NCharSeq) {
diff --git a/libc/test/src/math/smoke/nanf_test.cpp b/libc/test/src/math/smoke/nanf_test.cpp
index dd3124ee9c5112..19d94b40b5ffbd 100644
--- a/libc/test/src/math/smoke/nanf_test.cpp
+++ b/libc/test/src/math/smoke/nanf_test.cpp
@@ -23,7 +23,7 @@ class LlvmLibcNanfTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<float>(result);
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<float>(bits);
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
- };
+ }
};
TEST_F(LlvmLibcNanfTest, NCharSeq) {
diff --git a/libc/test/src/math/smoke/nanl_test.cpp b/libc/test/src/math/smoke/nanl_test.cpp
index ef3f9c15dafd9f..c7217928e943b0 100644
--- a/libc/test/src/math/smoke/nanl_test.cpp
+++ b/libc/test/src/math/smoke/nanl_test.cpp
@@ -33,7 +33,7 @@ class LlvmLibcNanlTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
auto actual_fp = LIBC_NAMESPACE::fputil::FPBits<long double>(result);
auto expected_fp = LIBC_NAMESPACE::fputil::FPBits<long double>(bits);
EXPECT_EQ(actual_fp.uintval(), expected_fp.uintval());
- };
+ }
};
TEST_F(LlvmLibcNanlTest, NCharSeq) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/123783
More information about the libc-commits
mailing list