commit | e4e20f43e45bf9e428ebdd81c2ff7b3826cd6c4e | [log] [tgz] |
---|---|---|
author | Douglas Gregor <dgregor@apple.com> | Tue Sep 20 18:11:52 2011 +0000 |
committer | Douglas Gregor <dgregor@apple.com> | Tue Sep 20 18:11:52 2011 +0000 |
tree | b7db6eee5f9e587347ee351a76c4ceac063be3ac | |
parent | 6c3ad6528818d915a9622c65f1e5f3e3c6e50ca5 [diff] [blame] |
Eliminate sign-comparison warnings in APInt llvm-svn: 140158
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index d7291a1..931c885 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp
@@ -54,12 +54,14 @@ 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';