Changeset 05d55ff for src/AST/Convert.cpp
- Timestamp:
- Jun 7, 2019, 4:15:03 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2d11663, 46438e4
- Parents:
- 60aaa51d (diff), be8518f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r60aaa51d r05d55ff 736 736 expr->var = get<DeclarationWithType>().accept1(node->var); 737 737 Type * type = expr->var->get_type()->clone(); 738 if(FunctionType * ft = dynamic_cast<FunctionType*>(type)) { 739 if(node->result.as<ast::PointerType>()) { 740 type = new PointerType({}, ft); 741 } 742 } 743 738 744 type->set_lvalue( true ); 739 expr-> set_result( type );745 expr->result = type ; 740 746 this->node = expr; 741 747 return nullptr; … … 783 789 assert (!rslt->isType); 784 790 } 785 if (node->type) { 791 else { 792 assert(node->type); 786 793 rslt = new SizeofExpr( 787 794 get<Type>().accept1(node->type) … … 804 811 assert (!rslt->isType); 805 812 } 806 if (node->type) { 813 else { 814 assert(node->type); 807 815 rslt = new AlignofExpr( 808 816 get<Type>().accept1(node->type) … … 2164 2172 ); 2165 2173 2166 visitBaseExpr ( old,2174 visitBaseExpr_SkipResultType( old, 2167 2175 expr 2168 2176 ); … … 2170 2178 expr->var = GET_ACCEPT_1(var, DeclWithType); 2171 2179 expr->result = expr->var->get_type(); 2180 if(const ast::FunctionType * ft = expr->result.as<ast::FunctionType>()) { 2181 if(dynamic_cast<PointerType *>(old->result)) { 2182 expr->result = new ast::PointerType(ft); 2183 } 2184 } 2172 2185 add_qualifiers( expr->result, ast::CV::Lvalue ); 2173 2186 this->node = expr;
Note: See TracChangeset
for help on using the changeset viewer.