[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-05 Thread Phabricator via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-05 Thread Vedant Kumar via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-04 Thread Adrian Prantl via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Jonathan Roelofs via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Vedant Kumar via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Jonathan Roelofs via Phabricator via cfe-commits
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

[PATCH] D30599: [ubsan] Extend the nonnull argument check to ObjC

2017-03-03 Thread Vedant Kumar via Phabricator via cfe-commits
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