patch: add 'nonnull' attribute when passing reference types

Richard Smith richard at metafoo.co.uk
Thu May 22 18:16:28 PDT 2014


LGTM


On Mon, May 19, 2014 at 11:35 PM, Nick Lewycky <nlewycky at google.com> wrote:

> The attached patch updates CodeGen to add the llvm 'nonnull' attribute
> whenever the return or argument type is a reference (lvalue or rvalue
> reference).
>
> There is more we could do here (for instance, 'this' pointers are also
> never null), but I'm starting here since the bulk of the change is merely
> updating the tests. In particular I added 'nonnull' whenever the mangled
> name indicated a reference type was involved. For Microsoft mangling tests
> and some Objective-C++ tests, I simply updated the tests with no attempt to
> reason about the correctness.
>
> Please review!
>
> Nick
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140522/83327a38/attachment.html>


More information about the cfe-commits mailing list