Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/StatementNode.cc

    r6d49ea3 r936e9f4  
    1010// Created On       : Sat May 16 14:59:41 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 17 16:01:31 2017
    13 // Update Count     : 345
     12// Last Modified On : Wed Aug 16 16:39:43 2017
     13// Update Count     : 340
    1414//
    1515
     
    2424#include "SynTree/Expression.h"    // for Expression, ConstantExpr
    2525#include "SynTree/Label.h"         // for Label, noLabels
    26 #include "SynTree/Declaration.h"
    2726#include "SynTree/Statement.h"     // for Statement, BranchStmt, CaseStmt
    2827#include "parserutility.h"         // for notZeroExpr
     
    9998        } // if
    10099
    101         Expression * cond = ctl->condition ? maybeMoveBuild< Expression >(ctl->condition) : new VariableExpr( dynamic_cast<DeclarationWithType *>( dynamic_cast<DeclStmt *>( init.back() )->decl ) );
    102         delete ctl;
    103         return new IfStmt( noLabels, notZeroExpr( cond ), thenb, elseb, init );
     100        return new IfStmt( noLabels, notZeroExpr(
     101                                                           /*ctl->condition
     102                                                                 ?*/ maybeMoveBuild< Expression >(ctl->condition)
     103                                                                 /*: new VariableExpr( init.end() )*/ )
     104                                                   , thenb, elseb );
     105        // ret->initialization = init;
     106        // delete ctl;
     107        // assert( ret );
     108        // return ret;
    104109}
    105110
Note: See TracChangeset for help on using the changeset viewer.