| Issue |
203260
|
| Summary |
[clang:static-analyzer] False negative core.StackAddressEscape with `strchr()`
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
chrchr-github
|
```c++
char* f() {
char a[4]{"abc"};
return strchr(a, 'b');
}
```
https://godbolt.org/z/fxj75oE7f
`strchr()` might also return `nullptr`, but a warning is still justified IMHO.
I also noticed that the clang-tidy option `--checks=clang-analyzer-core.StackAddressEscape` or `--checks=clang-analyzer-core.*` does **not** enable the corresponding check(s) for some reason.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs