aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-11-13 05:12:26 +0000
committerTed Kremenek <kremenek@apple.com>2010-11-13 05:12:26 +0000
commited02366ddad2dd8e596fcf3257328f7aec2b86f9 (patch)
treee5c5a8fbc44e09396ab3d8c788a58f40e5d8a8c5
parent33d46268fb286fc43296f421ff835b085bb2c14f (diff)
Refine IdempotentOperationChecker::PathWasCompletelyAnalyzed() to also check
BlockEdges, BlockEntrances, and BlockExits for the target block value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118984 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Checker/IdempotentOperationChecker.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Checker/IdempotentOperationChecker.cpp b/lib/Checker/IdempotentOperationChecker.cpp
index eb6004ec05..0e23c2a031 100644
--- a/lib/Checker/IdempotentOperationChecker.cpp
+++ b/lib/Checker/IdempotentOperationChecker.cpp
@@ -582,6 +582,15 @@ bool IdempotentOperationChecker::PathWasCompletelyAnalyzed(
if (StmtPoint *SP = dyn_cast<StmtPoint>(&P)) {
B = CBM->getBlock(SP->getStmt());
}
+ else if (BlockEdge *BE = dyn_cast<BlockEdge>(&P)) {
+ B = BE->getDst();
+ }
+ else if (BlockEntrance *BEnt = dyn_cast<BlockEntrance>(&P)) {
+ B = BEnt->getBlock();
+ }
+ else if (BlockExit *BExit = dyn_cast<BlockExit>(&P)) {
+ B = BExit->getBlock();
+ }
if (!B)
return true;