Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    ref5b828 r3c89751  
    562562                // TODO: Replace *exception type with &exception type.
    563563                if ( throwStmt->get_expr() ) {
    564                         StructDecl * exception_decl = indexer.lookupMutableStruct( "__cfaabi_ehm__base_exception_t" );
     564                        StructDecl * exception_decl =
     565                                indexer.lookupStruct( "__cfaabi_ehm__base_exception_t" );
    565566                        assert( exception_decl );
    566567                        Type * exceptType = new PointerType( noQualifiers, new StructInstType( noQualifiers, exception_decl ) );
     
    971972                /// Calls the CandidateFinder and finds the single best candidate
    972973                CandidateRef findUnfinishedKindExpression(
    973                         const ast::Expr * untyped, const ast::SymbolTable & symtab, const std::string & kind,
     974                        const ast::Expr * untyped, const ast::SymbolTable & symtab, const std::string & kind, 
    974975                        std::function<bool(const Candidate &)> pred = anyCandidate, ResolvMode mode = {}
    975976                ) {
     
    993994                        // produce invalid error if no candidates
    994995                        if ( candidates.empty() ) {
    995                                 SemanticError( untyped,
    996                                         toString( "No reasonable alternatives for ", kind, (kind != "" ? " " : ""),
     996                                SemanticError( untyped, 
     997                                        toString( "No reasonable alternatives for ", kind, (kind != "" ? " " : ""), 
    997998                                        "expression: ") );
    998999                        }
     
    10301031                        if ( winners.size() != 1 ) {
    10311032                                std::ostringstream stream;
    1032                                 stream << "Cannot choose between " << winners.size() << " alternatives for "
     1033                                stream << "Cannot choose between " << winners.size() << " alternatives for " 
    10331034                                        << kind << (kind != "" ? " " : "") << "expression\n";
    10341035                                ast::print( stream, untyped );
     
    10531054                struct StripCasts_new final {
    10541055                        const ast::Expr * postmutate( const ast::CastExpr * castExpr ) {
    1055                                 if (
    1056                                         castExpr->isGenerated
    1057                                         && typesCompatible( castExpr->arg->result, castExpr->result )
     1056                                if ( 
     1057                                        castExpr->isGenerated 
     1058                                        && typesCompatible( castExpr->arg->result, castExpr->result ) 
    10581059                                ) {
    10591060                                        // generated cast is the same type as its argument, remove it after keeping env
    1060                                         return ast::mutate_field(
     1061                                        return ast::mutate_field( 
    10611062                                                castExpr->arg.get(), &ast::Expr::env, castExpr->env );
    10621063                                }
     
    10871088
    10881089                /// Establish post-resolver invariants for expressions
    1089                 void finishExpr(
    1090                         ast::ptr< ast::Expr > & expr, const ast::TypeEnvironment & env,
     1090                void finishExpr( 
     1091                        ast::ptr< ast::Expr > & expr, const ast::TypeEnvironment & env, 
    10911092                        const ast::TypeSubstitution * oldenv = nullptr
    10921093                ) {
    10931094                        // set up new type substitution for expression
    1094                         ast::ptr< ast::TypeSubstitution > newenv =
     1095                        ast::ptr< ast::TypeSubstitution > newenv = 
    10951096                                 oldenv ? oldenv : new ast::TypeSubstitution{};
    10961097                        env.writeToSubstitution( *newenv.get_and_mutate() );
     
    11011102        } // anonymous namespace
    11021103
    1103 
     1104               
    11041105        ast::ptr< ast::Expr > resolveInVoidContext(
    11051106                const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env
    11061107        ) {
    11071108                assertf( expr, "expected a non-null expression" );
    1108 
     1109               
    11091110                // set up and resolve expression cast to void
    11101111                ast::CastExpr * untyped = new ast::CastExpr{ expr };
    1111                 CandidateRef choice = findUnfinishedKindExpression(
     1112                CandidateRef choice = findUnfinishedKindExpression( 
    11121113                        untyped, symtab, "", anyCandidate, ResolvMode::withAdjustment() );
    1113 
     1114               
    11141115                // a cast expression has either 0 or 1 interpretations (by language rules);
    11151116                // if 0, an exception has already been thrown, and this code will not run
     
    11211122
    11221123        namespace {
    1123                 /// Resolve `untyped` to the expression whose candidate is the best match for a `void`
     1124                /// Resolve `untyped` to the expression whose candidate is the best match for a `void` 
    11241125                /// context.
    1125                 ast::ptr< ast::Expr > findVoidExpression(
     1126                ast::ptr< ast::Expr > findVoidExpression( 
    11261127                        const ast::Expr * untyped, const ast::SymbolTable & symtab
    11271128                ) {
     
    11331134                }
    11341135
    1135                 /// resolve `untyped` to the expression whose candidate satisfies `pred` with the
     1136                /// resolve `untyped` to the expression whose candidate satisfies `pred` with the 
    11361137                /// lowest cost, returning the resolved version
    11371138                ast::ptr< ast::Expr > findKindExpression(
    1138                         const ast::Expr * untyped, const ast::SymbolTable & symtab,
    1139                         std::function<bool(const Candidate &)> pred = anyCandidate,
     1139                        const ast::Expr * untyped, const ast::SymbolTable & symtab, 
     1140                        std::function<bool(const Candidate &)> pred = anyCandidate, 
    11401141                        const std::string & kind = "", ResolvMode mode = {}
    11411142                ) {
    11421143                        if ( ! untyped ) return {};
    1143                         CandidateRef choice =
     1144                        CandidateRef choice = 
    11441145                                findUnfinishedKindExpression( untyped, symtab, kind, pred, mode );
    11451146                        finishExpr( choice->expr, choice->env, untyped->env );
     
    11481149
    11491150                /// Resolve `untyped` to the single expression whose candidate is the best match
    1150                 ast::ptr< ast::Expr > findSingleExpression(
    1151                         const ast::Expr * untyped, const ast::SymbolTable & symtab
     1151                ast::ptr< ast::Expr > findSingleExpression( 
     1152                        const ast::Expr * untyped, const ast::SymbolTable & symtab 
    11521153                ) {
    11531154                        return findKindExpression( untyped, symtab );
     
    11691170                bool hasIntegralType( const Candidate & i ) {
    11701171                        const ast::Type * type = i.expr->result;
    1171 
     1172                       
    11721173                        if ( auto bt = dynamic_cast< const ast::BasicType * >( type ) ) {
    11731174                                return bt->isInteger();
    1174                         } else if (
    1175                                 dynamic_cast< const ast::EnumInstType * >( type )
     1175                        } else if ( 
     1176                                dynamic_cast< const ast::EnumInstType * >( type ) 
    11761177                                || dynamic_cast< const ast::ZeroType * >( type )
    11771178                                || dynamic_cast< const ast::OneType * >( type )
     
    11821183
    11831184                /// Resolve `untyped` as an integral expression, returning the resolved version
    1184                 ast::ptr< ast::Expr > findIntegralExpression(
    1185                         const ast::Expr * untyped, const ast::SymbolTable & symtab
     1185                ast::ptr< ast::Expr > findIntegralExpression( 
     1186                        const ast::Expr * untyped, const ast::SymbolTable & symtab 
    11861187                ) {
    11871188                        return findKindExpression( untyped, symtab, hasIntegralType, "condition" );
     
    11911192                bool isCharType( const ast::Type * t ) {
    11921193                        if ( auto bt = dynamic_cast< const ast::BasicType * >( t ) ) {
    1193                                 return bt->kind == ast::BasicType::Char
    1194                                         || bt->kind == ast::BasicType::SignedChar
     1194                                return bt->kind == ast::BasicType::Char 
     1195                                        || bt->kind == ast::BasicType::SignedChar 
    11951196                                        || bt->kind == ast::BasicType::UnsignedChar;
    11961197                        }
     
    12521253        }
    12531254
    1254         ast::ptr< ast::Init > resolveCtorInit(
    1255                 const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab
     1255        ast::ptr< ast::Init > resolveCtorInit( 
     1256                const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab 
    12561257        ) {
    12571258                assert( ctorInit );
     
    12601261        }
    12611262
    1262         ast::ptr< ast::Expr > resolveStmtExpr(
    1263                 const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab
     1263        ast::ptr< ast::Expr > resolveStmtExpr( 
     1264                const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab 
    12641265        ) {
    12651266                assert( stmtExpr );
     
    13021303
    13031304        void Resolver_new::previsit( const ast::ObjectDecl * objectDecl ) {
    1304                 // To handle initialization of routine pointers [e.g. int (*fp)(int) = foo()],
    1305                 // class-variable `initContext` is changed multiple times because the LHS is analyzed
    1306                 // twice. The second analysis changes `initContext` because a function type can contain
    1307                 // object declarations in the return and parameter types. Therefore each value of
    1308                 // `initContext` is retained so the type on the first analysis is preserved and used for
     1305                // To handle initialization of routine pointers [e.g. int (*fp)(int) = foo()], 
     1306                // class-variable `initContext` is changed multiple times because the LHS is analyzed 
     1307                // twice. The second analysis changes `initContext` because a function type can contain 
     1308                // object declarations in the return and parameter types. Therefore each value of 
     1309                // `initContext` is retained so the type on the first analysis is preserved and used for 
    13091310                // selecting the RHS.
    13101311                GuardValue( currentObject );
    13111312                currentObject = ast::CurrentObject{ objectDecl->location, objectDecl->get_type() };
    13121313                if ( inEnumDecl && dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() ) ) {
    1313                         // enumerator initializers should not use the enum type to initialize, since the
     1314                        // enumerator initializers should not use the enum type to initialize, since the 
    13141315                        // enum type is still incomplete at this point. Use `int` instead.
    1315                         currentObject = ast::CurrentObject{
     1316                        currentObject = ast::CurrentObject{ 
    13161317                                objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } };
    13171318                }
     
    13241325        }
    13251326
    1326         const ast::StaticAssertDecl * Resolver_new::previsit(
    1327                 const ast::StaticAssertDecl * assertDecl
     1327        const ast::StaticAssertDecl * Resolver_new::previsit( 
     1328                const ast::StaticAssertDecl * assertDecl 
    13281329        ) {
    1329                 return ast::mutate_field(
    1330                         assertDecl, &ast::StaticAssertDecl::cond,
     1330                return ast::mutate_field( 
     1331                        assertDecl, &ast::StaticAssertDecl::cond, 
    13311332                        findIntegralExpression( assertDecl->cond, symtab ) );
    13321333        }
     
    13371338                        #warning should use new equivalent to Validate::SizeType rather than sizeType here
    13381339                        ast::ptr< ast::Type > sizeType = new ast::BasicType{ ast::BasicType::LongUnsignedInt };
    1339                         ast::mutate_field(
    1340                                 type, &PtrType::dimension,
     1340                        ast::mutate_field( 
     1341                                type, &PtrType::dimension, 
    13411342                                findSingleExpression( type->dimension, sizeType, symtab ) );
    13421343                }
     
    13551356                visit_children = false;
    13561357                assertf( exprStmt->expr, "ExprStmt has null expression in resolver" );
    1357 
    1358                 return ast::mutate_field(
     1358               
     1359                return ast::mutate_field( 
    13591360                        exprStmt, &ast::ExprStmt::expr, findVoidExpression( exprStmt->expr, symtab ) );
    13601361        }
     
    13631364                visit_children = false;
    13641365
    1365                 asmExpr = ast::mutate_field(
     1366                asmExpr = ast::mutate_field( 
    13661367                        asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, symtab ) );
    1367 
     1368               
    13681369                if ( asmExpr->inout ) {
    13691370                        asmExpr = ast::mutate_field(
    13701371                                asmExpr, &ast::AsmExpr::inout, findVoidExpression( asmExpr->inout, symtab ) );
    13711372                }
    1372 
     1373               
    13731374                return asmExpr;
    13741375        }
     
    13871388
    13881389        const ast::WhileStmt * Resolver_new::previsit( const ast::WhileStmt * whileStmt ) {
    1389                 return ast::mutate_field(
     1390                return ast::mutate_field( 
    13901391                        whileStmt, &ast::WhileStmt::cond, findIntegralExpression( whileStmt->cond, symtab ) );
    13911392        }
     
    14081409                GuardValue( currentObject );
    14091410                switchStmt = ast::mutate_field(
    1410                         switchStmt, &ast::SwitchStmt::cond,
     1411                        switchStmt, &ast::SwitchStmt::cond, 
    14111412                        findIntegralExpression( switchStmt->cond, symtab ) );
    14121413                currentObject = ast::CurrentObject{ switchStmt->location, switchStmt->cond->result };
     
    14191420                        assertf( initAlts.size() == 1, "SwitchStmt did not correctly resolve an integral "
    14201421                                "expression." );
    1421 
    1422                         ast::ptr< ast::Expr > untyped =
     1422                       
     1423                        ast::ptr< ast::Expr > untyped = 
    14231424                                new ast::CastExpr{ caseStmt->location, caseStmt->cond, initAlts.front().type };
    14241425                        ast::ptr< ast::Expr > newExpr = findSingleExpression( untyped, symtab );
    1425 
    1426                         // case condition cannot have a cast in C, so it must be removed here, regardless of
     1426                       
     1427                        // case condition cannot have a cast in C, so it must be removed here, regardless of 
    14271428                        // whether it would perform a conversion.
    14281429                        if ( const ast::CastExpr * castExpr = newExpr.as< ast::CastExpr >() ) {
    14291430                                swap_and_save_env( newExpr, castExpr->arg );
    14301431                        }
    1431 
     1432                       
    14321433                        caseStmt = ast::mutate_field( caseStmt, &ast::CaseStmt::cond, newExpr );
    14331434                }
     
    14421443                        ast::ptr< ast::Type > target = new ast::PointerType{ new ast::VoidType{} };
    14431444                        branchStmt = ast::mutate_field(
    1444                                 branchStmt, &ast::BranchStmt::computedTarget,
     1445                                branchStmt, &ast::BranchStmt::computedTarget, 
    14451446                                findSingleExpression( branchStmt->computedTarget, target, symtab ) );
    14461447                }
     
    14521453                if ( returnStmt->expr ) {
    14531454                        returnStmt = ast::mutate_field(
    1454                                 returnStmt, &ast::ReturnStmt::expr,
     1455                                returnStmt, &ast::ReturnStmt::expr, 
    14551456                                findSingleExpression( returnStmt->expr, functionReturn, symtab ) );
    14561457                }
     
    14611462                visit_children = false;
    14621463                if ( throwStmt->expr ) {
    1463                         const ast::StructDecl * exceptionDecl =
     1464                        const ast::StructDecl * exceptionDecl = 
    14641465                                symtab.lookupStruct( "__cfaabi_ehm__base_exception_t" );
    14651466                        assert( exceptionDecl );
    1466                         ast::ptr< ast::Type > exceptType =
     1467                        ast::ptr< ast::Type > exceptType = 
    14671468                                new ast::PointerType{ new ast::StructInstType{ exceptionDecl } };
    14681469                        throwStmt = ast::mutate_field(
    1469                                 throwStmt, &ast::ThrowStmt::expr,
     1470                                throwStmt, &ast::ThrowStmt::expr, 
    14701471                                findSingleExpression( throwStmt->expr, exceptType, symtab ) );
    14711472                }
     
    14761477                if ( catchStmt->cond ) {
    14771478                        ast::ptr< ast::Type > boolType = new ast::BasicType{ ast::BasicType::Bool };
    1478                         catchStmt = ast::mutate_field(
    1479                                 catchStmt, &ast::CatchStmt::cond,
     1479                        catchStmt = ast::mutate_field( 
     1480                                catchStmt, &ast::CatchStmt::cond, 
    14801481                                findSingleExpression( catchStmt->cond, boolType, symtab ) );
    14811482                }
     
    15051506
    15061507                        if ( clause.target.args.empty() ) {
    1507                                 SemanticError( stmt->location,
     1508                                SemanticError( stmt->location, 
    15081509                                        "Waitfor clause must have at least one mutex parameter");
    15091510                        }
    15101511
    15111512                        // Find all alternatives for all arguments in canonical form
    1512                         std::vector< CandidateFinder > argFinders =
     1513                        std::vector< CandidateFinder > argFinders = 
    15131514                                funcFinder.findSubExprs( clause.target.args );
    1514 
     1515                       
    15151516                        // List all combinations of arguments
    15161517                        std::vector< CandidateList > possibilities;
     
    15181519
    15191520                        // For every possible function:
    1520                         // * try matching the arguments to the parameters, not the other way around because
     1521                        // * try matching the arguments to the parameters, not the other way around because 
    15211522                        //   more arguments than parameters
    15221523                        CandidateList funcCandidates;
     
    15251526                        for ( CandidateRef & func : funcFinder.candidates ) {
    15261527                                try {
    1527                                         auto pointerType = dynamic_cast< const ast::PointerType * >(
     1528                                        auto pointerType = dynamic_cast< const ast::PointerType * >( 
    15281529                                                func->expr->result->stripReferences() );
    15291530                                        if ( ! pointerType ) {
    1530                                                 SemanticError( stmt->location, func->expr->result.get(),
     1531                                                SemanticError( stmt->location, func->expr->result.get(), 
    15311532                                                        "candidate not viable: not a pointer type\n" );
    15321533                                        }
     
    15341535                                        auto funcType = pointerType->base.as< ast::FunctionType >();
    15351536                                        if ( ! funcType ) {
    1536                                                 SemanticError( stmt->location, func->expr->result.get(),
     1537                                                SemanticError( stmt->location, func->expr->result.get(), 
    15371538                                                        "candidate not viable: not a function type\n" );
    15381539                                        }
     
    15431544
    15441545                                                if( ! nextMutex( param, paramEnd ) ) {
    1545                                                         SemanticError( stmt->location, funcType,
     1546                                                        SemanticError( stmt->location, funcType, 
    15461547                                                                "candidate function not viable: no mutex parameters\n");
    15471548                                                }
     
    15591560                                                        ast::AssertionSet need, have;
    15601561                                                        ast::TypeEnvironment resultEnv{ func->env };
    1561                                                         // Add all type variables as open so that those not used in the
     1562                                                        // Add all type variables as open so that those not used in the 
    15621563                                                        // parameter list are still considered open
    15631564                                                        resultEnv.add( funcType->forall );
     
    15791580                                                        unsigned n_mutex_param = 0;
    15801581
    1581                                                         // For every argument of its set, check if it matches one of the
     1582                                                        // For every argument of its set, check if it matches one of the 
    15821583                                                        // parameters. The order is important
    15831584                                                        for ( auto & arg : argsList ) {
     
    15861587                                                                        // We ran out of parameters but still have arguments.
    15871588                                                                        // This function doesn't match
    1588                                                                         SemanticError( stmt->location, funcType,
     1589                                                                        SemanticError( stmt->location, funcType, 
    15891590                                                                                toString("candidate function not viable: too many mutex "
    15901591                                                                                "arguments, expected ", n_mutex_param, "\n" ) );
     
    15931594                                                                ++n_mutex_param;
    15941595
    1595                                                                 // Check if the argument matches the parameter type in the current
     1596                                                                // Check if the argument matches the parameter type in the current 
    15961597                                                                // scope
    15971598                                                                ast::ptr< ast::Type > paramType = (*param)->get_type();
    1598                                                                 if (
    1599                                                                         ! unify(
    1600                                                                                 arg->expr->result, paramType, resultEnv, need, have, open,
    1601                                                                                 symtab )
     1599                                                                if ( 
     1600                                                                        ! unify( 
     1601                                                                                arg->expr->result, paramType, resultEnv, need, have, open, 
     1602                                                                                symtab ) 
    16021603                                                                ) {
    16031604                                                                        // Type doesn't match
     
    16261627                                                                } while ( nextMutex( param, paramEnd ) );
    16271628
    1628                                                                 // We ran out of arguments but still have parameters left; this
     1629                                                                // We ran out of arguments but still have parameters left; this 
    16291630                                                                // function doesn't match
    1630                                                                 SemanticError( stmt->location, funcType,
     1631                                                                SemanticError( stmt->location, funcType, 
    16311632                                                                        toString( "candidate function not viable: too few mutex "
    16321633                                                                        "arguments, expected ", n_mutex_param, "\n" ) );
     
    16561657                        // Make sure correct number of arguments
    16571658                        if( funcCandidates.empty() ) {
    1658                                 SemanticErrorException top( stmt->location,
     1659                                SemanticErrorException top( stmt->location, 
    16591660                                        "No alternatives for function in call to waitfor" );
    16601661                                top.append( errors );
     
    16631664
    16641665                        if( argsCandidates.empty() ) {
    1665                                 SemanticErrorException top( stmt->location,
    1666                                         "No alternatives for arguments in call to waitfor" );
     1666                                SemanticErrorException top( stmt->location, 
     1667                                        "No alternatives for arguments in call to waitfor" ); 
    16671668                                top.append( errors );
    16681669                                throw top;
     
    16701671
    16711672                        if( funcCandidates.size() > 1 ) {
    1672                                 SemanticErrorException top( stmt->location,
     1673                                SemanticErrorException top( stmt->location, 
    16731674                                        "Ambiguous function in call to waitfor" );
    16741675                                top.append( errors );
     
    16851686                        // build new clause
    16861687                        ast::WaitForStmt::Clause clause2;
    1687 
     1688                       
    16881689                        clause2.target.func = funcCandidates.front()->expr;
    1689 
     1690                       
    16901691                        clause2.target.args.reserve( clause.target.args.size() );
    16911692                        for ( auto arg : argsCandidates.front() ) {
     
    17071708                        ast::WaitForStmt::Timeout timeout2;
    17081709
    1709                         ast::ptr< ast::Type > target =
     1710                        ast::ptr< ast::Type > target = 
    17101711                                new ast::BasicType{ ast::BasicType::LongLongUnsignedInt };
    17111712                        timeout2.time = findSingleExpression( stmt->timeout.time, target, symtab );
     
    17391740        const ast::SingleInit * Resolver_new::previsit( const ast::SingleInit * singleInit ) {
    17401741                visit_children = false;
    1741                 // resolve initialization using the possibilities as determined by the `currentObject`
     1742                // resolve initialization using the possibilities as determined by the `currentObject` 
    17421743                // cursor.
    1743                 ast::ptr< ast::Expr > untyped = new ast::UntypedInitExpr{
     1744                ast::ptr< ast::Expr > untyped = new ast::UntypedInitExpr{ 
    17441745                        singleInit->location, singleInit->value, currentObject.getOptions() };
    17451746                ast::ptr<ast::Expr> newExpr = findSingleExpression( untyped, symtab );
     
    17501751
    17511752                // discard InitExpr wrapper and retain relevant pieces.
    1752                 // `initExpr` may have inferred params in the case where the expression specialized a
    1753                 // function pointer, and newExpr may already have inferParams of its own, so a simple
     1753                // `initExpr` may have inferred params in the case where the expression specialized a 
     1754                // function pointer, and newExpr may already have inferParams of its own, so a simple 
    17541755                // swap is not sufficient
    17551756                ast::Expr::InferUnion inferred = initExpr->inferred;
     
    17571758                newExpr.get_and_mutate()->inferred.splice( std::move(inferred) );
    17581759
    1759                 // get the actual object's type (may not exactly match what comes back from the resolver
     1760                // get the actual object's type (may not exactly match what comes back from the resolver 
    17601761                // due to conversions)
    17611762                const ast::Type * initContext = currentObject.getCurrentType();
     
    17691770                                if ( auto pt = newExpr->result.as< ast::PointerType >() ) {
    17701771                                        if ( isCharType( pt->base ) ) {
    1771                                                 // strip cast if we're initializing a char[] with a char*
     1772                                                // strip cast if we're initializing a char[] with a char* 
    17721773                                                // e.g. char x[] = "hello"
    17731774                                                if ( auto ce = newExpr.as< ast::CastExpr >() ) {
     
    17921793                assert( listInit->designations.size() == listInit->initializers.size() );
    17931794                for ( unsigned i = 0; i < listInit->designations.size(); ++i ) {
    1794                         // iterate designations and initializers in pairs, moving the cursor to the current
     1795                        // iterate designations and initializers in pairs, moving the cursor to the current 
    17951796                        // designated object and resolving the initializer against that object
    17961797                        listInit = ast::mutate_field_index(
    1797                                 listInit, &ast::ListInit::designations, i,
     1798                                listInit, &ast::ListInit::designations, i, 
    17981799                                currentObject.findNext( listInit->designations[i] ) );
    17991800                        listInit = ast::mutate_field_index(
     
    18171818                ctorInit = ast::mutate_field( ctorInit, &ast::ConstructorInit::init, nullptr );
    18181819
    1819                 // intrinsic single-parameter constructors and destructors do nothing. Since this was
    1820                 // implicitly generated, there's no way for it to have side effects, so get rid of it to
     1820                // intrinsic single-parameter constructors and destructors do nothing. Since this was 
     1821                // implicitly generated, there's no way for it to have side effects, so get rid of it to 
    18211822                // clean up generated code
    18221823                if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->ctor ) ) {
Note: See TracChangeset for help on using the changeset viewer.