Changeset d55d7a6 for src/SymTab/Indexer.cc
- Timestamp:
- Feb 15, 2018, 3:58:56 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, resolv-new, with_gc
- Children:
- 75e3cb2
- Parents:
- d27e340
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
rd27e340 rd55d7a6 388 388 if ( newentry && oldentry ) { 389 389 if ( newentry->get_statements() && oldentry->get_statements() ) { 390 throw SemanticError( "duplicate function definition for ", added);390 throw SemanticError( added, "duplicate function definition for " ); 391 391 } // if 392 392 } else { … … 398 398 ObjectDecl *oldobj = dynamic_cast< ObjectDecl* >( existing ); 399 399 if ( ! newobj->get_storageClasses().is_extern && ! oldobj->get_storageClasses().is_extern ) { 400 throw SemanticError( "duplicate object definition for ", added);400 throw SemanticError( added, "duplicate object definition for " ); 401 401 } // if 402 402 } // if 403 403 } else { 404 throw SemanticError( "duplicate definition for ", added);404 throw SemanticError( added, "duplicate definition for " ); 405 405 } // if 406 406 … … 431 431 // isomorphic to C type-compatibility, which it may not be. 432 432 if ( hasIncompatibleCDecl( name, mangleName, scope ) ) { 433 throw SemanticError( "conflicting overload of C function ", decl);433 throw SemanticError( decl, "conflicting overload of C function " ); 434 434 } 435 435 } else { 436 436 // Check that a Cforall declaration doesn't overload any C declaration 437 437 if ( hasCompatibleCDecl( name, mangleName, scope ) ) { 438 throw SemanticError( "Cforall declaration hides C function ", decl);438 throw SemanticError( decl, "Cforall declaration hides C function " ); 439 439 } 440 440 } … … 455 455 return true; 456 456 } else { 457 throw SemanticError( "redeclaration of ", added);457 throw SemanticError( added, "redeclaration of " ); 458 458 } 459 459 } … … 482 482 return false; 483 483 } else if ( ! added->get_members().empty() ) { 484 throw SemanticError( "redeclaration of ", added);484 throw SemanticError( added, "redeclaration of " ); 485 485 } // if 486 486 return true;
Note:
See TracChangeset
for help on using the changeset viewer.