Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r293dc1c r490fb92e  
    2525#include "AST/Init.hpp"
    2626#include "AST/Stmt.hpp"
    27 #include "AST/TranslationUnit.hpp"
    2827#include "AST/TypeSubstitution.hpp"
    2928
     
    14051404};
    14061405
    1407 std::list< Declaration * > convert( const ast::TranslationUnit && translationUnit ) {
     1406std::list< Declaration * > convert( const std::list< ast::ptr< ast::Decl > > && translationUnit ) {
    14081407        ConverterNewToOld c;
    14091408        std::list< Declaration * > decls;
    1410         for(auto d : translationUnit.decls) {
     1409        for(auto d : translationUnit) {
    14111410                decls.emplace_back( c.decl( d ) );
    14121411        }
     
    28042803#undef GET_ACCEPT_1
    28052804
    2806 ast::TranslationUnit convert( const std::list< Declaration * > && translationUnit ) {
     2805std::list< ast::ptr< ast::Decl > > convert( const std::list< Declaration * > && translationUnit ) {
    28072806        ConverterOldToNew c;
    2808         ast::TranslationUnit unit;
     2807        std::list< ast::ptr< ast::Decl > > decls;
    28092808        for(auto d : translationUnit) {
    28102809                d->accept( c );
    2811                 unit.decls.emplace_back( c.decl() );
     2810                decls.emplace_back( c.decl() );
    28122811        }
    28132812        deleteAll(translationUnit);
    2814         return unit;
     2813        return decls;
    28152814}
Note: See TracChangeset for help on using the changeset viewer.