[PATCH] D102820: [Clang] Check for returns_nonnull when deciding to add allocation null checks
Bruno Cardoso Lopes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 15 16:55:40 PDT 2021
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
> Assuming I'm answering the correct question that the returns_nonnull is preserved through a PCH, the answer is yes.
Thanks!
> As mentioned this isn't strictly needed and the BE can elide the check but we can also not emit it to save on AST/IR processing cost.
It's a good way for clang based tooling to get the expected result if relying on `shouldNullCheckAllocation` for an accurate answer.
Maybe wait a few more days to see if anyone else has any comment, otherwise LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102820/new/
https://reviews.llvm.org/D102820
More information about the cfe-commits
mailing list