Changeset 5668740 for src/ResolvExpr


Ignore:
Timestamp:
Jun 14, 2023, 11:35:49 AM (14 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
7e4bd9b6
Parents:
32a4f3e (diff), 8f557161 (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

Location:
src/ResolvExpr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CurrentObject.cc

    r32a4f3e r5668740  
    689689
    690690                        auto arg = eval( expr );
    691                         index = arg.first;
     691                        assertf( arg.hasKnownValue, "Non-evaluable expression made it to IndexIterator" );
     692                        index = arg.knownValue;
    692693
    693694                        // if ( auto constExpr = dynamic_cast< const ConstantExpr * >( expr ) ) {
     
    728729                size_t getSize( const Expr * expr ) {
    729730                        auto res = eval( expr );
    730                         if ( !res.second ) {
     731                        if ( !res.hasKnownValue ) {
    731732                                SemanticError( location, toString( "Array designator must be a constant expression: ", expr ) );
    732733                        }
    733                         return res.first;
     734                        return res.knownValue;
    734735                }
    735736
  • src/ResolvExpr/Resolver.cc

    r32a4f3e r5668740  
    13411341                                        auto mutAttr = mutate(attr);
    13421342                                        mutAttr->params.front() = resolved;
    1343                                         if (! result.second) {
     1343                                        if (! result.hasKnownValue) {
    13441344                                                SemanticWarning(loc, Warning::GccAttributes,
    13451345                                                        toCString( name, " priorities must be integers from 0 to 65535 inclusive: ", arg ) );
    13461346                                        }
    13471347                                        else {
    1348                                                 auto priority = result.first;
     1348                                                auto priority = result.knownValue;
    13491349                                                if (priority < 101) {
    13501350                                                        SemanticWarning(loc, Warning::GccAttributes,
Note: See TracChangeset for help on using the changeset viewer.