Author: marshall Date: Mon Sep 11 09:05:42 2017 New Revision: 312923 URL: http://llvm.org/viewvc/llvm-project?rev=312923&view=rev Log: Add include of <string> to <system_error>, since things in there return strings. Fixes PR#34529.
Added: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp - copied, changed from r312922, libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp - copied, changed from r312922, libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp Removed: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp Modified: libcxx/trunk/include/system_error Modified: libcxx/trunk/include/system_error URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?rev=312923&r1=312922&r2=312923&view=diff ============================================================================== --- libcxx/trunk/include/system_error (original) +++ libcxx/trunk/include/system_error Mon Sep 11 09:05:42 2017 @@ -230,6 +230,7 @@ template <> struct hash<std::error_condi #include <type_traits> #include <stdexcept> #include <__functional_base> +#include <string> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Removed: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp?rev=312922&view=auto ============================================================================== --- libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp (original) +++ libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp (removed) @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} Copied: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp (from r312922, libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp) URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp?p2=libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp&p1=libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp&r1=312922&r2=312923&rev=312923&view=diff ============================================================================== --- libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp (original) +++ libcxx/trunk/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp Mon Sep 11 09:05:42 2017 @@ -7,6 +7,17 @@ // //===----------------------------------------------------------------------===// +// <system_error> +// class error_code + +// Make sure that the error_code bits of <system_error> are self-contained. + +#include <system_error> + int main() { + std::error_code x; + (void) x.category(); // returns a std::error_category & + (void) x.default_error_condition(); // std::error_condition + (void) x.message(); // returns a std::string } Removed: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp?rev=312922&view=auto ============================================================================== --- libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp (original) +++ libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp (removed) @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} Copied: libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp (from r312922, libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp) URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp?p2=libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp&p1=libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp&r1=312922&r2=312923&rev=312923&view=diff ============================================================================== --- libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp (original) +++ libcxx/trunk/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp Mon Sep 11 09:05:42 2017 @@ -7,6 +7,16 @@ // //===----------------------------------------------------------------------===// +// <system_error> +// class error_condition + +// Make sure that the error_condition bits of <system_error> are self-contained. + +#include <system_error> + int main() { + std::error_condition x = std::errc(0); + (void) x.category(); // returns a std::error_condition & + (void) x.message(); // returns a std::string } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits