26 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// <cwchar>10 11// UNSUPPORTED: no-wide-characters12 13// Tests that include ordering does not affect the definition of wcsstr.14// See: https://llvm.org/PR6263815 16// clang-format off17#include <iosfwd>18#include <cwchar>19// clang-format on20 21void func() {22 wchar_t* v1;23 const wchar_t* cv2 = L"/";24 v1 = wcsstr(cv2, L"/"); // expected-error {{assigning to 'wchar_t *' from 'const wchar_t *' discards qualifiers}}25}26