Changes in / [5684736:9151fcb]
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r5684736 r9151fcb 735 735 expr->var = get<DeclarationWithType>().accept1(node->var); 736 736 Type * type = expr->var->get_type()->clone(); 737 if(FunctionType * ft = dynamic_cast<FunctionType*>(type)) { 738 if(node->result.as<ast::PointerType>()) { 739 type = new PointerType({}, ft); 740 } 741 } 742 737 743 type->set_lvalue( true ); 738 expr-> set_result( type );744 expr->result = type ; 739 745 this->node = expr; 740 746 return nullptr; … … 782 788 assert (!rslt->isType); 783 789 } 784 if (node->type) { 790 else { 791 assert(node->type); 785 792 rslt = new SizeofExpr( 786 793 get<Type>().accept1(node->type) … … 803 810 assert (!rslt->isType); 804 811 } 805 if (node->type) { 812 else { 813 assert(node->type); 806 814 rslt = new AlignofExpr( 807 815 get<Type>().accept1(node->type) … … 2149 2157 ); 2150 2158 2151 visitBaseExpr ( old,2159 visitBaseExpr_SkipResultType( old, 2152 2160 expr 2153 2161 ); … … 2155 2163 expr->var = GET_ACCEPT_1(var, DeclWithType); 2156 2164 expr->result = expr->var->get_type(); 2165 if(const ast::FunctionType * ft = expr->result.as<ast::FunctionType>()) { 2166 if(dynamic_cast<PointerType *>(old->result)) { 2167 expr->result = new ast::PointerType(ft); 2168 } 2169 } 2157 2170 add_qualifiers( expr->result, ast::CV::Lvalue ); 2158 2171 this->node = expr; -
src/GenPoly/Lvalue.cc
r5684736 r9151fcb 196 196 unsigned int i = 0; 197 197 const unsigned int end = ftype->parameters.size(); 198 199 /// The for loop may eagerly dereference the iterators and fail on empty lists 200 if(i == end) { return appExpr; } 198 201 for ( auto p : unsafe_group_iterate( appExpr->args, ftype->parameters ) ) { 199 202 if (i == end) break;
Note: See TracChangeset
for help on using the changeset viewer.