Changeset 3d618a0 for src/GenPoly


Ignore:
Timestamp:
Sep 9, 2024, 6:16:09 PM (13 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
aa14aafe
Parents:
d93b813 (diff), f5dbc8d (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

Location:
src/GenPoly
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cpp

    rd93b813 r3d618a0  
    19251925ast::Expr const * PolyGenericCalculator::postvisit(
    19261926                ast::SizeofExpr const * expr ) {
    1927         ast::Type const * type = expr->type ? expr->type : expr->expr->result;
    1928         ast::Expr const * gen = genSizeof( expr->location, type );
     1927        ast::Expr const * gen = genSizeof( expr->location, expr->type );
    19291928        return ( gen ) ? gen : expr;
    19301929}
     
    19321931ast::Expr const * PolyGenericCalculator::postvisit(
    19331932                ast::AlignofExpr const * expr ) {
    1934         ast::Type const * type = expr->type ? expr->type : expr->expr->result;
    1935         ast::Expr const * gen = genAlignof( expr->location, type );
     1933        ast::Expr const * gen = genAlignof( expr->location, expr->type );
    19361934        return ( gen ) ? gen : expr;
    19371935}
  • src/GenPoly/GenPoly.cpp

    rd93b813 r3d618a0  
    299299                ast::SizeofExpr const * r = as<ast::SizeofExpr>(rhs);
    300300
    301                 assert((l->type != nullptr) ^ (l->expr != nullptr));
    302                 assert((r->type != nullptr) ^ (r->expr != nullptr));
    303                 if ( !(l->type && r->type) ) return false;
     301                assert( l->type );
     302                assert( r->type );
    304303
    305304                // mutual recursion with type poly compatibility
  • src/GenPoly/Lvalue.cpp

    rd93b813 r3d618a0  
    607607ast::SizeofExpr const * ReferenceTypeElimination::previsit(
    608608                ast::SizeofExpr const * expr ) {
    609         if ( expr->expr ) return expr;
    610609        return ast::mutate_field( expr, &ast::SizeofExpr::type,
    611610                expr->type->stripReferences() );
     
    614613ast::AlignofExpr const * ReferenceTypeElimination::previsit(
    615614                ast::AlignofExpr const * expr ) {
    616         if ( expr->expr ) return expr;
    617615        return ast::mutate_field( expr, &ast::AlignofExpr::type,
    618616                expr->type->stripReferences() );
Note: See TracChangeset for help on using the changeset viewer.