Index: include/__config =================================================================== --- include/__config +++ include/__config @@ -45,6 +45,9 @@ #ifndef __is_identifier #define __is_identifier(__x) 1 #endif +#ifndef __has_warning +#define __has_warning(__x) 0 +#endif #ifdef __LITTLE_ENDIAN__ Index: include/locale =================================================================== --- include/locale +++ include/locale @@ -1875,6 +1875,11 @@ enum dateorder {no_order, dmy, mdy, ymd, ydm}; }; +#if __has_warning("-Wnon-virtual-dtor") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif + template class _LIBCPP_TYPE_VIS_ONLY __time_get_c_storage { @@ -1890,6 +1895,10 @@ virtual const string_type& __X() const; }; +#if __has_warning("-Wnon-virtual-dtor") +#pragma clang diagnostic pop +#endif + template > class _LIBCPP_TYPE_VIS_ONLY time_get : public locale::facet,