Changeset dc86541 for src/InitTweak
- Timestamp:
- Nov 9, 2016, 1:53:40 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 8780e30
- Parents:
- a29be37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
ra29be37 rdc86541 18 18 #include <iterator> 19 19 #include <algorithm> 20 #include <unordered_map> 21 #include <unordered_set> 20 22 #include "InitTweak.h" 21 23 #include "FixInit.h" … … 445 447 impCpCtorExpr->get_returnDecls().push_back( ret ); 446 448 CP_CTOR_PRINT( std::cerr << "makeCtorDtor for a return" << std::endl; ) 447 destructRet( new VariableExpr( ret ) , impCpCtorExpr ); 449 if ( ! result->get_isLvalue() ) { 450 // destructing lvalue returns is bad because it can cause multiple destructor calls to the same object - the returned object is not a temporary 451 destructRet( new VariableExpr( ret ), impCpCtorExpr ); 452 } 448 453 } // for 449 454 CP_CTOR_PRINT( std::cerr << "after Resolving: " << impCpCtorExpr << std::endl; )
Note: See TracChangeset
for help on using the changeset viewer.