[PATCH] D113164: [NFC] Avoid nullptr dereference
Freddy, Ye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 22:54:17 PDT 2021
FreddyYe added a comment.
> Besides, I didn't find difference between `StoreInst` and `ReturnInst`, why only warn here?
The difference is `Store->getValueOperand()` doesn't return a nullptr but `Return->getValueOperand()` does.
Hi both, thx for review. This is reported by static code analysis tool, so I don't have a reproduce. I can also add assert() to these callees to satisfy the tool, but there will be more than only one of them. Does that sound OK to you?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113164/new/
https://reviews.llvm.org/D113164
More information about the llvm-commits
mailing list