This is an archive of the discontinued LLVM Phabricator instance.

HexagonOptAddrMode::changeStore - fix null dereference warning (PR43463)
ClosedPublic

Authored by RKSimon on Feb 3 2020, 5:17 AM.

Details

Summary

As detailed on PR43463, this fixes a static analyzer null dereference warning by sinking Changed = true into the if() blocks where the MIB is actually created.

I did a quick check that suggested that one of those if() blocks is always guaranteed to be hit (so we could change it to if-else), but this seems like a safer approach.

Diff Detail

Event Timeline

RKSimon created this revision.Feb 3 2020, 5:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2020, 5:17 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
kparzysz accepted this revision.Feb 3 2020, 5:30 AM
This revision is now accepted and ready to land.Feb 3 2020, 5:30 AM
This revision was automatically updated to reflect the committed changes.