summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-11-14 17:55:00 +0000
committerJordan Rose <jordan_rose@apple.com>2013-11-14 17:55:00 +0000
commitdba269286531073ddfc73b1b939501e7cb7cd177 (patch)
tree3d6c6f89dbbf8ee11ad25622908273880c1207dc /clang/lib/StaticAnalyzer/Checkers
parent28adfbb0d1507aa90c3a88c2b0268147aa04fd22 (diff)
downloadbcm5719-llvm-dba269286531073ddfc73b1b939501e7cb7cd177.tar.gz
bcm5719-llvm-dba269286531073ddfc73b1b939501e7cb7cd177.zip
[analyzer] Treat MSVC's _wassert as noreturn.
This makes sure the analyzer actually honors assert() in an MSVC project. Patch by Anders Montonen! llvm-svn: 194716
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
index d7a880c6604..0e1064ef53a 100644
--- a/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
@@ -64,6 +64,9 @@ void NoReturnFunctionChecker::checkPostCall(const CallEvent &CE,
.Case("assfail", true)
.Case("db_error", true)
.Case("__assert", true)
+ // For the purpose of static analysis, we do not care that
+ // this MSVC function will return if the user decides to continue.
+ .Case("_wassert", true)
.Case("__assert_rtn", true)
.Case("__assert_fail", true)
.Case("dtrace_assfail", true)
OpenPOWER on IntegriCloud