Skip to content

Commit

Permalink
[libc] fix -Wextra-semi (llvm#123783)
Browse files Browse the repository at this point in the history
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: llvm#119281
  • Loading branch information
nickdesaulniers authored Jan 21, 2025
1 parent c95d789 commit e2d9e99
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libc/cmake/modules/LLVMLibCTestRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/nan_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/nanf128_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/nanf16_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/nanf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/nanl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e2d9e99

Please sign in to comment.