summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/diagnostics
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-09-11 16:05:42 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-09-11 16:05:42 +0000
commitbc455478e10907c28270b4eb241d26c79595cfe8 (patch)
treed94622801f210cb1842b204c718ca826b3a0c8c4 /libcxx/test/std/diagnostics
parent4c2a3ec33bc1e2387eea497ca1047f65e4c35058 (diff)
downloadbcm5719-llvm-bc455478e10907c28270b4eb241d26c79595cfe8.tar.gz
bcm5719-llvm-bc455478e10907c28270b4eb241d26c79595cfe8.zip
Add include of <string> to <system_error>, since things in there return strings. Fixes PR#34529.
llvm-svn: 312923
Diffstat (limited to 'libcxx/test/std/diagnostics')
-rw-r--r--libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp (renamed from libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp)11
-rw-r--r--libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp (renamed from libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp)10
2 files changed, 21 insertions, 0 deletions
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp
index b58f5c55b64..a2515a4c835 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/nothing_to_do.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp
@@ -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
}
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp
index b58f5c55b64..5bbca295f6b 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/nothing_to_do.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp
@@ -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
}
OpenPOWER on IntegriCloud