More of P0600 - '[[nodiscard]] in the Library' mark empty() as nodiscard in filesystem::path
llvm-svn: 318378
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 2f13e790839f1b3f975a254ffd4c29a171ab9204
diff --git a/include/experimental/filesystem b/include/experimental/filesystem
index 747f62f..674490f 100644
--- a/include/experimental/filesystem
+++ b/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(); }