Changeset 857b5f9 for src/AST/Expr.cpp


Ignore:
Timestamp:
Jan 23, 2025, 12:09:40 PM (12 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
9e72bae3
Parents:
829821c
Message:

CountExpr -> CountofExpr. Actually the main fix was making countof use the same pattern as sizeof/alignof, using a typeof to combine the two cases and have one field instead of two.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Expr.cpp

    r829821c r857b5f9  
    283283: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), type( t ) {}
    284284
    285 // --- CountExpr
    286 
    287 CountExpr::CountExpr( const CodeLocation & loc, const Expr * e )
    288 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), expr(e), type( nullptr ) {}
    289 
    290 CountExpr::CountExpr( const CodeLocation & loc, const Type * t )
    291 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), expr(nullptr), type( t ) {}
    292 
    293285// --- AlignofExpr
    294286
    295287AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * t )
    296288: Expr( loc, new BasicType{ BasicKind::LongUnsignedInt } ), type( t ) {}
     289
     290// --- CountofExpr
     291
     292CountofExpr::CountofExpr( const CodeLocation & loc, const Type * t )
     293: Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), type( t ) {}
    297294
    298295// --- OffsetofExpr
Note: See TracChangeset for help on using the changeset viewer.