Skip to content

Commit 7bfffab

Browse files
committed
foo
1 parent e258558 commit 7bfffab

File tree

6 files changed

+51
-41
lines changed

6 files changed

+51
-41
lines changed

libcxx/include/__config

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,9 @@ typedef __char32_t char32_t;
10211021
// the latter depends on internal GNU libc details that are not appropriate
10221022
// to depend on here, so any declarations present when __cpp_char8_t is not
10231023
// defined are ignored.
1024-
# if defined(_LIBCPP_GLIBC_PREREQ)
1024+
# if defined(__clang__)
1025+
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
1026+
# elif defined(_LIBCPP_GLIBC_PREREQ)
10251027
# if _LIBCPP_GLIBC_PREREQ(2, 36) && defined(__cpp_char8_t)
10261028
# define _LIBCPP_HAS_C8RTOMB_MBRTOC8 1
10271029
# else

libcxx/test/std/depr/depr.c.headers/uchar_h.compile.pass.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
// __STDC_UTF_16__ may or may not be defined by the C standard library
2424
// __STDC_UTF_32__ may or may not be defined by the C standard library
2525

26-
#if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8)
27-
ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
28-
ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
29-
#endif
30-
3126
ASSERT_SAME_TYPE(size_t, decltype(mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
3227
ASSERT_SAME_TYPE(size_t, decltype(c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0)));
3328

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// UNSUPPORTED: c++03
10+
11+
// The following platforms do not provide mbrtoc8 and c8rtomb so the tests fail
12+
// XFAIL: target={{.+}}-aix{{.*}}
13+
// XFAIL: android
14+
// XFAIL: darwin
15+
// XFAIL: freebsd
16+
// XFAIL: windows
17+
// XFAIL: LIBCXX-PICOLIBC-FIXME
18+
19+
// <uchar.h>
20+
21+
#include <uchar.h>
22+
23+
ASSERT_SAME_TYPE(size_t, decltype(mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
24+
ASSERT_SAME_TYPE(size_t, decltype(c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));

libcxx/test/std/strings/c.strings/cuchar.compile.pass.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
// __STDC_UTF_16__ may or may not be defined by the C standard library
2424
// __STDC_UTF_32__ may or may not be defined by the C standard library
2525

26-
#if !defined(TEST_HAS_NO_C8RTOMB_MBRTOC8)
27-
ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
28-
ASSERT_SAME_TYPE(std::size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));
29-
#endif
30-
3126
ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc16((char16_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
3227
ASSERT_SAME_TYPE(std::size_t, decltype(std::c16rtomb((char*)0, (char16_t)0, (mbstate_t*)0)));
3328

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// UNSUPPORTED: c++03
10+
11+
// The following platforms do not provide mbrtoc8 and c8rtomb so the tests fail
12+
// XFAIL: target={{.+}}-aix{{.*}}
13+
// XFAIL: android
14+
// XFAIL: darwin
15+
// XFAIL: freebsd
16+
// XFAIL: windows
17+
// XFAIL: LIBCXX-PICOLIBC-FIXME
18+
19+
// <cuchar>
20+
21+
#include <cuchar>
22+
23+
ASSERT_SAME_TYPE(std::size_t, decltype(std::mbrtoc8((char8_t*)0, (const char*)0, (size_t)0, (mbstate_t*)0)));
24+
ASSERT_SAME_TYPE(std::size_t, decltype(std::c8rtomb((char*)0, (char8_t)0, (mbstate_t*)0)));

libcxx/test/std/strings/c.strings/no_c8rtomb_mbrtoc8.verify.cpp

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)