From: Tom Care Date: Wed, 11 Aug 2010 23:36:58 +0000 (+0000) Subject: Fix a bug where child statements could not be identified as being in a CFGBlock in... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5049d83fd83bd0dc8b19e94b5c05f38ea64d7ce;p=clang Fix a bug where child statements could not be identified as being in a CFGBlock in CFGStmtMap::getBlock. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110881 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/CFGStmtMap.cpp b/lib/Analysis/CFGStmtMap.cpp index deca741440..965eca1b3c 100644 --- a/lib/Analysis/CFGStmtMap.cpp +++ b/lib/Analysis/CFGStmtMap.cpp @@ -31,7 +31,7 @@ CFGBlock *CFGStmtMap::getBlock(Stmt *S) { // If 'S' isn't in the map, walk the ParentMap to see if one of its ancestors // is in the map. while (X) { - SMap::iterator I = SM->find(S); + SMap::iterator I = SM->find(X); if (I != SM->end()) { CFGBlock *B = I->second; // Memoize this lookup.