Ignore:
Timestamp:
Nov 13, 2024, 6:16:06 PM (4 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Parents:
1b56a7f (diff), 00f89a6 (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/GenPoly/Lvalue.cpp

    r1b56a7f r2325b57  
    316316                        Warning::RvalueToReferenceConversion, toCString( expr->arg ) );
    317317
     318
     319                // allowing conversion in the rvalue to const ref case
     320                // use the referenced-to type to create temp variables
     321                ast::Type const * targetType = dstType;
     322                for (int i = 0; i < diff; ++i) targetType = (strict_dynamic_cast<ast::ReferenceType const *>(targetType))->base;
     323
    318324                static UniqueName tmpNamer( "__ref_tmp_" );
    319325                ast::ObjectDecl * tmp = new ast::ObjectDecl( expr->arg->location,
    320326                        tmpNamer.newName(),
    321                         ast::deepCopy( expr->arg->result ),
     327                        // ast::deepCopy( expr->arg->result ),
     328                        ast::deepCopy (targetType),
    322329                        new ast::SingleInit( expr->arg->location, expr->arg ) );
    323330                PRINT( std::cerr << "make tmp: " << tmp << std::endl; )
Note: See TracChangeset for help on using the changeset viewer.