r178264 - Use early return in printing logic. Minor cleanup.

Ted Kremenek kremenek at apple.com
Thu Mar 28 11:43:18 PDT 2013


Author: kremenek
Date: Thu Mar 28 13:43:18 2013
New Revision: 178264

URL: http://llvm.org/viewvc/llvm-project?rev=178264&view=rev
Log:
Use early return in printing logic.  Minor cleanup.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp?rev=178264&r1=178263&r2=178264&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp Thu Mar 28 13:43:18 2013
@@ -3661,8 +3661,10 @@ void RetainCountChecker::printState(raw_
 
   RefBindingsTy B = State->get<RefBindings>();
 
-  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 << " : ";





More information about the cfe-commits mailing list