diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 2ff8291258..b31c4a732d 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -3173,12 +3173,10 @@ void RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S, if (hasError) { // Generate an error node. state = state->set<RefBindings>(Sym, X); - StmtNodeBuilder &Builder = C.getNodeBuilder(); static SimpleProgramPointTag ReturnOwnLeakTag("RetainCountChecker : ReturnsOwnLeak"); - ExplodedNode *N = Builder.generateNode(S, state, Pred, - &ReturnOwnLeakTag); + ExplodedNode *N = C.generateNode(state, Pred, &ReturnOwnLeakTag); if (N) { const LangOptions &LOpts = C.getASTContext().getLangOptions(); bool GCEnabled = C.isObjCGCEnabled(); @@ -3195,12 +3193,10 @@ void RetainCountChecker::checkReturnWithRetEffect(const ReturnStmt *S, // Trying to return a not owned object to a caller expecting an // owned object. state = state->set<RefBindings>(Sym, X ^ RefVal::ErrorReturnedNotOwned); - StmtNodeBuilder &Builder = C.getNodeBuilder(); static SimpleProgramPointTag ReturnNotOwnedTag("RetainCountChecker : ReturnNotOwnedForOwned"); - ExplodedNode *N = Builder.generateNode(S, state, Pred, - &ReturnNotOwnedTag); + ExplodedNode *N = C.generateNode(state, Pred, &ReturnNotOwnedTag); if (N) { if (!returnNotOwnedForOwned) returnNotOwnedForOwned.reset(new ReturnedNotOwnedForOwned()); |