This revision was automatically updated to reflect the committed changes.
Closed by commit rL296996: [ubsan] Extend the nonnull arg check to ObjC
(authored by vedantk).
Changed prior to commit:
https://reviews.llvm.org/D30599?vs=90564&id=90647#toc
Repository:
rL LLVM
https://reviews.llvm.or
vsk marked an inline comment as done.
vsk added a comment.
Thanks for the reviews!
Comment at: lib/CodeGen/CodeGenFunction.h:308
+ /// \brief An abstract representation of regular/ObjC call/message targets.
+ class AbstractCallee {
aprantl wrote:
> The \bri
aprantl added inline comments.
Comment at: lib/CodeGen/CodeGenFunction.h:308
+ /// \brief An abstract representation of regular/ObjC call/message targets.
+ class AbstractCallee {
The \brief is redundant (we use autobrief) and shouldn't be used any more.
ht
jroelofs accepted this revision.
jroelofs added a comment.
This revision is now accepted and ready to land.
LGTM, by the way.
https://reviews.llvm.org/D30599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailm
vsk added a comment.
In https://reviews.llvm.org/D30599#692210, @jroelofs wrote:
> Can the null check be performed in the callee?
Yes, but I think that would result in perplexing diagnostics, because we
wouldn't be able to report the source location of the buggy calls.
> That'd make this chec
jroelofs added a comment.
Can the null check be performed in the callee?
That'd make this check work for a few more cases that this patch doesn't cover:
- `performSelector:` messages
- messages to `id`.
https://reviews.llvm.org/D30599
___
cfe-comm
vsk created this revision.
UBSan's nonnull argument check applies when a parameter has the
"nonnull" attribute. The check currently works for FunctionDecls, but
not for ObjCMethodDecls. This patch extends the check to work for ObjC.
To do this, I introduced a new AbstractCallee class to represent