Fix another IdempotentOperationsChecker corner case when determining if an active block on the worklist
impacts the results of the check.
llvm-svn: 129394
diff --git a/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
index 3c8d45e..4f4aabc 100644
--- a/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp
@@ -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);