OSDN Git Service

Fix build breakage due to typo in cast.
authorZachary Turner <zturner@google.com>
Thu, 22 Sep 2016 19:21:32 +0000 (19:21 +0000)
committerZachary Turner <zturner@google.com>
Thu, 22 Sep 2016 19:21:32 +0000 (19:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282183 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/StringRef.h
unittests/ADT/StringRefTest.cpp

index 94f0538..44b14d2 100644 (file)
@@ -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;
index 40ab4e0..39ed71b 100644 (file)
@@ -580,6 +580,8 @@ static const char* BadStrings[] = {
   , "08"                    // illegal oct characters
   , "0o8"                   // illegal oct characters
   , "-123"                  // negative unsigned value
+  , "0x"
+  , "0b"
 };