diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2024-10-30 16:08:03 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-30 15:08:03 -0700 |
commit | 50c44478fe3f680374edf1363d2a3617b8ff2a0b (patch) | |
tree | 12bea83bcc46413cb3d5caf026c8520085659427 /lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h | |
parent | 5d35747f6de9295400327744b389f303e3e2b13d (diff) | |
download | llvm-50c44478fe3f680374edf1363d2a3617b8ff2a0b.zip llvm-50c44478fe3f680374edf1363d2a3617b8ff2a0b.tar.gz llvm-50c44478fe3f680374edf1363d2a3617b8ff2a0b.tar.bz2 |
[libc] fix behavior of strrchr(x, '\0') (#112620)
`strrchr("foo", '\0')` is defined to point to the end of `foo`, rather
than returning NULL. This wasn't caught by tests, since llvm-libc's
`ASSERT_STREQ(nullptr, "");` is not an assertion error.
While I'm here, refactor the test slightly to check for NULL more
specifically. I considered adding fancier `ASSERT`s (and changing the
semantics of `ASSERT_STREQ`), but opted for a more local fix by fair
dice roll.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h')
0 files changed, 0 insertions, 0 deletions