Changeset 417117e for src/AST/Expr.cpp


Ignore:
Timestamp:
Jun 28, 2019, 3:50:21 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
03bf5c8
Parents:
55b6476
Message:

Assorted cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r55b6476 r417117e  
    2020#include <vector>
    2121
     22#include "Eval.hpp"                // for call
    2223#include "GenericSubstitution.hpp"
    2324#include "Stmt.hpp"
     
    5152        assert( arg );
    5253
    53         UntypedExpr * ret = new UntypedExpr{
    54                 loc, new NameExpr{loc, "*?"}, std::vector<ptr<Expr>>{ ptr<Expr>{ arg } }
    55         };
     54        UntypedExpr * ret = call( loc, "*?", arg );
    5655        if ( const Type * ty = arg->result ) {
    5756                const Type * base = InitTweak::getPointerBase( ty );
     
    7473        assert( lhs && rhs );
    7574
    76         UntypedExpr * ret = new UntypedExpr{
    77                 loc, new NameExpr{loc, "?=?"}, std::vector<ptr<Expr>>{ ptr<Expr>{ lhs }, ptr<Expr>{ rhs } }
    78         };
     75        UntypedExpr * ret = call( loc, "?=?", lhs, rhs );
    7976        if ( lhs->result && rhs->result ) {
    8077                // if both expressions are typed, assumes that this assignment is a C bitwise assignment,
Note: See TracChangeset for help on using the changeset viewer.