Changeset b2152e7a for src/SynTree


Ignore:
Timestamp:
Jun 2, 2015, 1:42:10 PM (10 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
d939274
Parents:
2b6c1e0
Message:

fix MLE hack that puts a dangling break statement outside of a case statement in a switch

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Statement.cc

    r2b6c1e0 rb2152e7a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 15:41:13 2015
    13 // Update Count     : 8
     12// Last Modified On : Tue Jun 02 13:07:09 2015
     13// Update Count     : 14
    1414//
    1515
     
    124124CaseStmt::~CaseStmt() {
    125125        delete condition;
     126}
     127
     128CaseStmt * CaseStmt::makeDefault( std::list<Label> labels, std::list<Statement *> branches ) {
     129        return new CaseStmt( labels, 0, branches, true );
    126130}
    127131
  • src/SynTree/Statement.h

    r2b6c1e0 rb2152e7a  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed May 27 15:40:43 2015
    13 // Update Count     : 5
     12// Last Modified On : Tue Jun 02 13:07:25 2015
     13// Update Count     : 13
    1414//
    1515
     
    149149              std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
    150150        virtual ~CaseStmt();
     151
     152        static CaseStmt * makeDefault( std::list<Label> labels = std::list<Label>(),
     153                std::list<Statement *> stmts = std::list<Statement *>() );
    151154
    152155        bool isDefault() { return _isDefault; }
Note: See TracChangeset for help on using the changeset viewer.