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 | 19275bdec34b2ec5d77a78c0ea393a45ab05e128 (patch) | |
tree | ba06598aa2ce10aac61547d45e6a0e25a33a7c3e /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 2bce86c836f6d6e00f7d2f92bc20e5250d5c4232 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162156 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index b0435fb562..e7b009a176 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/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; } |