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