Ignore:
Timestamp:
Apr 19, 2024, 11:30:55 AM (6 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
358e1152, 4e08a54
Parents:
d4264e8 (diff), 19313be5 (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/Validate/ImplementEnumFunc.cpp

    rd4264e8 r02c80cdc  
    156156                                         const ast::ObjectDecl* dstParam,
    157157                                         const ast::ObjectDecl* srcParam) {
    158         // const CodeLocation& location = func->location;
    159         // auto& params = func->params;
    160         // assert(2 == params.size());
    161         // auto dstParam = params.front().strict_as<ast::ObjectDecl>();
    162         // auto srcParam = params.back().strict_as<ast::ObjectDecl>();
    163158        return new ast::CompoundStmt(
    164159            location,
     
    301296        {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))},
    302297        {new ast::ObjectDecl(getLocation(), "_ret",
    303                              new ast::EnumAttrType(new ast::EnumInstType(decl),
    304                                                    ast::EnumAttribute::Posn))});
     298            new ast::BasicType(ast::BasicKind::UnsignedInt))});
    305299}
    306300
     
    311305        {new ast::ObjectDecl(
    312306            getLocation(), "_ret",
    313             new ast::PointerType(new ast::BasicType{ast::BasicType::Char}))});
     307            new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}))});
    314308}
    315309
     
    364358        attr == ast::EnumAttribute::Value
    365359            ? decl->base
    366             : new ast::PointerType(new ast::BasicType{ast::BasicType::Char}),
     360            : new ast::PointerType(new ast::BasicType{ast::BasicKind::Char}),
    367361        ast::ConstantExpr::from_int(decl->location, decl->members.size()),
    368362        ast::LengthFlag::FixedLen, ast::DimensionFlag::DynamicDim);
     
    440434
    441435    auto addOneExpr = ast::UntypedExpr::createCall( location,
    442         "?+?",
     436        succ? "?+?": "?-?",
    443437        {new ast::VariableExpr(location, param),
    444438        ast::ConstantExpr::from_int(location, 1)}
Note: See TracChangeset for help on using the changeset viewer.