[PATCH] Add _wassert to known noreturn functions
Anders Montonen
Anders.Montonen at iki.fi
Mon Nov 11 12:18:05 PST 2013
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)
More information about the cfe-commits
mailing list