Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,8 @@ typedef __char32_t char32_t;
# else
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
# endif
# elif defined(__clang__)
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
# else
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 0
# endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
// __STDC_UTF_16__ may or may not be defined by the C standard library
// __STDC_UTF_32__ may or may not be defined by the C standard library

#if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8)
ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
#endif

ASSERT_SAME_TYPE(size_t, decltype(mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0)));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++03

// The following platforms do not provide mbrtoc8 and c8rtomb so the tests fail
// XFAIL: target={{.+}}-aix{{.*}}
// XFAIL: android
// XFAIL: darwin
// XFAIL: freebsd
// XFAIL: windows
// XFAIL: LIBCXX-PICOLIBC-FIXME

// <uchar.h>

#include <uchar.h>

ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
5 changes: 0 additions & 5 deletions libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
// __STDC_UTF_16__ may or may not be defined by the C standard library
// __STDC_UTF_32__ may or may not be defined by the C standard library

#if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8)
ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(std::size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
#endif

ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(std::size_t, decltype(std::c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0)));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//===----------------------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++03

// The following platforms do not provide mbrtoc8 and c8rtomb so the tests fail
// XFAIL: target={{.+}}-aix{{.*}}
// XFAIL: android
// XFAIL: darwin
// XFAIL: freebsd
// XFAIL: windows
// XFAIL: LIBCXX-PICOLIBC-FIXME

// <cuchar>

#include <cuchar>

ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
ASSERT_SAME_TYPE(std::size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
30 changes: 0 additions & 30 deletions libcxx/test/std/strings/c.strings/no_c8rtomb_mbrtoc8.verify.cpp

This file was deleted.

Loading