Revert "[libc] Add missing casts in StrtolTest" - #133645
Conversation
This reverts commit 1a781e9.
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-libc Author: None (Karinza3) ChangesReverts llvm/llvm-project#119054 Full diff: https://github.com/llvm/llvm-project/pull/133645.diff 1 Files Affected:
diff --git a/libc/test/src/stdlib/StrtolTest.h b/libc/test/src/stdlib/StrtolTest.h
index ed302f14d03ef..6cfaddcbedeb6 100644
--- a/libc/test/src/stdlib/StrtolTest.h
+++ b/libc/test/src/stdlib/StrtolTest.h
@@ -200,8 +200,8 @@ struct StrtoTest : public LIBC_NAMESPACE::testing::Test {
char small_string[4] = {'\0', '\0', '\0', '\0'};
for (int base = 2; base <= 36; ++base) {
for (int first_digit = 0; first_digit <= 36; ++first_digit) {
- small_string[0] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(first_digit));
+ small_string[0] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(first_digit);
if (first_digit < base) {
LIBC_NAMESPACE::libc_errno = 0;
ASSERT_EQ(func(small_string, nullptr, base),
@@ -217,11 +217,11 @@ struct StrtoTest : public LIBC_NAMESPACE::testing::Test {
for (int base = 2; base <= 36; ++base) {
for (int first_digit = 0; first_digit <= 36; ++first_digit) {
- small_string[0] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(first_digit));
+ small_string[0] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(first_digit);
for (int second_digit = 0; second_digit <= 36; ++second_digit) {
- small_string[1] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(second_digit));
+ small_string[1] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(second_digit);
if (first_digit < base && second_digit < base) {
LIBC_NAMESPACE::libc_errno = 0;
ASSERT_EQ(
@@ -244,14 +244,14 @@ struct StrtoTest : public LIBC_NAMESPACE::testing::Test {
for (int base = 2; base <= 36; ++base) {
for (int first_digit = 0; first_digit <= 36; ++first_digit) {
- small_string[0] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(first_digit));
+ small_string[0] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(first_digit);
for (int second_digit = 0; second_digit <= 36; ++second_digit) {
- small_string[1] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(second_digit));
+ small_string[1] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(second_digit);
for (int third_digit = 0; third_digit <= limit; ++third_digit) {
- small_string[2] = static_cast<char>(
- LIBC_NAMESPACE::internal::int_to_b36_char(third_digit));
+ small_string[2] =
+ LIBC_NAMESPACE::internal::int_to_b36_char(third_digit);
if (first_digit < base && second_digit < base &&
third_digit < base) {
|
|
Why is this needed? |
|
Hi! There's been no response since March 30th, and this would be a long time for a revert! I'm closing this PR for now. Please re-open if this is the wrong thing to do! |
Reverts #119054