dead code: removing of if-else statement #37

Merged
Alexander_KS merged 2 commits from dead_code_removing into master 2024-04-06 15:01:12 +00:00
Showing only changes of commit 5f3da5d708 - Show all commits

View File

@@ -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();