- Timestamp:
- Sep 17, 2019, 12:56:32 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8e1467d
- Parents:
- a6f26ca
- Location:
- src/AST
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
ra6f26ca r4e13e2a 541 541 542 542 CommaExpr( const CodeLocation & loc, const Expr * a1, const Expr * a2 ) 543 : Expr( loc ), arg1( a1 ), arg2( a2 ) {} 543 : Expr( loc ), arg1( a1 ), arg2( a2 ) { 544 this->result = a2->result; 545 } 544 546 545 547 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } -
src/AST/ForallSubstitutionTable.cpp
ra6f26ca r4e13e2a 19 19 #include <vector> 20 20 21 #include "Copy.hpp" // for shallowCopy 21 22 #include "Decl.hpp" 22 23 #include "Node.hpp" … … 26 27 namespace ast { 27 28 28 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 29 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 29 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 30 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 30 31 ) { 31 32 std::vector< ptr< TypeDecl > > new_forall; … … 34 35 for ( const ast::TypeDecl * d : forall ) { 35 36 // create cloned type decl and insert into substitution map before further mutation 36 auto new_d = new ast::TypeDecl{ 37 d->location, d->name, d->storage, d->base, d->kind, d->sized, d->init }; 37 auto new_d = shallowCopy( d ); 38 38 decls.insert( d, new_d ); 39 39 // perform other mutations and add to output
Note:
See TracChangeset
for help on using the changeset viewer.