summaryrefslogtreecommitdiffstats
path: root/libcxx/include/experimental/filesystem
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2017-11-16 05:48:32 +0000
committerMarshall Clow <mclow.lists@gmail.com>2017-11-16 05:48:32 +0000
commit2f13e790839f1b3f975a254ffd4c29a171ab9204 (patch)
tree78953fd00474979bf2a336f391f71ec604819080 /libcxx/include/experimental/filesystem
parent87f4a3de456427b22ab7dd8fcb0c2db58ef57c37 (diff)
downloadbcm5719-llvm-2f13e790839f1b3f975a254ffd4c29a171ab9204.tar.gz
bcm5719-llvm-2f13e790839f1b3f975a254ffd4c29a171ab9204.zip
More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in filesystem::path
llvm-svn: 318378
Diffstat (limited to 'libcxx/include/experimental/filesystem')
-rw-r--r--libcxx/include/experimental/filesystem3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem
index 747f62f2268..674490f6038 100644
--- a/libcxx/include/experimental/filesystem
+++ b/libcxx/include/experimental/filesystem
@@ -972,7 +972,8 @@ public:
_LIBCPP_INLINE_VISIBILITY path extension() const { return string_type(__extension()); }
// query
- _LIBCPP_INLINE_VISIBILITY bool empty() const _NOEXCEPT { return __pn_.empty(); }
+ _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+ bool empty() const _NOEXCEPT { return __pn_.empty(); }
_LIBCPP_INLINE_VISIBILITY bool has_root_name() const { return !__root_name().empty(); }
_LIBCPP_INLINE_VISIBILITY bool has_root_directory() const { return !__root_directory().empty(); }
OpenPOWER on IntegriCloud