Changeset 4b30318b for src/Validate


Ignore:
Timestamp:
Sep 2, 2023, 3:07:49 PM (2 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
6e93819
Parents:
389fbf5 (diff), 8a9a3ab (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/GenericParameter.cpp

    r389fbf5 r4b30318b  
    301301const ast::Expr * TranslateDimensionCore::postvisit(
    302302                const ast::TypeExpr * expr ) {
    303         // Does nothing, except prevents matching ast::Expr (above).
     303        if ( auto instType = dynamic_cast<const ast::EnumInstType *>( expr->type.get() ) ) {
     304                const ast::EnumDecl * baseEnum = instType->base.get();
     305                return ast::ConstantExpr::from_int( expr->location, baseEnum->members.size() );
     306        }
    304307        return expr;
    305308}
Note: See TracChangeset for help on using the changeset viewer.