31 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++0310 11#include <uchar.h>12 13#include "test_macros.h"14 15// When C++ char8_t support is not enabled, definitions of these functions that16// match the C2X declarations may still be present in the global namespace with17// a char8_t typedef substituted for the C++ char8_t type. If so, these are not18// the declarations we are looking for, so don't test for them.19#if !defined(TEST_HAS_NO_CHAR8_T)20using U = decltype(::c8rtomb);21using V = decltype(::mbrtoc8);22# if !_LIBCPP_HAS_C8RTOMB_MBRTOC823// expected-error@-3 {{no member named 'c8rtomb' in the global namespace}}24// expected-error@-3 {{no member named 'mbrtoc8' in the global namespace}}25# else26// expected-no-diagnostics27# endif28#else29// expected-no-diagnostics30#endif31