Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r2b79a70 rc5283ba  
    3030#include "RenameVars.h"                  // for RenameVars, global_renamer
    3131#include "ResolvExpr/TypeEnvironment.h"  // for TypeEnvironment
     32#include "ResolveTypeof.h"               // for resolveTypeof
    3233#include "Resolver.h"
    3334#include "SymTab/Autogen.h"              // for SizeType
     
    5657                void postvisit( FunctionDecl *functionDecl );
    5758                void previsit( ObjectDecl *objectDecll );
     59                void previsit( TypeDecl *typeDecl );
    5860                void previsit( EnumDecl * enumDecl );
    5961                void previsit( StaticAssertDecl * assertDecl );
     
    301303
    302304        void Resolver::previsit( ObjectDecl *objectDecl ) {
     305                Type *new_type = resolveTypeof( objectDecl->get_type(), indexer );
     306                objectDecl->set_type( new_type );
    303307                // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable
    304308                // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes
     
    330334        }
    331335
     336        void Resolver::previsit( TypeDecl *typeDecl ) {
     337                if ( typeDecl->get_base() ) {
     338                        Type *new_type = resolveTypeof( typeDecl->get_base(), indexer );
     339                        typeDecl->set_base( new_type );
     340                } // if
     341        }
     342
    332343        void Resolver::previsit( FunctionDecl *functionDecl ) {
    333344#if 0
     
    336347                std::cerr << std::endl;
    337348#endif
     349                Type *new_type = resolveTypeof( functionDecl->type, indexer );
     350                functionDecl->set_type( new_type );
    338351                GuardValue( functionReturn );
    339352                functionReturn = ResolvExpr::extractResultType( functionDecl->type );
Note: See TracChangeset for help on using the changeset viewer.