<div dir="ltr">+Jordan - do you know much about the NoReturnFunctionChecker and whether it would make sense to handle _wassert there? Is there some other solution that would properly handle this implementation of 'assert' in the static analyzer?</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 3:01 AM, Anders Montonen <span dir="ltr"><<a href="mailto:Anders.Montonen@iki.fi" target="_blank">Anders.Montonen@iki.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to use Clang's static analyzer with a Visual Studio project, but I'm running into the problem that in Microsoft's headers the _wassert function is not declared as noreturn, which leads to lots of false positives. The assert declaration looks like so:<br>

<br>
#undef  assert<br>
<br>
#define assert(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_<u></u>Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )<br>
<br>
_CRTIMP void __cdecl _wassert(_In_z_ const wchar_t * _Message, _In_z_ const wchar_t *_File, _In_ unsigned _Line);<br>
<br>
Looking through the source code there seems to be an "--assert=" flag, but it also seems not to be used.<br>
<br>
Any advice how to handle this? Since the mingw headers (where the function is properly annotated) differ enough from Microsoft's that it would require modifications in the source code, I would prefer to not have to include them in the mix.<br>

<br>
I noticed that there's a number of hardcoded function names in the static analyzer's NoReturnFunctionChecker, should _wassert be added to this list?<br>
<br>
-a<br>
<br>
______________________________<u></u>_________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@cs.uiuc.edu" target="_blank">cfe-users@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-users</a><br>
</blockquote></div><br></div>