Index: include/string
===================================================================
--- include/string	(revision 154474)
+++ include/string	(working copy)
@@ -1244,7 +1244,8 @@
     void shrink_to_fit() _NOEXCEPT {reserve();}
     _LIBCPP_INLINE_VISIBILITY
     void clear() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY bool empty() const _NOEXCEPT {return size() == 0;}
+    _LIBCPP_INLINE_VISIBILITY bool empty() const _NOEXCEPT _LIBCPP_WARN_UNUSED_RESULT
+        {return size() == 0;}
 
     _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __pos) const;
     _LIBCPP_INLINE_VISIBILITY reference       operator[](size_type __pos);
Index: include/vector
===================================================================
--- include/vector	(revision 154474)
+++ include/vector	(working copy)
@@ -635,7 +635,7 @@
     size_type capacity() const _NOEXCEPT
         {return __base::capacity();}
     _LIBCPP_INLINE_VISIBILITY
-    bool empty() const _NOEXCEPT
+    bool empty() const _NOEXCEPT _LIBCPP_WARN_UNUSED_RESULT
         {return this->__begin_ == this->__end_;}
     size_type max_size() const _NOEXCEPT;
     void reserve(size_type __n);
@@ -2115,7 +2115,7 @@
     size_type size() const _NOEXCEPT
         {return __size_;}
     _LIBCPP_INLINE_VISIBILITY
-    bool empty() const _NOEXCEPT
+    bool empty() const _NOEXCEPT _LIBCPP_WARN_UNUSED_RESULT
         {return __size_ == 0;}
     void reserve(size_type __n);
     void shrink_to_fit() _NOEXCEPT;
Index: include/__config
===================================================================
--- include/__config	(revision 154474)
+++ include/__config	(working copy)
@@ -346,6 +346,7 @@
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #define _LIBCPP_HAS_NO_UNICODE_CHARS
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
+#define _LIBCPP_HAS_NO_WARN_UNUSED_RESULT
 #define __alignof__ __alignof
 #define _ATTRIBUTE __declspec
 #define _ALIGNAS(x) __declspec(align(x))
@@ -389,6 +390,12 @@
 #define _LIBCPP_CONSTEXPR constexpr
 #endif
 
+#ifdef _LIBCPP_HAS_NO_WARN_UNUSED_RESULT
+#define _LIBCPP_WARN_UNUSED_RESULT
+#else
+#define _LIBCPP_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#endif
+
 #ifndef __has_feature
 #define __has_feature(__x) 0
 #endif
