Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][analyzer][NFC] Replace dyn_cast with cast in MemRegion::getMe…
…morySpace 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
- Loading branch information