[all-commits] [llvm/llvm-project] 3dc1b5: [libc] Make 'printf' converter output "(null)" ins...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Mar 19 12:45:20 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dc1b5044e25fc7e574719355091fccddad29ce4
      https://github.com/llvm/llvm-project/commit/3dc1b5044e25fc7e574719355091fccddad29ce4
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M libc/docs/dev/printf_behavior.rst
    M libc/docs/dev/undefined_behavior.rst
    M libc/src/stdio/printf_core/string_converter.h
    M libc/test/src/stdio/sprintf_test.cpp

  Log Message:
  -----------
  [libc] Make 'printf' converter output "(null)" instead of "null" (#85845)

Summary:
Currently we print `null` for the null pointer in a `%s` expression.
Although it's not defined by the standard, other implementations choose
to use `(null)` to indicate this. We also currently print `(nullptr)` so
I think it's more consistent to use parens in both cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list