diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-11-24 00:54:37 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-11-24 00:54:37 +0000 |
commit | 3baf672378f105602d2b12f03f00277ae1936fe9 (patch) | |
tree | 3aff1c30c5f276162a7544f9b9786275beea410a /lib/Checker/CFRefCount.cpp | |
parent | 97ab3ac0889b4956d518a145317e2d951428ba34 (diff) |
Adjust method calls to reflect name changes in
ImmutableSet/ImmtuableMap/ImmutableList APIs.
Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/CFRefCount.cpp')
-rw-r--r-- | lib/Checker/CFRefCount.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/Checker/CFRefCount.cpp b/lib/Checker/CFRefCount.cpp index 8d1f4ba053..80cbfc50ad 100644 --- a/lib/Checker/CFRefCount.cpp +++ b/lib/Checker/CFRefCount.cpp @@ -762,7 +762,7 @@ private: } void addPanicSummary(const char* Cls, ...) { - RetainSummary* Summ = getPersistentSummary(AF.GetEmptyMap(), + RetainSummary* Summ = getPersistentSummary(AF.getEmptyMap(), RetEffect::MakeNoRet(), DoNothing, DoNothing, true); va_list argp; @@ -776,12 +776,12 @@ public: RetainSummaryManager(ASTContext& ctx, bool gcenabled) : Ctx(ctx), CFDictionaryCreateII(&ctx.Idents.get("CFDictionaryCreate")), - GCEnabled(gcenabled), AF(BPAlloc), ScratchArgs(AF.GetEmptyMap()), + GCEnabled(gcenabled), AF(BPAlloc), ScratchArgs(AF.getEmptyMap()), ObjCAllocRetE(gcenabled ? RetEffect::MakeGCNotOwned() : RetEffect::MakeOwned(RetEffect::ObjC, true)), ObjCInitRetE(gcenabled ? RetEffect::MakeGCNotOwned() : RetEffect::MakeOwnedWhenTrackedReceiver()), - DefaultSummary(AF.GetEmptyMap() /* per-argument effects (none) */, + DefaultSummary(AF.getEmptyMap() /* per-argument effects (none) */, RetEffect::MakeNoRet() /* return effect */, MayEscape, /* default argument effect */ DoNothing /* receiver effect */), @@ -881,7 +881,7 @@ RetainSummaryManager::~RetainSummaryManager() {} ArgEffects RetainSummaryManager::getArgEffects() { ArgEffects AE = ScratchArgs; - ScratchArgs = AF.GetEmptyMap(); + ScratchArgs = AF.getEmptyMap(); return AE; } @@ -967,13 +967,13 @@ RetainSummary* RetainSummaryManager::getSummary(const FunctionDecl* FD) { // FIXES: <rdar://problem/6326900> // This should be addressed using a API table. This strcmp is also // a little gross, but there is no need to super optimize here. - ScratchArgs = AF.Add(ScratchArgs, 1, DecRef); + ScratchArgs = AF.add(ScratchArgs, 1, DecRef); S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); } else if (FName == "IOServiceAddNotification" || FName == "IOServiceAddMatchingNotification") { // Part of <rdar://problem/6961230>. (IOKit) // This should be addressed using a API table. - ScratchArgs = AF.Add(ScratchArgs, 2, DecRef); + ScratchArgs = AF.add(ScratchArgs, 2, DecRef); S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); } else if (FName == "CVPixelBufferCreateWithBytes") { // FIXES: <rdar://problem/7283567> @@ -982,14 +982,14 @@ RetainSummary* RetainSummaryManager::getSummary(const FunctionDecl* FD) { // a callback and doing full IPA to make sure this is done correctly. // FIXME: This function has an out parameter that returns an // allocated object. - ScratchArgs = AF.Add(ScratchArgs, 7, StopTracking); + ScratchArgs = AF.add(ScratchArgs, 7, StopTracking); S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); } else if (FName == "CGBitmapContextCreateWithData") { // FIXES: <rdar://problem/7358899> // Eventually this can be improved by recognizing that 'releaseInfo' // passed to CGBitmapContextCreateWithData is released via // a callback and doing full IPA to make sure this is done correctly. - ScratchArgs = AF.Add(ScratchArgs, 8, StopTracking); + ScratchArgs = AF.add(ScratchArgs, 8, StopTracking); S = getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF, true), DoNothing, DoNothing); } else if (FName == "CVPixelBufferCreateWithPlanarBytes") { @@ -998,7 +998,7 @@ RetainSummary* RetainSummaryManager::getSummary(const FunctionDecl* FD) { // buffer passed to CVPixelBufferCreateWithPlanarBytes is released // via a callback and doing full IPA to make sure this is done // correctly. - ScratchArgs = AF.Add(ScratchArgs, 12, StopTracking); + ScratchArgs = AF.add(ScratchArgs, 12, StopTracking); S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); } @@ -1129,19 +1129,19 @@ RetainSummaryManager::getUnarySummary(const FunctionType* FT, switch (func) { case cfretain: { - ScratchArgs = AF.Add(ScratchArgs, 0, IncRef); + ScratchArgs = AF.add(ScratchArgs, 0, IncRef); return getPersistentSummary(RetEffect::MakeAlias(0), DoNothing, DoNothing); } case cfrelease: { - ScratchArgs = AF.Add(ScratchArgs, 0, DecRef); + ScratchArgs = AF.add(ScratchArgs, 0, DecRef); return getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing); } case cfmakecollectable: { - ScratchArgs = AF.Add(ScratchArgs, 0, MakeCollectable); + ScratchArgs = AF.add(ScratchArgs, 0, MakeCollectable); return getPersistentSummary(RetEffect::MakeAlias(0),DoNothing, DoNothing); } @@ -1156,8 +1156,8 @@ RetainSummaryManager::getCFSummaryCreateRule(const FunctionDecl* FD) { assert (ScratchArgs.isEmpty()); if (FD->getIdentifier() == CFDictionaryCreateII) { - ScratchArgs = AF.Add(ScratchArgs, 1, DoNothingByRef); - ScratchArgs = AF.Add(ScratchArgs, 2, DoNothingByRef); + ScratchArgs = AF.add(ScratchArgs, 1, DoNothingByRef); + ScratchArgs = AF.add(ScratchArgs, 2, DoNothingByRef); } return getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF, true)); @@ -1263,7 +1263,7 @@ RetainSummaryManager::getCommonMethodSummary(const ObjCMethodDecl* MD, if (ParmVarDecl *PD = *I) { QualType Ty = Ctx.getCanonicalType(PD->getType()); if (Ty.getLocalUnqualifiedType() == Ctx.VoidPtrTy) - ScratchArgs = AF.Add(ScratchArgs, i, StopTracking); + ScratchArgs = AF.add(ScratchArgs, i, StopTracking); } } @@ -1432,7 +1432,7 @@ void RetainSummaryManager::InitializeClassMethodSummaries() { getPersistentSummary(RetEffect::MakeNotOwned(RetEffect::ObjC))); // Create the [NSAutoreleasePool addObject:] summary. - ScratchArgs = AF.Add(ScratchArgs, 0, Autorelease); + ScratchArgs = AF.add(ScratchArgs, 0, Autorelease); addClassMethSummary("NSAutoreleasePool", "addObject", getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, Autorelease)); @@ -1627,10 +1627,10 @@ static const GRState * SendAutorelease(const GRState *state, if (cnts) { const unsigned *cnt = (*cnts).lookup(sym); - newCnts = F.Add(*cnts, sym, cnt ? *cnt + 1 : 1); + newCnts = F.add(*cnts, sym, cnt ? *cnt + 1 : 1); } else - newCnts = F.Add(F.GetEmptyMap(), sym, 1); + newCnts = F.add(F.getEmptyMap(), sym, 1); return state->set<AutoreleasePoolContents>(pool, newCnts); } @@ -3016,7 +3016,7 @@ const GRState* CFRefCount::EvalAssume(const GRState *state, // If this is the case, stop tracking the symbol. if (state->getSymVal(I.getKey())) { changed = true; - B = RefBFactory.Remove(B, I.getKey()); + B = RefBFactory.remove(B, I.getKey()); } } @@ -3345,7 +3345,7 @@ void CFRefCount::EvalDeadSymbols(ExplodedNodeSet& Dst, RefBindings::Factory& F = state->get_context<RefBindings>(); for (SymbolReaper::dead_iterator I = SymReaper.dead_begin(), - E = SymReaper.dead_end(); I!=E; ++I) B = F.Remove(B, *I); + E = SymReaper.dead_end(); I!=E; ++I) B = F.remove(B, *I); state = state->set<RefBindings>(B); Builder.MakeNode(Dst, S, Pred, state); |