diff options
Diffstat (limited to 'libcxx/test/std/strings/c.strings/cwchar_include_order2.compile.verify.cpp')
-rw-r--r-- | libcxx/test/std/strings/c.strings/cwchar_include_order2.compile.verify.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libcxx/test/std/strings/c.strings/cwchar_include_order2.compile.verify.cpp b/libcxx/test/std/strings/c.strings/cwchar_include_order2.compile.verify.cpp new file mode 100644 index 000000000000..0222ac018d68 --- /dev/null +++ b/libcxx/test/std/strings/c.strings/cwchar_include_order2.compile.verify.cpp @@ -0,0 +1,25 @@ +//===----------------------------------------------------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +// <cwchar> + +// XFAIL: no-wide-characters + +// Tests that include ordering does not affect the definition of wcsstr. +// See: https://llvm.org/PR62638 + +// clang-format off +#include <iosfwd> +#include <cwchar> +// clang-format on + +void func() { + wchar_t* v1; + const wchar_t* cv2 = L"/"; + v1 = wcsstr(cv2, L"/"); // expected-error {{assigning to 'wchar_t *' from 'const wchar_t *' discards qualifiers}} +} |