From: Ted Kremenek Date: Sat, 13 Nov 2010 05:12:26 +0000 (+0000) Subject: Refine IdempotentOperationChecker::PathWasCompletelyAnalyzed() to also check X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed02366ddad2dd8e596fcf3257328f7aec2b86f9;p=clang 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 --- 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(&P)) { B = CBM->getBlock(SP->getStmt()); } + else if (BlockEdge *BE = dyn_cast(&P)) { + B = BE->getDst(); + } + else if (BlockEntrance *BEnt = dyn_cast(&P)) { + B = BEnt->getBlock(); + } + else if (BlockExit *BExit = dyn_cast(&P)) { + B = BExit->getBlock(); + } if (!B) return true;