Changeset 9d06142 for src/InitTweak/FixInit.cc
- Timestamp:
- Nov 13, 2017, 12:13:00 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c0d00b6
- Parents:
- 10dc6908
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r10dc6908 r9d06142 655 655 DeclarationWithType * getDtorFunc( ObjectDecl * objDecl, Statement * input, std::list< Statement * > & stmtsToAdd ) { 656 656 // unwrap implicit statement wrapper 657 Statement * dtor = input; 658 if ( ImplicitCtorDtorStmt * implicit = dynamic_cast< ImplicitCtorDtorStmt * >( input ) ) { 659 // dtor = implicit->callStmt; 660 // implicit->callStmt = nullptr; 661 } 657 662 assert( dtor ); 658 663 std::list< Expression * > matches; … … 689 694 Type * base = replacement->result->stripReferences(); 690 695 if ( dynamic_cast< ArrayType * >( base ) || dynamic_cast< TupleType * > ( base ) ) { 691 // need to cast away reference for array types, since the destructor is generated without the reference type 696 // need to cast away reference for array types, since the destructor is generated without the reference type, 697 // and for tuple types since tuple indexing does not work directly on a reference 692 698 replacement = new CastExpr( replacement, base->clone() ); 693 699 }
Note: See TracChangeset
for help on using the changeset viewer.