Changeset 7ad47df


Ignore:
Timestamp:
May 4, 2022, 12:25:15 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
d1c47c2
Parents:
8197ca5
Message:

added else stmt to loops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/MultiLevelExit.cpp

    r8197ca5 r7ad47df  
    594594                }
    595595
     596                // check if loop node and if so add else clause if it exists
     597                const WhileDoStmt * whilePtr = dynamic_cast<const WhileDoStmt *>(kid.get());
     598                if ( whilePtr && whilePtr->else_) ret.push_back(whilePtr->else_);
     599                const ForStmt * forPtr = dynamic_cast<const ForStmt *>(kid.get());
     600                if ( forPtr && forPtr->else_) ret.push_back(forPtr->else_);
     601
    596602                if ( ! break_label.empty() ) {
    597603                        ret.push_back( labelledNullStmt( ret.back()->location, break_label ) );
Note: See TracChangeset for help on using the changeset viewer.