Changeset 7c782af for src/SynTree
- Timestamp:
- Feb 16, 2018, 4:22:25 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:
- 5964127
- Parents:
- c71b256 (diff), 62cd621 (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. - Location:
- src/SynTree
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
rc71b256 r7c782af 245 245 typedef NamedTypeDecl Parent; 246 246 public: 247 TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) : Parent( name, scs, type ) { set_linkage( spec ); } 247 TypedefDecl( const std::string &name, CodeLocation location, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) 248 : Parent( name, scs, type ) { set_linkage( spec ); this->location = location; } 249 248 250 TypedefDecl( const TypedefDecl &other ) : Parent( other ) {} 249 251 -
src/SynTree/Expression.cc
rc71b256 r7c782af 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
rc71b256 r7c782af 149 149 } // if 150 150 } catch( SemanticError &e ) { 151 e.set_location( (*i)->location );152 151 errors.append( e ); 153 152 } // try -
src/SynTree/Statement.cc
rc71b256 r7c782af 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
rc71b256 r7c782af 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
rc71b256 r7c782af 143 143 } 144 144 } catch( SemanticError &e ) { 145 e.set_location( (*i)->location );146 145 errors.append( e ); 147 146 }
Note:
See TracChangeset
for help on using the changeset viewer.