[PATCH] D157948: [NFC]Fix possibly deref nullptr
Wang, Xin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 05:43:23 PDT 2023
XinWang10 added a comment.
In D157948#4587733 <https://reviews.llvm.org/D157948#4587733>, @skan wrote:
> In D157948#4587327 <https://reviews.llvm.org/D157948#4587327>, @XinWang10 wrote:
>
>> In D157948#4587289 <https://reviews.llvm.org/D157948#4587289>, @skan wrote:
>>
>>> Is this a NFC change or a bug fix? If NFC, shouldn't we use assert?
>>
>> cast could use assert internally, I think it's same to explicit assert.
>
> Then how about others?
OK, the other two places are in same function, line 432 shows
MMI = MMIWP ? &MMIWP->getMMI() : nullptr;
So MMI could be nullptr, I just add add condition for those could deref this MMI, no func change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157948/new/
https://reviews.llvm.org/D157948
More information about the llvm-commits
mailing list