[all-commits] [llvm/llvm-project] 01a98b: [libcxx] [test] Fix the gets-removed.verify.cpp te...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Nov 24 13:07:48 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 01a98b383c700c2580e11a166dce1180188cb236
      https://github.com/llvm/llvm-project/commit/01a98b383c700c2580e11a166dce1180188cb236
  Author: Martin Storsjö <martin at martin.st>
  Date:   2025-11-24 (Mon, 24 Nov 2025)

  Changed paths:
    M libcxx/test/std/input.output/file.streams/c.files/gets-removed.verify.cpp

  Log Message:
  -----------
  [libcxx] [test] Fix the gets-removed.verify.cpp test with Clang 21 (#169235)

This fixes test errors like this, at least for a mingw target, if
building with Clang 21 instead of Clang 20, as in the CI environment:

    # .---command stderr------------
    # | error: 'expected-error' diagnostics seen but not expected:
    # | File C:\a\llvm-mingw\llvm-mingw\llvm-project\libcxx\test\std\input.output\file.streams\c.files\gets-removed.verify.cpp Line 16: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
    # | 1 error generated.
    # `-----------------------------
    # error: command failed with exit status: 1

This extra, unexpected diagnostic appears in Clang 21, since commit
9eef4d1c5fa6b1bcbbe675c14ca8301d5d346f7b ("Remove delayed typo
expressions"). Before this, we got the expected diagnostic `error: no
member named 'gets' in namespace 'std'`, with the typo correction hint
`did you mean 'puts'?`. After this change, we get the typo correction
hint `did you mean simply 'gets'?` instead. And with the typo correction
finding `::gets`, it goes on to produce a second diagnostic about
mismatched parameter for that function.

Avoid these unexpected diagnostics by passing the right type of
parameter to the gets function.



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