From 6390da6b04ebbf00c72d9261dcd2512e5645c3ea Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Mon, 21 Nov 2016 22:47:23 +0000 Subject: [PATCH] Remove LLVM_NODISCARD from getAsInteger(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287589 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringRef.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 0cbb79f8d2e..cb2b310d6e4 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -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 - LLVM_NODISCARD - typename std::enable_if::is_signed, bool>::type - getAsInteger(unsigned Radix, T &Result) const { + typename std::enable_if::is_signed, bool>::type + getAsInteger(unsigned Radix, T &Result) const { long long LLVal; if (getAsSignedInteger(*this, Radix, LLVal) || static_cast(LLVal) != LLVal) @@ -505,9 +504,8 @@ namespace llvm { } template - LLVM_NODISCARD - typename std::enable_if::is_signed, bool>::type - getAsInteger(unsigned Radix, T &Result) const { + typename std::enable_if::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 -- 2.50.1