diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2023-05-30 18:23:11 +0200 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2023-05-30 18:30:30 +0200 |
commit | 8a40f89e2e9357539db0f9a119db0fcfc77232ab (patch) | |
tree | b6b7ef1ba6ae54645def0b843dae6a9eff0b298a /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h | |
parent | 0989ce947e3dd64f3e29e7c34f186c0a23c0323d (diff) | |
download | llvm-8a40f89e2e9357539db0f9a119db0fcfc77232ab.zip llvm-8a40f89e2e9357539db0f9a119db0fcfc77232ab.tar.gz llvm-8a40f89e2e9357539db0f9a119db0fcfc77232ab.tar.bz2 |
[clang][analyzer][NFC] Replace dyn_cast with cast in MemRegion::getMemorySpace
MemRegion::getMemorySpace() is annotated with
LLVM_ATTRIBUTE_RETURNS_NONNULL (which triggers instant UB if a null
pointer is returned), and callers indeed don't check the return value
for null. Thus, even though llvm::dyn_cast is called, it can never
return null in this context. Therefore, we can safely call llvm::cast.
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D151727
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h')
0 files changed, 0 insertions, 0 deletions