Changeset 800bae1 for src/AST


Ignore:
Timestamp:
Jun 17, 2019, 3:37:00 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
54b3fde, 6e55240
Parents:
89faa82 (diff), aba20d2 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r89faa82 r800bae1  
    576576                if ( srcInferred.mode == ast::Expr::InferUnion::Params ) {
    577577                        const ast::InferredParams &srcParams = srcInferred.inferParams();
    578                         for (auto srcParam : srcParams) {
    579                                 tgtInferParams[srcParam.first] = ParamEntry(
     578                        for (auto & srcParam : srcParams) {
     579                                auto res = tgtInferParams.emplace(srcParam.first, ParamEntry(
    580580                                        srcParam.second.decl,
    581581                                        get<Declaration>().accept1(srcParam.second.declptr),
     
    583583                                        get<Type>().accept1(srcParam.second.formalType),
    584584                                        get<Expression>().accept1(srcParam.second.expr)
    585                                 );
     585                                ));
     586                                assert(res.second);
    586587                        }
    587588                } else if ( srcInferred.mode == ast::Expr::InferUnion::Slots  ) {
     
    19821983                if ( !oldInferParams.empty() ) {
    19831984                        ast::InferredParams &tgt = newInferred.inferParams();
    1984                         for (auto old : oldInferParams) {
     1985                        for (auto & old : oldInferParams) {
    19851986                                tgt[old.first] = ast::ParamEntry(
    19861987                                        old.second.decl,
Note: See TracChangeset for help on using the changeset viewer.