Changes in / [9151fcb:5684736]
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r9151fcb r5684736 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 743 737 type->set_lvalue( true ); 744 expr-> result = type;738 expr->set_result( type ); 745 739 this->node = expr; 746 740 return nullptr; … … 788 782 assert (!rslt->isType); 789 783 } 790 else { 791 assert(node->type); 784 if (node->type) { 792 785 rslt = new SizeofExpr( 793 786 get<Type>().accept1(node->type) … … 810 803 assert (!rslt->isType); 811 804 } 812 else { 813 assert(node->type); 805 if (node->type) { 814 806 rslt = new AlignofExpr( 815 807 get<Type>().accept1(node->type) … … 2157 2149 ); 2158 2150 2159 visitBaseExpr _SkipResultType( old,2151 visitBaseExpr( old, 2160 2152 expr 2161 2153 ); … … 2163 2155 expr->var = GET_ACCEPT_1(var, DeclWithType); 2164 2156 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 }2170 2157 add_qualifiers( expr->result, ast::CV::Lvalue ); 2171 2158 this->node = expr; -
src/GenPoly/Lvalue.cc
r9151fcb r5684736 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 lists200 if(i == end) { return appExpr; }201 198 for ( auto p : unsafe_group_iterate( appExpr->args, ftype->parameters ) ) { 202 199 if (i == end) break;
Note: See TracChangeset
for help on using the changeset viewer.