diff options
author | John McCall <rjmccall@apple.com> | 2011-07-07 06:58:02 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-07 06:58:02 +0000 |
commit | 7e5e5f4cc36fe50f46ad76dca7a266434c94f475 (patch) | |
tree | 58c8d913ddf2c68a1558a3a0792b3288ee0d04a1 /lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | 72ac120023abb73f3ff9386e193fed55fa9a96e2 (diff) |
In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.
As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.
rdar://problem/9504800
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp index 4aa5e350bc..fbaa8490e9 100644 --- a/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -2194,7 +2194,8 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, // The analyzer doesn't do anything special with these casts, // since it understands retain/release semantics already. case CK_ObjCProduceObject: - case CK_ObjCConsumeObject: // Fall-through. + case CK_ObjCConsumeObject: + case CK_ObjCReclaimReturnedObject: // Fall-through. // True no-ops. case CK_NoOp: case CK_FunctionToPointerDecay: { |