Skip to content

Conversation

@jinhuang1102
Copy link
Contributor

@jinhuang1102 jinhuang1102 commented Aug 12, 2025

The PR is going to improve the readability for the files under llvm-project/libc/src/wchar directory.

@llvmbot llvmbot added the libc label Aug 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 12, 2025

@llvm/pr-subscribers-libc

Author: Jin Huang (jinhuang1102)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/153308.diff

1 Files Affected:

  • (modified) libc/src/wchar/wcsncmp.cpp (+2-2)
diff --git a/libc/src/wchar/wcsncmp.cpp b/libc/src/wchar/wcsncmp.cpp
index f2e052b3c9fe3..2b05552782bb6 100644
--- a/libc/src/wchar/wcsncmp.cpp
+++ b/libc/src/wchar/wcsncmp.cpp
@@ -30,8 +30,8 @@ LLVM_LIBC_FUNCTION(int, wcsncmp,
     if (!comp(lc, '\0') || comp(lc, *right))
       break;
   }
-  return comp(*reinterpret_cast<const wchar_t *>(left),
-              *reinterpret_cast<const wchar_t *>(right));
+  return comp(*left,
+              *right);
 }
 
 } // namespace LIBC_NAMESPACE_DECL

@github-actions
Copy link

github-actions bot commented Aug 12, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@kazutakahirata kazutakahirata merged commit 91de0a2 into llvm:main Aug 13, 2025
19 checks passed
@michaelrj-google
Copy link
Contributor

Thanks for this cleanup, in future please request review from one of the libc maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants