[libc-commits] [libc] [libc] add iswblank entrypoint (PR #185272)

via libc-commits libc-commits at lists.llvm.org
Mon Mar 9 10:19:53 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libc/src/wctype/iswblank.cpp libc/src/wctype/iswblank.h libc/test/src/wctype/iswblank_test.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/src/wctype/iswblank.cpp b/libc/src/wctype/iswblank.cpp
index 2c42218e5..f1f35743e 100644
--- a/libc/src/wctype/iswblank.cpp
+++ b/libc/src/wctype/iswblank.cpp
@@ -1,21 +1,21 @@
-//===-- Implementation of iswblank ----------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/wctype/iswblank.h"
-#include "src/__support/common.h"
-#include "src/__support/wctype_utils.h"
-
-#include "hdr/types/wint_t.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(int, iswblank, (wint_t c)) {
-  return internal::isblank(static_cast<wchar_t>(c));
-}
-
-} // namespace LIBC_NAMESPACE_DECL
+//===-- Implementation of iswblank ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/wctype/iswblank.h"
+#include "src/__support/common.h"
+#include "src/__support/wctype_utils.h"
+
+#include "hdr/types/wint_t.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, iswblank, (wint_t c)) {
+  return internal::isblank(static_cast<wchar_t>(c));
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/wctype/iswblank.h b/libc/src/wctype/iswblank.h
index 78e7573f5..031568650 100644
--- a/libc/src/wctype/iswblank.h
+++ b/libc/src/wctype/iswblank.h
@@ -1,21 +1,21 @@
-//===-- Implementation header for iswblank ----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
-#define LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
-
-#include "hdr/types/wint_t.h"
-#include "src/__support/common.h"
-
-namespace LIBC_NAMESPACE_DECL {
-
-int iswblank(wint_t c);
-
-} // namespace LIBC_NAMESPACE_DECL
-
-#endif // LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
+//===-- Implementation header for iswblank ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
+#define LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
+
+#include "hdr/types/wint_t.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int iswblank(wint_t c);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_WCTYPE_ISWBLANK_H
diff --git a/libc/test/src/wctype/iswblank_test.cpp b/libc/test/src/wctype/iswblank_test.cpp
index 137f8c218..6a1814227 100644
--- a/libc/test/src/wctype/iswblank_test.cpp
+++ b/libc/test/src/wctype/iswblank_test.cpp
@@ -1,24 +1,24 @@
-//===-- Unittests for iswblank --------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "src/__support/CPP/span.h"
-#include "src/wctype/iswblank.h"
-
-#include "test/UnitTest/Test.h"
-
-TEST(LlvmLibciswblank, SimpleTest) {
-  EXPECT_NE(LIBC_NAMESPACE::iswblank(' '), 0);
-  EXPECT_NE(LIBC_NAMESPACE::iswblank('\t'), 0);
-
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank('a'), 0);
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank('\n'), 0);
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank('3'), 0);
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank('?'), 0);
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank('\0'), 0);
-  EXPECT_EQ(LIBC_NAMESPACE::iswblank(-1), 0);
-}
+//===-- Unittests for iswblank --------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/__support/CPP/span.h"
+#include "src/wctype/iswblank.h"
+
+#include "test/UnitTest/Test.h"
+
+TEST(LlvmLibciswblank, SimpleTest) {
+  EXPECT_NE(LIBC_NAMESPACE::iswblank(' '), 0);
+  EXPECT_NE(LIBC_NAMESPACE::iswblank('\t'), 0);
+
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank('a'), 0);
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank('\n'), 0);
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank('3'), 0);
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank('?'), 0);
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank('\0'), 0);
+  EXPECT_EQ(LIBC_NAMESPACE::iswblank(-1), 0);
+}

``````````

</details>


https://github.com/llvm/llvm-project/pull/185272


More information about the libc-commits mailing list