Changes in src/AST/Convert.cpp [490fb92e:293dc1c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r490fb92e r293dc1c 25 25 #include "AST/Init.hpp" 26 26 #include "AST/Stmt.hpp" 27 #include "AST/TranslationUnit.hpp" 27 28 #include "AST/TypeSubstitution.hpp" 28 29 … … 1404 1405 }; 1405 1406 1406 std::list< Declaration * > convert( const std::list< ast::ptr< ast::Decl > >&& translationUnit ) {1407 std::list< Declaration * > convert( const ast::TranslationUnit && translationUnit ) { 1407 1408 ConverterNewToOld c; 1408 1409 std::list< Declaration * > decls; 1409 for(auto d : translationUnit ) {1410 for(auto d : translationUnit.decls) { 1410 1411 decls.emplace_back( c.decl( d ) ); 1411 1412 } … … 2803 2804 #undef GET_ACCEPT_1 2804 2805 2805 std::list< ast::ptr< ast::Decl > >convert( const std::list< Declaration * > && translationUnit ) {2806 ast::TranslationUnit convert( const std::list< Declaration * > && translationUnit ) { 2806 2807 ConverterOldToNew c; 2807 std::list< ast::ptr< ast::Decl > > decls;2808 ast::TranslationUnit unit; 2808 2809 for(auto d : translationUnit) { 2809 2810 d->accept( c ); 2810 decls.emplace_back( c.decl() );2811 unit.decls.emplace_back( c.decl() ); 2811 2812 } 2812 2813 deleteAll(translationUnit); 2813 return decls;2814 return unit; 2814 2815 }
Note: See TracChangeset
for help on using the changeset viewer.