Ignore:
Timestamp:
Feb 15, 2018, 3:58:56 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Massive change to errors to enable warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    rd27e340 rd55d7a6  
    388388                        if ( newentry && oldentry ) {
    389389                                if ( newentry->get_statements() && oldentry->get_statements() ) {
    390                                         throw SemanticError( "duplicate function definition for ", added );
     390                                        throw SemanticError( added, "duplicate function definition for " );
    391391                                } // if
    392392                        } else {
     
    398398                                ObjectDecl *oldobj = dynamic_cast< ObjectDecl* >( existing );
    399399                                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 " );
    401401                                } // if
    402402                        } // if
    403403                } else {
    404                         throw SemanticError( "duplicate definition for ", added );
     404                        throw SemanticError( added, "duplicate definition for " );
    405405                } // if
    406406
     
    431431                        // isomorphic to C type-compatibility, which it may not be.
    432432                        if ( hasIncompatibleCDecl( name, mangleName, scope ) ) {
    433                                 throw SemanticError( "conflicting overload of C function ", decl );
     433                                throw SemanticError( decl, "conflicting overload of C function " );
    434434                        }
    435435                } else {
    436436                        // Check that a Cforall declaration doesn't overload any C declaration
    437437                        if ( hasCompatibleCDecl( name, mangleName, scope ) ) {
    438                                 throw SemanticError( "Cforall declaration hides C function ", decl );
     438                                throw SemanticError( decl, "Cforall declaration hides C function " );
    439439                        }
    440440                }
     
    455455                        return true;
    456456                } else {
    457                         throw SemanticError( "redeclaration of ", added );
     457                        throw SemanticError( added, "redeclaration of " );
    458458                }
    459459        }
     
    482482                        return false;
    483483                } else if ( ! added->get_members().empty() ) {
    484                         throw SemanticError( "redeclaration of ", added );
     484                        throw SemanticError( added, "redeclaration of " );
    485485                } // if
    486486                return true;
Note: See TracChangeset for help on using the changeset viewer.