[libcxx] r249926 - Revert r249889 due to bot failure.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 18:42:28 PDT 2015


On Fri, Oct 9, 2015 at 6:29 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> On Fri, Oct 9, 2015 at 6:03 PM, Manman Ren via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
>> Author: mren
>> Date: Fri Oct  9 20:03:55 2015
>> New Revision: 249926
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=249926&view=rev
>> Log:
>> Revert r249889 due to bot failure.
>>
>
> Can you provide a pointer to the failing bot?
>

Ah, found it:

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/7703/testReport/junit/libc++/std_depr_depr_c_headers/wchar_h_pass_cpp/

Unreverted in r249932, with an XFAIL for Darwin. The problem is that the
underlying libc provides a bad overload set, and there's nothing that
libc++ can do to fix that.


>
>
>> Removed:
>>     libcxx/trunk/include/wchar.h
>> Modified:
>>     libcxx/trunk/include/cwchar
>>     libcxx/trunk/test/std/depr/depr.c.headers/wchar_h.pass.cpp
>>
>> Modified: libcxx/trunk/include/cwchar
>> URL:
>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/cwchar?rev=249926&r1=249925&r2=249926&view=diff
>>
>> ==============================================================================
>> --- libcxx/trunk/include/cwchar (original)
>> +++ libcxx/trunk/include/cwchar Fri Oct  9 20:03:55 2015
>> @@ -106,6 +106,9 @@ size_t wcsrtombs(char* restrict dst, con
>>  #include <__config>
>>  #include <cwctype>
>>  #include <wchar.h>
>> +#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
>> +#include <support/win32/support.h> // pull in *swprintf defines
>> +#endif // _LIBCPP_MSVCRT
>>
>>  #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
>>  #pragma GCC system_header
>> @@ -158,13 +161,16 @@ using ::wcscoll;
>>  using ::wcsncmp;
>>  using ::wcsxfrm;
>>
>> -#ifdef _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS
>> +#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
>> +
>>  using ::wcschr;
>>  using ::wcspbrk;
>>  using ::wcsrchr;
>>  using ::wcsstr;
>>  using ::wmemchr;
>> +
>>  #else
>> +
>>  inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcschr(const wchar_t*
>> __s, wchar_t __c) {return ::wcschr(__s, __c);}
>>  inline _LIBCPP_INLINE_VISIBILITY       wchar_t* wcschr(      wchar_t*
>> __s, wchar_t __c) {return ::wcschr(__s, __c);}
>>
>> @@ -179,6 +185,7 @@ inline _LIBCPP_INLINE_VISIBILITY       w
>>
>>  inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wmemchr(const wchar_t*
>> __s, wchar_t __c, size_t __n) {return ::wmemchr(__s, __c, __n);}
>>  inline _LIBCPP_INLINE_VISIBILITY       wchar_t* wmemchr(      wchar_t*
>> __s, wchar_t __c, size_t __n) {return ::wmemchr(__s, __c, __n);}
>> +
>>  #endif
>>
>>  using ::wcscspn;
>>
>> Removed: libcxx/trunk/include/wchar.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/wchar.h?rev=249925&view=auto
>>
>> ==============================================================================
>> --- libcxx/trunk/include/wchar.h (original)
>> +++ libcxx/trunk/include/wchar.h (removed)
>> @@ -1,136 +0,0 @@
>> -// -*- C++ -*-
>> -//===--------------------------- wchar.h
>> ----------------------------------===//
>> -//
>> -//                     The LLVM Compiler Infrastructure
>> -//
>> -// This file is dual licensed under the MIT and the University of
>> Illinois Open
>> -// Source Licenses. See LICENSE.TXT for details.
>> -//
>>
>> -//===----------------------------------------------------------------------===//
>> -
>> -#if defined(__need_wint_t) || defined(__need_mbstate_t)
>> -
>> -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
>> -#pragma GCC system_header
>> -#endif
>> -
>> -#include_next <wchar.h>
>> -
>> -#elif !defined(_LIBCPP_WCHAR_H)
>> -#define _LIBCPP_WCHAR_H
>> -
>> -/*
>> -    wchar.h synopsis
>> -
>> -Macros:
>> -
>> -    NULL
>> -    WCHAR_MAX
>> -    WCHAR_MIN
>> -    WEOF
>> -
>> -Types:
>> -
>> -    mbstate_t
>> -    size_t
>> -    tm
>> -    wint_t
>> -
>> -int fwprintf(FILE* restrict stream, const wchar_t* restrict format, ...);
>> -int fwscanf(FILE* restrict stream, const wchar_t* restrict format, ...);
>> -int swprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict
>> format, ...);
>> -int swscanf(const wchar_t* restrict s, const wchar_t* restrict format,
>> ...);
>> -int vfwprintf(FILE* restrict stream, const wchar_t* restrict format,
>> va_list arg);
>> -int vfwscanf(FILE* restrict stream, const wchar_t* restrict format,
>> va_list arg);  // C99
>> -int vswprintf(wchar_t* restrict s, size_t n, const wchar_t* restrict
>> format, va_list arg);
>> -int vswscanf(const wchar_t* restrict s, const wchar_t* restrict format,
>> va_list arg);  // C99
>> -int vwprintf(const wchar_t* restrict format, va_list arg);
>> -int vwscanf(const wchar_t* restrict format, va_list arg);  // C99
>> -int wprintf(const wchar_t* restrict format, ...);
>> -int wscanf(const wchar_t* restrict format, ...);
>> -wint_t fgetwc(FILE* stream);
>> -wchar_t* fgetws(wchar_t* restrict s, int n, FILE* restrict stream);
>> -wint_t fputwc(wchar_t c, FILE* stream);
>> -int fputws(const wchar_t* restrict s, FILE* restrict stream);
>> -int fwide(FILE* stream, int mode);
>> -wint_t getwc(FILE* stream);
>> -wint_t getwchar();
>> -wint_t putwc(wchar_t c, FILE* stream);
>> -wint_t putwchar(wchar_t c);
>> -wint_t ungetwc(wint_t c, FILE* stream);
>> -double wcstod(const wchar_t* restrict nptr, wchar_t** restrict endptr);
>> -float wcstof(const wchar_t* restrict nptr, wchar_t** restrict endptr);
>>        // C99
>> -long double wcstold(const wchar_t* restrict nptr, wchar_t** restrict
>> endptr);  // C99
>> -long wcstol(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
>> base);
>> -long long wcstoll(const wchar_t* restrict nptr, wchar_t** restrict
>> endptr, int base);  // C99
>> -unsigned long wcstoul(const wchar_t* restrict nptr, wchar_t** restrict
>> endptr, int base);
>> -unsigned long long wcstoull(const wchar_t* restrict nptr, wchar_t**
>> restrict endptr, int base);  // C99
>> -wchar_t* wcscpy(wchar_t* restrict s1, const wchar_t* restrict s2);
>> -wchar_t* wcsncpy(wchar_t* restrict s1, const wchar_t* restrict s2,
>> size_t n);
>> -wchar_t* wcscat(wchar_t* restrict s1, const wchar_t* restrict s2);
>> -wchar_t* wcsncat(wchar_t* restrict s1, const wchar_t* restrict s2,
>> size_t n);
>> -int wcscmp(const wchar_t* s1, const wchar_t* s2);
>> -int wcscoll(const wchar_t* s1, const wchar_t* s2);
>> -int wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n);
>> -size_t wcsxfrm(wchar_t* restrict s1, const wchar_t* restrict s2, size_t
>> n);
>> -const wchar_t* wcschr(const wchar_t* s, wchar_t c);
>> -      wchar_t* wcschr(      wchar_t* s, wchar_t c);
>> -size_t wcscspn(const wchar_t* s1, const wchar_t* s2);
>> -size_t wcslen(const wchar_t* s);
>> -const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2);
>> -      wchar_t* wcspbrk(      wchar_t* s1, const wchar_t* s2);
>> -const wchar_t* wcsrchr(const wchar_t* s, wchar_t c);
>> -      wchar_t* wcsrchr(      wchar_t* s, wchar_t c);
>> -size_t wcsspn(const wchar_t* s1, const wchar_t* s2);
>> -const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2);
>> -      wchar_t* wcsstr(      wchar_t* s1, const wchar_t* s2);
>> -wchar_t* wcstok(wchar_t* restrict s1, const wchar_t* restrict s2,
>> wchar_t** restrict ptr);
>> -const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n);
>> -      wchar_t* wmemchr(      wchar_t* s, wchar_t c, size_t n);
>> -int wmemcmp(wchar_t* restrict s1, const wchar_t* restrict s2, size_t n);
>> -wchar_t* wmemcpy(wchar_t* restrict s1, const wchar_t* restrict s2,
>> size_t n);
>> -wchar_t* wmemmove(wchar_t* s1, const wchar_t* s2, size_t n);
>> -wchar_t* wmemset(wchar_t* s, wchar_t c, size_t n);
>> -size_t wcsftime(wchar_t* restrict s, size_t maxsize, const wchar_t*
>> restrict format,
>> -                const tm* restrict timeptr);
>> -wint_t btowc(int c);
>> -int wctob(wint_t c);
>> -int mbsinit(const mbstate_t* ps);
>> -size_t mbrlen(const char* restrict s, size_t n, mbstate_t* restrict ps);
>> -size_t mbrtowc(wchar_t* restrict pwc, const char* restrict s, size_t n,
>> mbstate_t* restrict ps);
>> -size_t wcrtomb(char* restrict s, wchar_t wc, mbstate_t* restrict ps);
>> -size_t mbsrtowcs(wchar_t* restrict dst, const char** restrict src,
>> size_t len,
>> -                 mbstate_t* restrict ps);
>> -size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src,
>> size_t len,
>> -                 mbstate_t* restrict ps);
>> -
>> -*/
>> -
>> -#include <__config>
>> -
>> -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
>> -#pragma GCC system_header
>> -#endif
>> -
>> -#ifdef __cplusplus
>> -#define __CORRECT_ISO_CPP_WCHAR_H_PROTO
>> -#endif
>> -
>> -#include_next <wchar.h>
>> -
>> -// Let <cwchar> know if we have const-correct overloads for wcschr and
>> friends.
>> -#if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
>> -#  define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
>> -#elif defined(__GLIBC_PREREQ)
>> -#  if __GLIBC_PREREQ(2, 10)
>> -#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
>> -#  endif
>> -#endif
>> -
>> -#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT) ||
>> defined(__MINGW32__))
>> -extern "C++" {
>> -#include <support/win32/support.h> // pull in *swprintf defines
>> -}  // extern "C++"
>> -#endif  // __cplusplus && _LIBCPP_MSVCRT
>> -
>> -#endif  // _LIBCPP_WCHAR_H
>>
>> Modified: libcxx/trunk/test/std/depr/depr.c.headers/wchar_h.pass.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/wchar_h.pass.cpp?rev=249926&r1=249925&r2=249926&view=diff
>>
>> ==============================================================================
>> --- libcxx/trunk/test/std/depr/depr.c.headers/wchar_h.pass.cpp (original)
>> +++ libcxx/trunk/test/std/depr/depr.c.headers/wchar_h.pass.cpp Fri Oct  9
>> 20:03:55 2015
>> @@ -28,9 +28,13 @@
>>  #error WEOF not defined
>>  #endif
>>
>> +#if defined(__clang__)
>> +#pragma clang diagnostic ignored "-Wmissing-braces"
>> +#endif
>> +
>>  int main()
>>  {
>> -    mbstate_t mb = {0};
>> +    mbstate_t mb = {};
>>      size_t s = 0;
>>      tm *tm = 0;
>>      wint_t w = 0;
>> @@ -50,13 +54,19 @@ int main()
>>      static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)),
>> int>::value), "");
>>      static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)),
>> int>::value), "");
>>      static_assert((std::is_same<decltype(vswscanf(L"", L"", va)),
>> int>::value), "");
>> +    static_assert((std::is_same<decltype(vwprintf(L"", va)),
>> int>::value), "");
>> +    static_assert((std::is_same<decltype(vwscanf(L"", va)),
>> int>::value), "");
>> +    static_assert((std::is_same<decltype(wprintf(L"")), int>::value),
>> "");
>> +    static_assert((std::is_same<decltype(wscanf(L"")), int>::value), "");
>>      static_assert((std::is_same<decltype(fgetwc(fp)), wint_t>::value),
>> "");
>>      static_assert((std::is_same<decltype(fgetws(ws, 0, fp)),
>> wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(fputwc(L' ', fp)),
>> wint_t>::value), "");
>>      static_assert((std::is_same<decltype(fputws(L"", fp)), int>::value),
>> "");
>>      static_assert((std::is_same<decltype(fwide(fp, 0)), int>::value),
>> "");
>>      static_assert((std::is_same<decltype(getwc(fp)), wint_t>::value),
>> "");
>> +    static_assert((std::is_same<decltype(getwchar()), wint_t>::value),
>> "");
>>      static_assert((std::is_same<decltype(putwc(L' ', fp)),
>> wint_t>::value), "");
>> +    static_assert((std::is_same<decltype(putwchar(L' ')),
>> wint_t>::value), "");
>>      static_assert((std::is_same<decltype(ungetwc(L' ', fp)),
>> wint_t>::value), "");
>>      static_assert((std::is_same<decltype(wcstod(L"", (wchar_t**)0)),
>> double>::value), "");
>>      static_assert((std::is_same<decltype(wcstof(L"", (wchar_t**)0)),
>> float>::value), "");
>> @@ -73,19 +83,14 @@ int main()
>>      static_assert((std::is_same<decltype(wcscoll(L"", L"")),
>> int>::value), "");
>>      static_assert((std::is_same<decltype(wcsncmp(L"", L"", s)),
>> int>::value), "");
>>      static_assert((std::is_same<decltype(wcsxfrm(ws, L"", s)),
>> size_t>::value), "");
>> -    static_assert((std::is_same<decltype(wcschr((const wchar_t*)0, L'
>> ')), const wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcschr((wchar_t*)0, L' ')),
>> wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcscspn(L"", L"")),
>> size_t>::value), "");
>>      static_assert((std::is_same<decltype(wcslen(L"")), size_t>::value),
>> "");
>> -    static_assert((std::is_same<decltype(wcspbrk((const wchar_t*)0,
>> L"")), const wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcspbrk((wchar_t*)0, L"")),
>> wchar_t*>::value), "");
>> -    static_assert((std::is_same<decltype(wcsrchr((const wchar_t*)0, L'
>> ')), const wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcsrchr((wchar_t*)0, L' ')),
>> wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcsspn(L"", L"")),
>> size_t>::value), "");
>> -    static_assert((std::is_same<decltype(wcsstr((const wchar_t*)0,
>> L"")), const wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcsstr((wchar_t*)0, L"")),
>> wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wcstok(ws, L"", (wchar_t**)0)),
>> wchar_t*>::value), "");
>> -    static_assert((std::is_same<decltype(wmemchr((const wchar_t*)0, L'
>> ', s)), const wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wmemchr((wchar_t*)0, L' ', s)),
>> wchar_t*>::value), "");
>>      static_assert((std::is_same<decltype(wmemcmp(L"", L"", s)),
>> int>::value), "");
>>      static_assert((std::is_same<decltype(wmemcpy(ws, L"", s)),
>> wchar_t*>::value), "");
>> @@ -100,16 +105,4 @@ int main()
>>      static_assert((std::is_same<decltype(wcrtomb(ns, L' ', &mb)),
>> size_t>::value), "");
>>      static_assert((std::is_same<decltype(mbsrtowcs(ws, (const char**)0,
>> s, &mb)), size_t>::value), "");
>>      static_assert((std::is_same<decltype(wcsrtombs(ns, (const
>> wchar_t**)0, s, &mb)), size_t>::value), "");
>> -
>> -#ifndef _LIBCPP_HAS_NO_STDIN
>> -    static_assert((std::is_same<decltype(getwchar()), wint_t>::value),
>> "");
>> -    static_assert((std::is_same<decltype(vwscanf(L"", va)),
>> int>::value), "");
>> -    static_assert((std::is_same<decltype(wscanf(L"")), int>::value), "");
>> -#endif
>> -
>> -#ifndef _LIBCPP_HAS_NO_STDOUT
>> -    static_assert((std::is_same<decltype(putwchar(L' ')),
>> wint_t>::value), "");
>> -    static_assert((std::is_same<decltype(vwprintf(L"", va)),
>> int>::value), "");
>> -    static_assert((std::is_same<decltype(wprintf(L"")), int>::value),
>> "");
>> -#endif
>>  }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151009/b461eb41/attachment-0001.html>


More information about the cfe-commits mailing list