[all-commits] [llvm/llvm-project] b36f05: [libc] Fix wcstok() "subsequent searches" behavior...

enh-google via All-commits all-commits at lists.llvm.org
Fri Aug 1 11:15:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b36f05ce48bd714182481765ac14fcaff129639f
      https://github.com/llvm/llvm-project/commit/b36f05ce48bd714182481765ac14fcaff129639f
  Author: enh-google <enh at google.com>
  Date:   2025-08-01 (Fri, 01 Aug 2025)

  Changed paths:
    M libc/src/wchar/wcstok.cpp
    M libc/test/src/wchar/wcstok_test.cpp

  Log Message:
  -----------
  [libc] Fix wcstok() "subsequent searches" behavior. (#151589)

POSIX says "If no such wide-character code is found, the current token
extends to the end of the wide-character string pointed to by ws1, and
subsequent searches for a token shall return a null pointer", but the
current implementation only returns nullptr the first time. This failed
an existing bionic test when I tried to switch over to llvm-libc
wcstok().



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