diff options
author | Zachary Turner <zturner@google.com> | 2016-09-22 19:21:32 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-09-22 19:21:32 +0000 |
commit | aec851ce9a39d5ed595dfd9ca9cd886574a67670 (patch) | |
tree | 75cedd0ef2ea17b3bfb96d6868c51d12b9c778c4 | |
parent | 8dacca943af8a53a23b1caf3142d10fb4a77b645 (diff) | |
download | bcm5719-llvm-aec851ce9a39d5ed595dfd9ca9cd886574a67670.tar.gz bcm5719-llvm-aec851ce9a39d5ed595dfd9ca9cd886574a67670.zip |
Fix build breakage due to typo in cast.
llvm-svn: 282183
-rw-r--r-- | llvm/include/llvm/ADT/StringRef.h | 2 | ||||
-rw-r--r-- | llvm/unittests/ADT/StringRefTest.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h index 94f0538e445..44b14d20dee 100644 --- a/llvm/include/llvm/ADT/StringRef.h +++ b/llvm/include/llvm/ADT/StringRef.h @@ -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; diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp index 40ab4e038b8..39ed71b77e9 100644 --- a/llvm/unittests/ADT/StringRefTest.cpp +++ b/llvm/unittests/ADT/StringRefTest.cpp @@ -580,6 +580,8 @@ static const char* BadStrings[] = { , "08" // illegal oct characters , "0o8" // illegal oct characters , "-123" // negative unsigned value + , "0x" + , "0b" }; |