[all-commits] [llvm/llvm-project] 176c85: [libc] add internal string class

michaelrj-google via All-commits all-commits at lists.llvm.org
Thu Jan 19 09:26:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 176c853d1da5c344194952659eeb74f063e13010
      https://github.com/llvm/llvm-project/commit/176c853d1da5c344194952659eeb74f063e13010
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    M libc/src/__support/CMakeLists.txt
    A libc/src/__support/char_vector.h
    M libc/test/src/__support/CMakeLists.txt
    M libc/test/src/__support/CPP/stringview_test.cpp
    A libc/test/src/__support/char_vector_test.cpp

  Log Message:
  -----------
  [libc] add internal string class

The scanf implementation needs a dynamically resizing string class. This
patch adds a minimal version of that class along with tests to check the
current functionality.

Reviewed By: sivachandra

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


  Commit: 9a32e53941ccb6ccd55d5ecd305ecd16b90bfd58
      https://github.com/llvm/llvm-project/commit/9a32e53941ccb6ccd55d5ecd305ecd16b90bfd58
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    M libc/src/stdio/scanf_core/CMakeLists.txt
    M libc/src/stdio/scanf_core/converter.cpp
    M libc/src/stdio/scanf_core/core_structs.h
    A libc/src/stdio/scanf_core/float_converter.cpp
    A libc/src/stdio/scanf_core/float_converter.h
    M libc/src/stdio/scanf_core/int_converter.cpp
    M libc/test/src/stdio/CMakeLists.txt
    M libc/test/src/stdio/sscanf_test.cpp

  Log Message:
  -----------
  [libc] add scanf float converter

This patch adds the %f/F/e/E/g/G/a/A conversions for scanf, as well as
accompanying tests. This implementation matches the definition set forth
in the standard, which may conflict with some other implementations.

Reviewed By: sivachandra

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


Compare: https://github.com/llvm/llvm-project/compare/eef0210706bc...9a32e53941cc


More information about the All-commits mailing list