Changeset d55d7a6 for src/SynTree
- Timestamp:
- Feb 15, 2018, 3:58:56 PM (7 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
- Location:
- src/SynTree
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rd27e340 rd55d7a6 93 93 return 0; 94 94 } 95 throw SemanticError( "Constant expression of non-integral type ", this);95 throw SemanticError( this, "Constant expression of non-integral type " ); 96 96 } 97 97 -
src/SynTree/Mutator.h
rd27e340 rd55d7a6 148 148 } // if 149 149 } catch( SemanticError &e ) { 150 e.set_location( (*i)->location );151 150 errors.append( e ); 152 151 } // try -
src/SynTree/Statement.cc
rd27e340 rd55d7a6 100 100 //actually this is a syntactic error signaled by the parser 101 101 if ( type == BranchStmt::Goto && target.empty() ) { 102 throw SemanticError( "goto without target");102 throw SemanticError( target.get_statement()->location, "goto without target"); 103 103 } 104 104 } … … 107 107 Statement(), computedTarget( computedTarget ), type( type ) { 108 108 if ( type != BranchStmt::Goto || computedTarget == nullptr ) { 109 throw SemanticError( "Computed target not valid in branch statement");109 throw SemanticError( computedTarget->location, "Computed target not valid in branch statement"); 110 110 } 111 111 } … … 203 203 CaseStmt::CaseStmt( Expression *condition, const std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) : 204 204 Statement(), condition( condition ), stmts( statements ), _isDefault( deflt ) { 205 if ( isDefault() && condition != 0 ) throw SemanticError( "default case with condition: ", condition);205 if ( isDefault() && condition != 0 ) throw SemanticError( condition, "default case with condition: " ); 206 206 } 207 207 -
src/SynTree/TypeSubstitution.h
rd27e340 rd55d7a6 98 98 } // if 99 99 } else { 100 throw SemanticError( toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ), formal);100 throw SemanticError( formal, toString( "Attempt to provide non-type parameter: ", toString( *actualIt ).c_str(), " for type parameter " ) ); 101 101 } // if 102 102 } else { -
src/SynTree/Visitor.h
rd27e340 rd55d7a6 142 142 } 143 143 } catch( SemanticError &e ) { 144 e.set_location( (*i)->location );145 144 errors.append( e ); 146 145 }
Note: See TracChangeset
for help on using the changeset viewer.