Changeset 54cd1a51 for src/ResolvExpr


Ignore:
Timestamp:
Feb 11, 2025, 6:08:19 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
502ff9e, a8404d9
Parents:
4d5c5b6a (diff), 691bf0a (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/ResolvExpr/CandidateFinder.cpp

    r4d5c5b6a r54cd1a51  
    14861486
    14871487        void Finder::postvisit( const ast::SizeofExpr * sizeofExpr ) {
     1488                const ast::Type * type = resolveTypeof( sizeofExpr->type, context );
     1489                const ast::Type * sizeType = context.global.sizeType.get();
    14881490                addCandidate(
    1489                         new ast::SizeofExpr{
    1490                                 sizeofExpr->location, resolveTypeof( sizeofExpr->type, context ) },
     1491                        new ast::SizeofExpr( sizeofExpr->location, type, sizeType ),
     1492                        tenv );
     1493        }
     1494
     1495        void Finder::postvisit( const ast::AlignofExpr * alignofExpr ) {
     1496                const ast::Type * type = resolveTypeof( alignofExpr->type, context );
     1497                const ast::Type * sizeType = context.global.sizeType.get();
     1498                addCandidate(
     1499                        new ast::AlignofExpr( alignofExpr->location, type, sizeType ),
    14911500                        tenv );
    14921501        }
     
    15161525        }
    15171526
    1518         void Finder::postvisit( const ast::AlignofExpr * alignofExpr ) {
    1519                 addCandidate(
    1520                         new ast::AlignofExpr{
    1521                                 alignofExpr->location, resolveTypeof( alignofExpr->type, context ) },
    1522                         tenv );
    1523         }
    1524 
    15251527        void Finder::postvisit( const ast::UntypedOffsetofExpr * offsetofExpr ) {
    15261528                const ast::BaseInstType * aggInst;
     
    15291531                else return;
    15301532
     1533                const ast::Type * sizeType = context.global.sizeType.get();
    15311534                for ( const ast::Decl * member : aggInst->lookup( offsetofExpr->member ) ) {
    15321535                        auto dwt = strict_dynamic_cast< const ast::DeclWithType * >( member );
    15331536                        addCandidate(
    1534                                 new ast::OffsetofExpr{ offsetofExpr->location, aggInst, dwt }, tenv );
     1537                                new ast::OffsetofExpr( offsetofExpr->location, aggInst, dwt, sizeType ), tenv );
    15351538                }
    15361539        }
Note: See TracChangeset for help on using the changeset viewer.