From db70b5295e72172c52f5eb1eb934175239c3887f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 28 Mar 2013 18:43:18 +0000 Subject: Use early return in printing logic. Minor cleanup. llvm-svn: 178264 --- clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib') diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 856463a981a..32a0852ee36 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -3661,8 +3661,10 @@ void RetainCountChecker::printState(raw_ostream &Out, ProgramStateRef State, RefBindingsTy B = State->get(); - if (!B.isEmpty()) - Out << Sep << NL; + if (B.isEmpty()) + return; + + Out << Sep << NL; for (RefBindingsTy::iterator I = B.begin(), E = B.end(); I != E; ++I) { Out << I->first << " : "; -- cgit v1.2.3