More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in filesystem::path
llvm-svn: 318378
diff --git a/libcxx/include/experimental/filesystem b/libcxx/include/experimental/filesystem
index 747f62f..674490f 100644
--- a/libcxx/include/experimental/filesystem
+++ b/libcxx/include/experimental/filesystem
@@ -972,7 +972,8 @@
_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(); }