On Thu, Aug 25, 2016 at 10:33 PM, Gijs Kruitbosch
<gijskruitbo...@gmail.com> wrote:
>
> Sorry, I'm not being very clear, I'm afraid. I'm not asking to ditch
> nsresult.
>
> I'm wondering if we can make a "smarter" annotation than [must_use] that
> requires *either* a nullcheck on the outparam or an nsresult check (rather
> than requiring the latter and not being satisfied with a nullcheck on the
> outparam). I don't know if that's feasible with today's compilers and/or
> static checking, but it seemed worth asking.

Oh, I see. I certainly don't know how to do that with standard
compiler annotations. Writing a custom static analysis check for that
might be feasible. But I also don't want to focus too much on this
nsresult+outparam case, because it's just one case of many, and I feel
like we're already in the weeds :)

Nick
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to