[llvm] r287589 - Remove LLVM_NODISCARD from getAsInteger().

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 14:47:23 PST 2016


Author: zturner
Date: Mon Nov 21 16:47:23 2016
New Revision: 287589

URL: http://llvm.org/viewvc/llvm-project?rev=287589&view=rev
Log:
Remove LLVM_NODISCARD from getAsInteger().

Modified:
    llvm/trunk/include/llvm/ADT/StringRef.h

Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=287589&r1=287588&r2=287589&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Mon Nov 21 16:47:23 2016
@@ -493,9 +493,8 @@ namespace llvm {
     /// this returns true to signify the error.  The string is considered
     /// erroneous if empty or if it overflows T.
     template <typename T>
-    LLVM_NODISCARD
-        typename std::enable_if<std::numeric_limits<T>::is_signed, bool>::type
-        getAsInteger(unsigned Radix, T &Result) const {
+    typename std::enable_if<std::numeric_limits<T>::is_signed, bool>::type
+    getAsInteger(unsigned Radix, T &Result) const {
       long long LLVal;
       if (getAsSignedInteger(*this, Radix, LLVal) ||
             static_cast<T>(LLVal) != LLVal)
@@ -505,9 +504,8 @@ namespace llvm {
     }
 
     template <typename T>
-    LLVM_NODISCARD
-        typename std::enable_if<!std::numeric_limits<T>::is_signed, bool>::type
-        getAsInteger(unsigned Radix, T &Result) const {
+    typename std::enable_if<!std::numeric_limits<T>::is_signed, bool>::type
+    getAsInteger(unsigned Radix, T &Result) const {
       unsigned long long ULLVal;
       // The additional cast to unsigned long long is required to avoid the
       // Visual C++ warning C4805: '!=' : unsafe mix of type 'bool' and type




More information about the llvm-commits mailing list