diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-20 18:11:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-20 18:11:52 +0000 |
commit | f83f0f8246457bf7951bc95dd74ec67cf524b845 (patch) | |
tree | 212dceaa6df2d829d36910b96b99f13e963c7698 /lib/Support/APInt.cpp | |
parent | 70303688bc489a316cb0892499ac4024088fa58a (diff) | |
download | llvm-f83f0f8246457bf7951bc95dd74ec67cf524b845.tar.gz llvm-f83f0f8246457bf7951bc95dd74ec67cf524b845.tar.bz2 llvm-f83f0f8246457bf7951bc95dd74ec67cf524b845.tar.xz |
Eliminate sign-comparison warnings in APInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r-- | lib/Support/APInt.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index d7291a18aa..931c885b92 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -54,12 +54,14 @@ inline static unsigned getDigit(char cdigit, uint8_t radix) { return r; r = cdigit - 'A'; - if (r <= radix - 11U) + if (r <= unsigned(radix - 11U)) return r + 10; r = cdigit - 'a'; - if (r <= radix - 11U) + if (r <= unsigned(radix - 11U)) return r + 10; + + radix = 10; } r = cdigit - '0'; |