Ignore:
Timestamp:
Sep 17, 2019, 12:56:32 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Added setting of result in Comma expression.
Added asserts in candidate finder to catch null pointers earlier.
ForAll? substituter now properly uses ShallowCopy?.
Added missing makefile.in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/ForallSubstitutionTable.cpp

    ra6f26ca r4e13e2a  
    1919#include <vector>
    2020
     21#include "Copy.hpp"                // for shallowCopy
    2122#include "Decl.hpp"
    2223#include "Node.hpp"
     
    2627namespace ast {
    2728
    28 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 
    29         const std::vector< ptr< TypeDecl > > & forall, Visitor & v 
     29std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone(
     30        const std::vector< ptr< TypeDecl > > & forall, Visitor & v
    3031) {
    3132        std::vector< ptr< TypeDecl > > new_forall;
     
    3435        for ( const ast::TypeDecl * d : forall ) {
    3536                // 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 );
    3838                decls.insert( d, new_d );
    3939                // perform other mutations and add to output
Note: See TracChangeset for help on using the changeset viewer.