Ignore:
Timestamp:
Jun 7, 2019, 4:15:03 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r60aaa51d r05d55ff  
    736736                expr->var = get<DeclarationWithType>().accept1(node->var);
    737737                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
    738744                type->set_lvalue( true );
    739                 expr->set_result( type );
     745                expr->result = type ;
    740746                this->node = expr;
    741747                return nullptr;
     
    783789                        assert (!rslt->isType);
    784790                }
    785                 if (node->type) {
     791                else {
     792                        assert(node->type);
    786793                        rslt = new SizeofExpr(
    787794                                get<Type>().accept1(node->type)
     
    804811                        assert (!rslt->isType);
    805812                }
    806                 if (node->type) {
     813                else {
     814                        assert(node->type);
    807815                        rslt = new AlignofExpr(
    808816                                get<Type>().accept1(node->type)
     
    21642172                );
    21652173
    2166                 visitBaseExpr( old,
     2174                visitBaseExpr_SkipResultType( old,
    21672175                        expr
    21682176                );
     
    21702178                expr->var = GET_ACCEPT_1(var, DeclWithType);
    21712179                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                }
    21722185                add_qualifiers( expr->result, ast::CV::Lvalue );
    21732186                this->node = expr;
Note: See TracChangeset for help on using the changeset viewer.