Changeset da7fe39 for src/SymTab
- Timestamp:
- Apr 23, 2018, 12:57:46 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct, with_gc
- Children:
- 57acae0
- Parents:
- ba89e9b7 (diff), c8ad5d9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/SymTab
- Files:
-
- 2 edited
-
Indexer.cc (modified) (1 diff)
-
Validate.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
rba89e9b7 rda7fe39 501 501 502 502 bool addedDeclConflicts( AggregateDecl *existing, AggregateDecl *added ) { 503 if ( existing->get_members().empty()) {503 if ( ! existing->body ) { 504 504 return false; 505 } else if ( ! added->get_members().empty()) {505 } else if ( added->body ) { 506 506 SemanticError( added, "redeclaration of " ); 507 507 } // if -
src/SymTab/Validate.cc
rba89e9b7 rda7fe39 148 148 void previsit( ObjectDecl * object ); 149 149 void previsit( FunctionDecl * func ); 150 void previsit( FunctionType * ftype ); 150 151 void previsit( StructDecl * aggrDecl ); 151 152 void previsit( UnionDecl * aggrDecl ); … … 315 316 316 317 void HoistStruct::previsit( EnumInstType * inst ) { 317 if ( inst->baseEnum ) {318 if ( inst->baseEnum && inst->baseEnum->body ) { 318 319 declsToAddBefore.push_front( inst->baseEnum ); 319 320 } … … 321 322 322 323 void HoistStruct::previsit( StructInstType * inst ) { 323 if ( inst->baseStruct ) {324 if ( inst->baseStruct && inst->baseStruct->body ) { 324 325 declsToAddBefore.push_front( inst->baseStruct ); 325 326 } … … 327 328 328 329 void HoistStruct::previsit( UnionInstType * inst ) { 329 if ( inst->baseUnion ) {330 if ( inst->baseUnion && inst->baseUnion->body ) { 330 331 declsToAddBefore.push_front( inst->baseUnion ); 331 332 } … … 633 634 634 635 void ForallPointerDecay::previsit( ObjectDecl *object ) { 635 forallFixer( object->type->forall, object );636 if ( PointerType *pointer = dynamic_cast< PointerType * >( object->type ) ) {637 forallFixer( pointer->base->forall, object );638 } // if639 636 // ensure that operator names only apply to functions or function pointers 640 637 if ( CodeGen::isOperator( object->name ) && ! dynamic_cast< FunctionType * >( object->type->stripDeclarator() ) ) { … … 645 642 646 643 void ForallPointerDecay::previsit( FunctionDecl *func ) { 647 forallFixer( func->type->forall, func );648 644 func->fixUniqueId(); 645 } 646 647 void ForallPointerDecay::previsit( FunctionType * ftype ) { 648 forallFixer( ftype->forall, ftype ); 649 649 } 650 650
Note:
See TracChangeset
for help on using the changeset viewer.