Details
Details
Diff Detail
Diff Detail
- Repository
 - rG LLVM Github Monorepo
 
Event Timeline
| libc/src/string/strrchr.cpp | ||
|---|---|---|
| 16 | Same here - keep this char instead of unsigned char. If it is unsigned char, then you end up comparing singed and unsigned values on line 19.  | |
| libc/src/string/strchr.cpp | ||
|---|---|---|
| 16–17 | I had added a comment here but Phabricator ignored it for some reason. I had pointed out that the standard actually says we should compare with characters in src after converting c to char. So, make this char instead of unsigned char. You will not need a cast on line 18.  | |
I had added a comment here but Phabricator ignored it for some reason.
I had pointed out that the standard actually says we should compare with characters in src after converting c to char. So, make this char instead of unsigned char. You will not need a cast on line 18.