Commit 92d980e
[libcxx] [test] Fix the gets-removed.verify.cpp test with Clang 21 (llvm#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
9eef4d1 ("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.1 parent bfcf851 commit 92d980e
File tree
1 file changed
+1
-1
lines changed- libcxx/test/std/input.output/file.streams/c.files
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
0 commit comments