diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-01-07 21:39:41 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-01-07 21:39:41 +0000 |
commit | 6ad4cb4eca2094a3fcde0a90c118632de1b4f939 (patch) | |
tree | c526e85b0c0e02e63d7d64b1c0bb64e940ac59e9 /clang/lib/StaticAnalyzer | |
parent | 894843cb4e47366dee16ae10edb09a337a6db3ae (diff) | |
download | bcm5719-llvm-6ad4cb4eca2094a3fcde0a90c118632de1b4f939.tar.gz bcm5719-llvm-6ad4cb4eca2094a3fcde0a90c118632de1b4f939.zip |
[analyzer] Remove unused ARCNotOwnedSymbol retain count return effect.
RetainCountChecker has to track returned object values to know if they are
retained or not. Under ARC, even methods that return +1 are tracked by the
system and should be treated as +0. However, this effect behaves exactly
like NotOwned(ObjC), i.e. a generic Objective-C method that actually returns
+0, so we don't need a special case for it.
No functionality change.
llvm-svn: 198709
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index c51b7af4453..1108b090c1b 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -652,11 +652,11 @@ public: AF(BPAlloc), ScratchArgs(AF.getEmptyMap()), ObjCAllocRetE(gcenabled ? RetEffect::MakeGCNotOwned() - : (usesARC ? RetEffect::MakeARCNotOwned() + : (usesARC ? RetEffect::MakeNotOwned(RetEffect::ObjC) : RetEffect::MakeOwned(RetEffect::ObjC, true))), ObjCInitRetE(gcenabled ? RetEffect::MakeGCNotOwned() - : (usesARC ? RetEffect::MakeARCNotOwned() + : (usesARC ? RetEffect::MakeNotOwned(RetEffect::ObjC) : RetEffect::MakeOwnedWhenTrackedReceiver())) { InitializeClassMethodSummaries(); InitializeMethodSummaries(); @@ -2861,7 +2861,6 @@ void RetainCountChecker::checkSummary(const RetainSummary &Summ, } case RetEffect::GCNotOwnedSymbol: - case RetEffect::ARCNotOwnedSymbol: case RetEffect::NotOwnedSymbol: { const Expr *Ex = CallOrMsg.getOriginExpr(); SymbolRef Sym = CallOrMsg.getReturnValue().getAsSymbol(); |