[PATCH] D150430: Implement BufferOverlap check for sprint/snprintf
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 12:34:53 PDT 2023
steakhal added a comment.
In D150430#4347365 <https://reviews.llvm.org/D150430#4347365>, @ArnaudBienner wrote:
> Thanks for the review :)
>
> I implemented the suggested changes.
>
> Just one question: `PointeeTy.isNull()`: is this guaranteed to always work even though `getType()->isAnyPointerType() == false`?
>
> I'm assuming yes since the tests still pass, but wanted to confirm this is the best way to do this check for `char*` arguments.
I was also surprised, but check the definition of that function. It will try to cast the nonnull type to a list of types, and return null if didnt match.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150430/new/
https://reviews.llvm.org/D150430
More information about the cfe-commits
mailing list