diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-18 00:30:20 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-18 00:30:20 +0000 |
commit | a97a99736e7f0160a8a872850e8f8775908d7c31 (patch) | |
tree | 522406d401f8b314852b12e8e846938756860977 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 9f61f8a966aafe0c0aca09a05bae541ee6a5ba94 (diff) | |
download | bcm5719-llvm-a97a99736e7f0160a8a872850e8f8775908d7c31.tar.gz bcm5719-llvm-a97a99736e7f0160a8a872850e8f8775908d7c31.zip |
[analyzer] Treat @throw as a sink (stop processing).
The CFG approximates @throw as a return statement, but that's not good
enough in inlined functions. Moreover, since Objective-C exceptions are
usually considered fatal, we should be suppressing leak warnings like we
do for calls to noreturn functions (like abort()).
The comments indicate that we were probably intending to do this all along;
it may have been inadvertantly changed during a refactor at one point.
llvm-svn: 162156
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index b0435fb562e..e7b009a176e 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -889,7 +889,7 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, case Stmt::ObjCAtThrowStmtClass: { // FIXME: This is not complete. We basically treat @throw as // an abort. - Bldr.generateNode(S, Pred, Pred->getState()); + Bldr.generateNode(S, Pred, Pred->getState(), /*IsSink=*/true); break; } |