]> granicus.if.org Git - clang/commitdiff
Fix another IdempotentOperationsChecker corner case when determining if an active...
authorTed Kremenek <kremenek@apple.com>
Tue, 12 Apr 2011 21:47:02 +0000 (21:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 12 Apr 2011 21:47:02 +0000 (21:47 +0000)
impacts the results of the check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129394 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp

index 3c8d45ee2df0ddc901a8e33806d0a8b5376f511b..4f4aabcf632a8c01a0af9d1c293f57cc698a115e 100644 (file)
@@ -588,7 +588,7 @@ IdempotentOperationChecker::pathWasCompletelyAnalyzed(AnalysisContext *AC,
       if (!B)
         return true;
       
-      return CRA.isReachable(B, TargetBlock);
+      return B == TargetBlock || CRA.isReachable(B, TargetBlock);
     }
   };
   VisitWL visitWL(AC->getCFGStmtMap(), CB, *CRA);