Changeset 54cd1a51 for src/AST/Expr.cpp


Ignore:
Timestamp:
Feb 11, 2025, 6:08:19 PM (2 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
  • TabularUnified src/AST/Expr.cpp

    r4d5c5b6a r54cd1a51  
    2626#include "Stmt.hpp"
    2727#include "Type.hpp"
    28 #include "Util.hpp"                // for TranslationDeps
    2928#include "TypeSubstitution.hpp"
    3029#include "Common/Utility.hpp"
     
    281280// --- SizeofExpr
    282281
    283 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * t )
    284 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {}
     282SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * type )
     283: SizeofExpr( loc, type, nullptr ) {}
     284
     285SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * type, const Type * result )
     286: Expr( loc, result ), type( type ) {}
    285287
    286288// --- AlignofExpr
    287289
    288 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * t )
    289 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {}
     290AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * type )
     291: AlignofExpr( loc, type, nullptr ) {}
     292
     293AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * type, const Type * result )
     294: Expr( loc, result ), type( type ) {}
    290295
    291296// --- CountofExpr
    292297
    293298CountofExpr::CountofExpr( const CodeLocation & loc, const Type * t )
    294 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {}
     299: Expr( loc ), type( t ) {}
    295300
    296301// --- OffsetofExpr
    297302
    298303OffsetofExpr::OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem )
    299 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( ty ), member( mem ) {
     304: OffsetofExpr( loc, ty, mem, nullptr ) {}
     305
     306OffsetofExpr::OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem, const Type * res )
     307: Expr( loc, res ), type( ty ), member( mem ) {
    300308        assert( type );
    301309        assert( member );
     
    305313
    306314OffsetPackExpr::OffsetPackExpr( const CodeLocation & loc, const StructInstType * ty )
    307 : Expr( loc, new ArrayType{
    308         ast::TranslationDeps::getSizeType(), nullptr, FixedLen, DynamicDim }
    309 ), type( ty ) {
     315: Expr( loc ), type( ty ) {
    310316        assert( type );
    311317}
Note: See TracChangeset for help on using the changeset viewer.