[all-commits] [llvm/llvm-project] 53804d: [libc] fix strtol returning the wrong length

michaelrj-google via All-commits all-commits at lists.llvm.org
Mon Oct 25 15:00:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 53804d4eb2866b4741ebf6c76a8bee8580dde259
      https://github.com/llvm/llvm-project/commit/53804d4eb2866b4741ebf6c76a8bee8580dde259
  Author: Michael Jones <michaelrj at google.com>
  Date:   2021-10-25 (Mon, 25 Oct 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 strtol returning the wrong length

Previously, strtol/ll/ul/ull would return a pointer to the end of its
parsing, regardless of if it detected a number. Now it will return a
length of 0 when it doesn't find a number.

Reviewed By: sivachandra

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




More information about the All-commits mailing list