<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Yes, sorry, we discussed this on the cfe-users list: for the analyzer, we care more about reading the intent of the code from the assertions than from exploring the “continue anyway” case.</div><div><br></div><div>Anders, please do add a test. You can add it to test/Analysis/NoReturn.m with a forward-declaration of _wassert.</div><div><br></div><div>Jordan</div><div><br></div><br><div><div>On Nov 11, 2013, at 19:37 , Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">True, I forgot that. However, it's probably useful for the static analyzer to consider it noreturn for analysis purposes.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 7:32 PM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_wassert can emit a warning and return control depending on the flag /<br>
dialog input, no?<br>
<br>
Alp.<br>
<div class="im"><br>
On 12/11/2013 00:55, Reid Kleckner wrote:<br>
> Seems reasonable, but can you add a test?<br>
><br>
><br>
> On Mon, Nov 11, 2013 at 12:18 PM, Anders Montonen<br>
</div><div class="im">> <<a href="mailto:Anders.Montonen@iki.fi">Anders.Montonen@iki.fi</a> <mailto:<a href="mailto:Anders.Montonen@iki.fi">Anders.Montonen@iki.fi</a>>> wrote:<br>
><br>
>     Microsoft's library headers do not annotate _wassert as being a<br>
>     noreturn function, causing analyzer false positives. Fix by adding<br>
>     it to NoReturnFunctionChecker's list of known noreturn functions.<br>
><br>
>     -a<br>
><br>
>     diff --git<br>
>     a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp<br>
>     b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp<br>
>     index d7a880c..1367021 100644<br>
>     --- a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp<br>
>     +++ b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp<br>
>     @@ -64,6 +64,7 @@ void<br>
>     NoReturnFunctionChecker::checkPostCall(const CallEvent &CE,<br>
>                  .Case("assfail", true)<br>
>                  .Case("db_error", true)<br>
>                  .Case("__assert", true)<br>
>     +            .Case("_wassert", true)<br>
>                  .Case("__assert_rtn", true)<br>
>                  .Case("__assert_fail", true)<br>
>                  .Case("dtrace_assfail", true)<br>
>     _______________________________________________<br>
>     cfe-commits mailing list<br>
</div>>     <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>><br>
>     <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<div class="HOEnZb"><div class="h5">><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
<a href="http://www.nuanti.com/" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</font></span></blockquote></div><br></div>
_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></body></html>