[PATCH] D24778: Add `StringRef::consumeInteger`

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 12:54:26 PDT 2016


mehdi_amini added a comment.

Can you add a test that shows what happen with an explicit radix? (And a mismatch like base 10 and hexadecimal for example)


================
Comment at: include/llvm/ADT/StringRef.h:414
@@ +413,3 @@
+    consumeInteger(unsigned Radix, T &Result) {
+      long long LLVal;
+      if (consumeSignedInteger(*this, Radix, LLVal) ||
----------------
Is the intent to provide 64 bits here? If so why not using int64_t?


https://reviews.llvm.org/D24778





More information about the llvm-commits mailing list