[all-commits] [llvm/llvm-project] 37ce73: [libc] fix strtointeger hex prefix parsing

michaelrj-google via All-commits all-commits at lists.llvm.org
Fri Sep 3 13:39:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 37ce7349f7e95ef19cd6169e70414286b33114cb
      https://github.com/llvm/llvm-project/commit/37ce7349f7e95ef19cd6169e70414286b33114cb
  Author: Michael Jones <michaelrj at google.com>
  Date:   2021-09-03 (Fri, 03 Sep 2021)

  Changed paths:
    M libc/src/__support/str_conv_utils.h
    M libc/test/src/stdlib/strtol_test.cpp
    M libc/test/src/stdlib/strtoll_test.cpp
    M libc/test/src/stdlib/strtoul_test.cpp
    M libc/test/src/stdlib/strtoull_test.cpp

  Log Message:
  -----------
  [libc] fix strtointeger hex prefix parsing

Fix edge case where "0x" would be considered a complete hexadecimal
number for purposes of str_end. Now the hexadecimal prefix needs a valid
digit after it, else just the 0 will be counted as the number.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D109084




More information about the All-commits mailing list