Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 0966627

Browse files
author
Zachary Turner
committed
Fix build breakage due to typo in cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282183 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f2f9e2b commit 0966627

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/llvm/ADT/StringRef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ namespace llvm {
426426
consumeInteger(unsigned Radix, T &Result) {
427427
unsigned long long ULLVal;
428428
if (consumeUnsignedInteger(*this, Radix, ULLVal) ||
429-
static_cast<long long>(static_cast<T>(ULLVal)) != ULLVal)
429+
static_cast<unsigned long long>(static_cast<T>(ULLVal)) != ULLVal)
430430
return true;
431431
Result = ULLVal;
432432
return false;

unittests/ADT/StringRefTest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ static const char* BadStrings[] = {
580580
, "08" // illegal oct characters
581581
, "0o8" // illegal oct characters
582582
, "-123" // negative unsigned value
583+
, "0x"
584+
, "0b"
583585
};
584586

585587

0 commit comments

Comments
 (0)