<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 9, 2014 at 4:49 AM, Jakub Jelinek <span dir="ltr"><<a href="mailto:jakub@redhat.com" target="_blank">jakub@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Sep 08, 2014 at 01:32:02PM -0700, Alexey Samsonov wrote:<br>
</span><span class="">> OK. I've submitted the patches to Clang and UBSan runtime which implement<br>
> -fsanitize=nonnull-attribute and -fsanitize=returns-nonnull-attribute (the<br>
> last<br>
> commit is r217400). I've added source locations of attribute declarations to<br>
> the static data passed in UBSan handlers to print them in the error<br>
> reports: it makes<br>
> sense to actually show user the declaration which forbids passing/returning<br>
> null pointer.<br>
> This location is also added to returns-nonull attribute, because the<br>
> attribute might be<br>
> declared far from the actual function definition with incorrect<br>
> return-statement.<br>
<br>
</span>Also:<br>
RECOVERABLE(nonnull_arg, NonNullArgData *Data);<br>
shouldn't have the trailing semicolon, it results in GCC pedantic warning<br>
about it (no other RECOVERABLE uses have the trailing semicolon).<br></blockquote><div><br></div><div>Yeah, I've noticed and fixed it in LLVM r217407.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
        Jakub<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div></div>