[cfe-commits] r129394 - /cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp

Ted Kremenek kremenek at apple.com
Tue Apr 12 14:47:02 PDT 2011


Author: kremenek
Date: Tue Apr 12 16:47:02 2011
New Revision: 129394

URL: http://llvm.org/viewvc/llvm-project?rev=129394&view=rev
Log:
Fix another IdempotentOperationsChecker corner case when determining if an active block on the worklist
impacts the results of the check.

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

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp?rev=129394&r1=129393&r2=129394&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp Tue Apr 12 16:47:02 2011
@@ -588,7 +588,7 @@
       if (!B)
         return true;
       
-      return CRA.isReachable(B, TargetBlock);
+      return B == TargetBlock || CRA.isReachable(B, TargetBlock);
     }
   };
   VisitWL visitWL(AC->getCFGStmtMap(), CB, *CRA);





More information about the cfe-commits mailing list