Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / strings / c.strings / no_c8rtomb_mbrtoc8.verify.cpp
blobbc058d400f7496fb8d6d61a393cea57c5b6ef620
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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03
11 #include <uchar.h>
13 #include "test_macros.h"
15 // When C++ char8_t support is not enabled, definitions of these functions that
16 // match the C2X declarations may still be present in the global namespace with
17 // a char8_t typedef substituted for the C++ char8_t type. If so, these are not
18 // the declarations we are looking for, so don't test for them.
19 #if !defined(TEST_HAS_NO_CHAR8_T)
20 using U = decltype(::c8rtomb);
21 using V = decltype(::mbrtoc8);
22 # if defined(_LIBCPP_HAS_NO_C8RTOMB_MBRTOC8)
23 // expected-error@-3 {{no member named 'c8rtomb' in the global namespace}}
24 // expected-error@-3 {{no member named 'mbrtoc8' in the global namespace}}
25 # else
26 // expected-no-diagnostics
27 # endif
28 #else
29 // expected-no-diagnostics
30 #endif