Changeset 2b79a70 for src/ResolvExpr/Resolver.cc
- Timestamp:
- Aug 21, 2018, 2:21:53 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- cdbab55
- Parents:
- 51fcdbc7
- git-author:
- Rob Schluntz <rschlunt@…> (08/21/18 13:23:01)
- git-committer:
- Rob Schluntz <rschlunt@…> (08/21/18 14:21:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r51fcdbc7 r2b79a70 30 30 #include "RenameVars.h" // for RenameVars, global_renamer 31 31 #include "ResolvExpr/TypeEnvironment.h" // for TypeEnvironment 32 #include "ResolveTypeof.h" // for resolveTypeof33 32 #include "Resolver.h" 34 33 #include "SymTab/Autogen.h" // for SizeType … … 57 56 void postvisit( FunctionDecl *functionDecl ); 58 57 void previsit( ObjectDecl *objectDecll ); 59 void previsit( TypeDecl *typeDecl );60 58 void previsit( EnumDecl * enumDecl ); 61 59 void previsit( StaticAssertDecl * assertDecl ); … … 303 301 304 302 void Resolver::previsit( ObjectDecl *objectDecl ) { 305 Type *new_type = resolveTypeof( objectDecl->get_type(), indexer );306 new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type307 objectDecl->set_type( new_type );308 303 // To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable 309 304 // initContext is changed multiple time because the LHS is analysed twice. The second analysis changes … … 335 330 } 336 331 337 void Resolver::previsit( TypeDecl *typeDecl ) {338 if ( typeDecl->get_base() ) {339 Type *new_type = resolveTypeof( typeDecl->get_base(), indexer );340 typeDecl->set_base( new_type );341 } // if342 }343 344 332 void Resolver::previsit( FunctionDecl *functionDecl ) { 345 333 #if 0 … … 348 336 std::cerr << std::endl; 349 337 #endif 350 Type *new_type = resolveTypeof( functionDecl->type, indexer );351 functionDecl->set_type( new_type );352 338 GuardValue( functionReturn ); 353 339 functionReturn = ResolvExpr::extractResultType( functionDecl->type );
Note: See TracChangeset
for help on using the changeset viewer.