- Timestamp:
- Jun 7, 2019, 2:54:41 PM (6 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:
- be8518f
- Parents:
- 4e5e6cc (diff), 9151fcb (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
r4e5e6cc ref75948 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.