Changeset 6840e7c for src/SymTab/Validate.cc
- Timestamp:
- Oct 19, 2017, 12:01:04 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 837ce06
- Parents:
- b96ec83 (diff), a15b72c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Validate.cc
rb96ec83 r6840e7c 153 153 void previsit( ObjectDecl * object ); 154 154 void previsit( FunctionDecl * func ); 155 void previsit( StructDecl * aggrDecl ); 156 void previsit( UnionDecl * aggrDecl ); 155 157 }; 156 158 … … 270 272 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist 271 273 VerifyCtorDtorAssign::verify( translationUnit ); // must happen before autogen, because autogen examines existing ctor/dtors 274 ReturnChecker::checkFunctionReturns( translationUnit ); 275 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen 272 276 Concurrency::applyKeywords( translationUnit ); 277 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution 273 278 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay 274 279 Concurrency::implementMutexFuncs( translationUnit ); 275 280 Concurrency::implementThreadStarter( translationUnit ); 276 ReturnChecker::checkFunctionReturns( translationUnit );277 281 mutateAll( translationUnit, compoundliteral ); 278 acceptAll( translationUnit, fpd );279 282 ArrayLength::computeLength( translationUnit ); 280 acceptAll( translationUnit, finder ); 283 acceptAll( translationUnit, finder ); // xxx - remove this pass soon 281 284 mutateAll( translationUnit, labelAddrFixer ); 282 285 } … … 369 372 DWTIterator begin( dwts.begin() ), end( dwts.end() ); 370 373 if ( begin == end ) return; 371 FixFunctionfixer;374 PassVisitor<FixFunction> fixer; 372 375 DWTIterator i = begin; 373 376 *i = (*i)->acceptMutator( fixer ); 374 if ( fixer. get_isVoid()) {377 if ( fixer.pass.isVoid ) { 375 378 DWTIterator j = i; 376 379 ++i; … … 383 386 ++i; 384 387 for ( ; i != end; ++i ) { 385 FixFunctionfixer;388 PassVisitor<FixFunction> fixer; 386 389 *i = (*i)->acceptMutator( fixer ); 387 if ( fixer. get_isVoid()) {390 if ( fixer.pass.isVoid ) { 388 391 throw SemanticError( "invalid type void in function type ", func ); 389 392 } // if … … 597 600 // apply FixFunction to every assertion to check for invalid void type 598 601 for ( DeclarationWithType *& assertion : type->assertions ) { 599 FixFunctionfixer;602 PassVisitor<FixFunction> fixer; 600 603 assertion = assertion->acceptMutator( fixer ); 601 if ( fixer. get_isVoid()) {604 if ( fixer.pass.isVoid ) { 602 605 throw SemanticError( "invalid type void in assertion of function ", node ); 603 606 } // if … … 618 621 forallFixer( func->type->forall, func ); 619 622 func->fixUniqueId(); 623 } 624 625 void ForallPointerDecay::previsit( StructDecl * aggrDecl ) { 626 forallFixer( aggrDecl->parameters, aggrDecl ); 627 } 628 629 void ForallPointerDecay::previsit( UnionDecl * aggrDecl ) { 630 forallFixer( aggrDecl->parameters, aggrDecl ); 620 631 } 621 632
Note:
See TracChangeset
for help on using the changeset viewer.