Changeset b230091 for src/AST


Ignore:
Timestamp:
Mar 29, 2022, 4:09:51 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
6e47b49
Parents:
dfd3410
Message:

Added a 'missing' TypeInstType constructor and rewrote some calls to use it.

Location:
src/AST
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rdfd3410 rb230091  
    27172717
    27182718                for (auto & param : foralls) {
    2719                         ty->forall.emplace_back(new ast::TypeInstType(param->name, param));
     2719                        ty->forall.emplace_back(new ast::TypeInstType(param));
    27202720                        for (auto asst : param->assertions) {
    27212721                                ty->assertions.emplace_back(new ast::VariableExpr({}, asst));
  • src/AST/Decl.cpp

    rdfd3410 rb230091  
    6868        }
    6969        for (auto & tp : this->type_params) {
    70                 ftype->forall.emplace_back(new TypeInstType(tp->name, tp));
     70                ftype->forall.emplace_back(new TypeInstType(tp));
    7171                for (auto & ap: tp->assertions) {
    7272                        ftype->assertions.emplace_back(new VariableExpr(loc, ap));
  • src/AST/Type.cpp

    rdfd3410 rb230091  
    147147// --- TypeInstType
    148148
     149TypeInstType::TypeInstType( const TypeDecl * b,
     150        CV::Qualifiers q, std::vector<ptr<Attribute>> && as )
     151: BaseInstType( b->name, q, move(as) ), base( b ), kind( b->kind ) {}
     152
    149153void TypeInstType::set_base( const TypeDecl * b ) {
    150154        base = b;
  • src/AST/Type.hpp

    rdfd3410 rb230091  
    421421                std::vector<ptr<Attribute>> && as = {} )
    422422        : BaseInstType( n, q, std::move(as) ), base( b ), kind( b->kind ) {}
     423
     424        TypeInstType( const TypeDecl * b,
     425                CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} );
     426
    423427        TypeInstType( const std::string& n, TypeDecl::Kind k, CV::Qualifiers q = {},
    424428                std::vector<ptr<Attribute>> && as = {} )
Note: See TracChangeset for help on using the changeset viewer.