Changeset d3d54b3 for src/AST/Expr.cpp
- Timestamp:
- Feb 5, 2025, 1:45:29 PM (2 months ago)
- Branches:
- master
- Children:
- ab94c37
- Parents:
- 92aeae1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/AST/Expr.cpp ¶
r92aeae1 rd3d54b3 26 26 #include "Stmt.hpp" 27 27 #include "Type.hpp" 28 #include "Util.hpp" // for TranslationDeps 28 29 #include "TypeSubstitution.hpp" 29 30 #include "Common/Utility.hpp" … … 281 282 282 283 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * t ) 283 : Expr( loc, new BasicType{ BasicKind::LongUnsignedInt }), type( t ) {}284 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {} 284 285 285 286 // --- AlignofExpr 286 287 287 288 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * t ) 288 : Expr( loc, new BasicType{ BasicKind::LongUnsignedInt }), type( t ) {}289 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {} 289 290 290 291 // --- CountofExpr 291 292 292 293 CountofExpr::CountofExpr( const CodeLocation & loc, const Type * t ) 293 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), type( t ) {}294 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {} 294 295 295 296 // --- OffsetofExpr 296 297 297 298 OffsetofExpr::OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem ) 298 : Expr( loc, new BasicType{ BasicKind::LongUnsignedInt }), type( ty ), member( mem ) {299 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( ty ), member( mem ) { 299 300 assert( type ); 300 301 assert( member ); … … 305 306 OffsetPackExpr::OffsetPackExpr( const CodeLocation & loc, const StructInstType * ty ) 306 307 : Expr( loc, new ArrayType{ 307 new BasicType{ BasicKind::LongUnsignedInt }, nullptr, FixedLen, DynamicDim }308 ast::TranslationDeps::getSizeType(), nullptr, FixedLen, DynamicDim } 308 309 ), type( ty ) { 309 310 assert( type );
Note: See TracChangeset
for help on using the changeset viewer.