[PATCH] Add _wassert to known noreturn functions
Alp Toker
alp at nuanti.com
Mon Nov 11 19:32:22 PST 2013
_wassert can emit a warning and return control depending on the flag /
dialog input, no?
Alp.
On 12/11/2013 00:55, Reid Kleckner wrote:
> Seems reasonable, but can you add a test?
>
>
> On Mon, Nov 11, 2013 at 12:18 PM, Anders Montonen
> <Anders.Montonen at iki.fi <mailto:Anders.Montonen at iki.fi>> wrote:
>
> Microsoft's library headers do not annotate _wassert as being a
> noreturn function, causing analyzer false positives. Fix by adding
> it to NoReturnFunctionChecker's list of known noreturn functions.
>
> -a
>
> diff --git
> a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
> b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
> index d7a880c..1367021 100644
> --- a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
> +++ b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
> @@ -64,6 +64,7 @@ void
> NoReturnFunctionChecker::checkPostCall(const CallEvent &CE,
> .Case("assfail", true)
> .Case("db_error", true)
> .Case("__assert", true)
> + .Case("_wassert", true)
> .Case("__assert_rtn", true)
> .Case("__assert_fail", true)
> .Case("dtrace_assfail", true)
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
--
http://www.nuanti.com
the browser experts
More information about the cfe-commits
mailing list