[llvm] r282183 - Fix build breakage due to typo in cast.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 12:21:36 PDT 2016
Author: zturner
Date: Thu Sep 22 14:21:32 2016
New Revision: 282183
URL: http://llvm.org/viewvc/llvm-project?rev=282183&view=rev
Log:
Fix build breakage due to typo in cast.
Modified:
llvm/trunk/include/llvm/ADT/StringRef.h
llvm/trunk/unittests/ADT/StringRefTest.cpp
Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=282183&r1=282182&r2=282183&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Thu Sep 22 14:21:32 2016
@@ -426,7 +426,7 @@ namespace llvm {
consumeInteger(unsigned Radix, T &Result) {
unsigned long long ULLVal;
if (consumeUnsignedInteger(*this, Radix, ULLVal) ||
- static_cast<long long>(static_cast<T>(ULLVal)) != ULLVal)
+ static_cast<unsigned long long>(static_cast<T>(ULLVal)) != ULLVal)
return true;
Result = ULLVal;
return false;
Modified: llvm/trunk/unittests/ADT/StringRefTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/StringRefTest.cpp?rev=282183&r1=282182&r2=282183&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/StringRefTest.cpp (original)
+++ llvm/trunk/unittests/ADT/StringRefTest.cpp Thu Sep 22 14:21:32 2016
@@ -580,6 +580,8 @@ static const char* BadStrings[] = {
, "08" // illegal oct characters
, "0o8" // illegal oct characters
, "-123" // negative unsigned value
+ , "0x"
+ , "0b"
};
More information about the llvm-commits
mailing list