[PATCH] D34284: [StringRef] Make getAsInteger a tad more robust.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 11:09:18 PDT 2017
zturner created this revision.
Herald added a subscriber: hiraditya.
Previously if the auto sense radix was specified as part of
the string and you *also* explicitly specified the radix value
to the function, we would fail.
This patch allows the radix prefix to be properly consumed even
in non-auto-sense mode.
In doing so, I learned that there was zero test coverage for
getAsInteger with an explicitly specified radix, so this patch
also rectifies that since I needed to add tests to make sure
this patch works.
https://reviews.llvm.org/D34284
Files:
llvm/lib/Support/StringRef.cpp
llvm/unittests/ADT/StringRefTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34284.102849.patch
Type: text/x-patch
Size: 8637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170616/7ffc5f07/attachment.bin>
More information about the llvm-commits
mailing list