Ignore:
Timestamp:
Feb 28, 2018, 4:48:22 PM (6 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:
446ffa3
Parents:
6a8df56
Message:

Changed warning system to prepare for toggling warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    r6a8df56 ra16764a6  
    443443                        // isomorphic to C type-compatibility, which it may not be.
    444444                        if ( hasIncompatibleCDecl( name, mangleName, scope ) ) {
    445                                 throw SemanticError( decl, "conflicting overload of C function " );
     445                                SemanticError( decl, "conflicting overload of C function " );
    446446                        }
    447447                } else {
    448448                        // Check that a Cforall declaration doesn't override any C declaration
    449449                        if ( hasCompatibleCDecl( name, mangleName, scope ) ) {
    450                                 throw SemanticError( decl, "Cforall declaration hides C function " );
     450                                SemanticError( decl, "Cforall declaration hides C function " );
    451451                        }
    452452                }
     
    463463        void Indexer::addId( DeclarationWithType * decl, Expression * baseExpr ) {
    464464                // default handling of conflicts is to raise an error
    465                 addId( decl, [decl](IdData &, const std::string & msg) { throw SemanticError( decl, msg ); return true; }, baseExpr );
     465                addId( decl, [decl](IdData &, const std::string & msg) { SemanticError( decl, msg ); return true; }, baseExpr );
    466466        }
    467467
    468468        void Indexer::addDeletedId( DeclarationWithType * decl, BaseSyntaxNode * deleteStmt ) {
    469469                // default handling of conflicts is to raise an error
    470                 addId( decl, [decl](IdData &, const std::string & msg) { throw SemanticError( decl, msg ); return true; }, nullptr, deleteStmt );
     470                addId( decl, [decl](IdData &, const std::string & msg) { SemanticError( decl, msg ); return true; }, nullptr, deleteStmt );
    471471        }
    472472
     
    477477                        return true;
    478478                } else {
    479                         throw SemanticError( added, "redeclaration of " );
     479                        SemanticError( added, "redeclaration of " );
    480480                }
    481481        }
     
    504504                        return false;
    505505                } else if ( ! added->get_members().empty() ) {
    506                         throw SemanticError( added, "redeclaration of " );
     506                        SemanticError( added, "redeclaration of " );
    507507                } // if
    508508                return true;
Note: See TracChangeset for help on using the changeset viewer.