summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-03 04:42:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-03 04:42:24 +0000
commitd9a25d82c1369b0310b3d58905eb3024f8da367e (patch)
treece9be402697d9ddd19c7f1bbc8e6a4e65ea3f916 /llvm/include
parent1d364c18e2b62fd0ff27191fc0511d567a2b2bce (diff)
downloadbcm5719-llvm-d9a25d82c1369b0310b3d58905eb3024f8da367e.tar.gz
bcm5719-llvm-d9a25d82c1369b0310b3d58905eb3024f8da367e.zip
Make this operator bool() explicit to match the standard library.
llvm-svn: 210072
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/system_error.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/system_error.h b/llvm/include/llvm/Support/system_error.h
index 9d300fb9915..8b3d9cc0c70 100644
--- a/llvm/include/llvm/Support/system_error.h
+++ b/llvm/include/llvm/Support/system_error.h
@@ -753,11 +753,8 @@ public:
std::string message() const;
- typedef void (*unspecified_bool_type)();
- static void unspecified_bool_true() {}
-
- operator unspecified_bool_type() const { // true if error
- return _val_ == 0 ? nullptr : unspecified_bool_true;
+ LLVM_EXPLICIT operator bool() const {
+ return _val_ != 0;
}
};
OpenPOWER on IntegriCloud