Page MenuHomePhabricator

[analyzer][NFC] Use MemRegion::getRegion()'s return value unconditionally
ClosedPublic

Authored by steakhal on May 21 2022, 11:55 AM.

Diff Detail

Event Timeline

steakhal created this revision.May 21 2022, 11:55 AM
Herald added a project: Restricted Project. · View Herald Transcript
steakhal requested review of this revision.May 21 2022, 11:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2022, 11:55 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steakhal updated this revision to Diff 431155.May 21 2022, 12:04 PM

arc used the HEAD^ as base, so I'm setting the parent patches now.

steakhal updated this revision to Diff 431168.May 21 2022, 12:21 PM
steakhal added reviewers: NoQ, martong.

Well, my first use of arc went a bit sideways, so I'm falling back to posting this NFC patch batch manually.
We will see how using arc works out next time.

Until this point, the runtime and reports of the Clang Static Analyzer did not change on our testset; which confirms that the stack is indeed NFC.

Is it documented with getRegion? Could we decorate that with returns-nonnull https://clang.llvm.org/docs/AttributeReference.html#returns-nonnull ?

Is it documented with getRegion? Could we decorate that with returns-nonnull https://clang.llvm.org/docs/AttributeReference.html#returns-nonnull ?

Ah, I thought one of my changes addressing this was already on review.
It turns out it was not the case. Now I uploaded it for review: D126198

Is it documented with getRegion? Could we decorate that with returns-nonnull https://clang.llvm.org/docs/AttributeReference.html#returns-nonnull ?

Ah, I thought one of my changes addressing this was already on review.
It turns out it was not the case. Now I uploaded it for review: D126198

Ok, could you please change the title of this Differential Revision? Something is still not fitting.

steakhal retitled this revision from [analyzer][NFC] MemRegion::getRegion() never returns null to [analyzer][NFC] Use MemRegion::getRegion()'s return value unconditionally.May 24 2022, 3:33 AM
martong accepted this revision.May 24 2022, 3:40 AM
This revision is now accepted and ready to land.May 24 2022, 3:40 AM
This revision was landed with ongoing or failed builds.May 27 2022, 1:08 AM
This revision was automatically updated to reflect the committed changes.