Changeset 4067aa8
- Timestamp:
- Feb 23, 2016, 4:32:15 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- b502055
- Parents:
- dc12481
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rdc12481 r4067aa8 1448 1448 assert( newMemberExpr ); 1449 1449 1450 // wrap pointer members in appropriate cast 1451 if ( dynamic_cast< PointerType* >( memberExpr->get_member()->get_type() ) ) { 1452 CastExpr *ptrCastExpr = new CastExpr( newMemberExpr, new PointerType( Type::Qualifiers(), new PointerType( Type::Qualifiers(), new VoidType( Type::Qualifiers() ) ) ) ); 1450 Type *memberType = memberExpr->get_member()->get_type(); 1451 if ( ! isPolyType( memberType, scopeTyVars ) ) { 1452 // Not all members of a polymorphic type are themselves of polymorphic type; in this case the member expression should be wrapped and dereferenced to form an lvalue 1453 CastExpr *ptrCastExpr = new CastExpr( newMemberExpr, new PointerType( Type::Qualifiers(), memberType->clone() ) ); 1453 1454 UntypedExpr *derefExpr = new UntypedExpr( new NameExpr( "*?" ) ); 1454 1455 derefExpr->get_args().push_back( ptrCastExpr );
Note: See TracChangeset
for help on using the changeset viewer.