dead code: fix for if-else statements
This commit is contained in:
@@ -534,11 +534,12 @@ void removeDeadCode(SgStatement* func,
|
||||
}
|
||||
else if (var == IF_NODE)
|
||||
{
|
||||
SgStatement* ifS = st->lexNext();
|
||||
while (ifS->variant() == ELSEIF_NODE)
|
||||
SgStatement* ifS = st;
|
||||
while (ifS->lexNext()->variant() == ELSEIF_NODE)
|
||||
ifS = ifS->lexNext();
|
||||
|
||||
SgStatement* lastNode = st->lastNodeOfStmt();
|
||||
SgStatement* lastNode = ifS->lastNodeOfStmt();
|
||||
ifS = ifS->lexNext();
|
||||
|
||||
while (ifS->variant() == CONTROL_END && ifS != lastNode)
|
||||
ifS = ifS->lexNext();
|
||||
|
||||
Reference in New Issue
Block a user