diff options
author | Anna Zaks <ganna@apple.com> | 2011-10-26 21:06:34 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-10-26 21:06:34 +0000 |
commit | 0bd6b110e908892d4b5c8671a9f435a1d72ad16a (patch) | |
tree | f93bf142c8d42d80266a9b442c0e98244731d58d /lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | 1d08123ae7ba455fff8c61fb546521ef95496f08 (diff) |
[analyzer] Rename generateNode -> addTransition in CheckerContext
Also document addTransition methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 2f770e2220..5f062a73ff 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -51,7 +51,7 @@ public: ExplodedNode *MakeNode(const ProgramState *state, ExplodedNode *Pred, bool MarkAsSink = false) { - return C->generateNode(state, Pred, tag, MarkAsSink); + return C->addTransition(state, Pred, tag, MarkAsSink); } }; } // end anonymous namespace @@ -2515,7 +2515,7 @@ void RetainCountChecker::checkPostStmt(const BlockExpr *BE, state = state->scanReachableSymbols<StopTrackingCallback>(Regions.data(), Regions.data() + Regions.size()).getState(); - C.generateNode(state); + C.addTransition(state); } void RetainCountChecker::checkPostStmt(const CastExpr *CE, @@ -2555,7 +2555,7 @@ void RetainCountChecker::checkPostStmt(const CastExpr *CE, return; } - C.generateNode(state); + C.addTransition(state); } void RetainCountChecker::checkPostStmt(const CallExpr *CE, @@ -2768,7 +2768,7 @@ void RetainCountChecker::checkSummary(const RetainSummary &Summ, if (state == C.getState()) { NewNode = C.getPredecessor(); } else { - NewNode = C.generateNode(state); + NewNode = C.addTransition(state); } // Annotate the node with summary we used. @@ -3045,7 +3045,7 @@ bool RetainCountChecker::evalCall(const CallExpr *CE, CheckerContext &C) const { state = state->set<RefBindings>(Sym, *Binding); } - C.generateNode(state); + C.addTransition(state); return true; } @@ -3099,7 +3099,7 @@ void RetainCountChecker::checkPreStmt(const ReturnStmt *S, // Update the binding. state = state->set<RefBindings>(Sym, X); - ExplodedNode *Pred = C.generateNode(state); + ExplodedNode *Pred = C.addTransition(state); // At this point we have updated the state properly. // Everything after this is merely checking to see if the return value has @@ -3177,7 +3177,7 @@ void RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S, static SimpleProgramPointTag ReturnOwnLeakTag("RetainCountChecker : ReturnsOwnLeak"); - ExplodedNode *N = C.generateNode(state, Pred, &ReturnOwnLeakTag); + ExplodedNode *N = C.addTransition(state, Pred, &ReturnOwnLeakTag); if (N) { const LangOptions &LOpts = C.getASTContext().getLangOptions(); bool GCEnabled = C.isObjCGCEnabled(); @@ -3197,7 +3197,7 @@ void RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S, static SimpleProgramPointTag ReturnNotOwnedTag("RetainCountChecker : ReturnNotOwnedForOwned"); - ExplodedNode *N = C.generateNode(state, Pred, &ReturnNotOwnedTag); + ExplodedNode *N = C.addTransition(state, Pred, &ReturnNotOwnedTag); if (N) { if (!returnNotOwnedForOwned) returnNotOwnedForOwned.reset(new ReturnedNotOwnedForOwned()); @@ -3249,7 +3249,7 @@ void RetainCountChecker::checkBind(SVal loc, SVal val, const Stmt *S, // Otherwise, find all symbols referenced by 'val' that we are tracking // and stop tracking them. state = state->scanReachableSymbols<StopTrackingCallback>(val).getState(); - C.generateNode(state); + C.addTransition(state); } const ProgramState *RetainCountChecker::evalAssume(const ProgramState *state, @@ -3509,7 +3509,7 @@ void RetainCountChecker::checkDeadSymbols(SymbolReaper &SymReaper, B = F.remove(B, *I); state = state->set<RefBindings>(B); - C.generateNode(state, Pred); + C.addTransition(state, Pred); } //===----------------------------------------------------------------------===// |