Changes in src/AST/Convert.cpp [546e712:0b73f0c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r546e712 r0b73f0c 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;
Note: See TracChangeset
for help on using the changeset viewer.