Changes in src/SynTree/CommaExpr.cc [b4f8808:14388c1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/CommaExpr.cc
rb4f8808 r14388c1 23 23 CommaExpr::CommaExpr( Expression *arg1, Expression *arg2 ) 24 24 : Expression(), arg1( arg1 ), arg2( arg2 ) { 25 // xxx - result of a comma expression is never an lvalue, so should set lvalue 26 // to false on all result types. Actually doing this causes some strange things 27 // to happen in later passes (particularly, Specialize, Lvalue, and Box). This needs to be looked into. 25 28 set_result( maybeClone( arg2->get_result() ) ); 29 // get_type->set_isLvalue( false ); 26 30 } 27 31 … … 36 40 37 41 bool CommaExpr::get_lvalue() const { 38 // This is wrong by C, but the current implementation uses it. 39 // (ex: Specialize, Lvalue and Box) 40 return arg2->get_lvalue(); 42 // xxx - as above, shouldn't be an lvalue but that information is used anyways. 43 return result->get_lvalue(); 41 44 } 42 45
Note: See TracChangeset
for help on using the changeset viewer.