Changeset 54cd1a51 for src/AST/Expr.cpp
- Timestamp:
- Feb 11, 2025, 6:08:19 PM (2 months ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/AST/Expr.cpp ¶
r4d5c5b6a r54cd1a51 26 26 #include "Stmt.hpp" 27 27 #include "Type.hpp" 28 #include "Util.hpp" // for TranslationDeps29 28 #include "TypeSubstitution.hpp" 30 29 #include "Common/Utility.hpp" … … 281 280 // --- SizeofExpr 282 281 283 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * t ) 284 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {} 282 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * type ) 283 : SizeofExpr( loc, type, nullptr ) {} 284 285 SizeofExpr::SizeofExpr( const CodeLocation & loc, const Type * type, const Type * result ) 286 : Expr( loc, result ), type( type ) {} 285 287 286 288 // --- AlignofExpr 287 289 288 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * t ) 289 : Expr( loc, ast::TranslationDeps::getSizeType() ), type( t ) {} 290 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * type ) 291 : AlignofExpr( loc, type, nullptr ) {} 292 293 AlignofExpr::AlignofExpr( const CodeLocation & loc, const Type * type, const Type * result ) 294 : Expr( loc, result ), type( type ) {} 290 295 291 296 // --- CountofExpr 292 297 293 298 CountofExpr::CountofExpr( const CodeLocation & loc, const Type * t ) 294 : Expr( loc , ast::TranslationDeps::getSizeType()), type( t ) {}299 : Expr( loc ), type( t ) {} 295 300 296 301 // --- OffsetofExpr 297 302 298 303 OffsetofExpr::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 306 OffsetofExpr::OffsetofExpr( const CodeLocation & loc, const Type * ty, const DeclWithType * mem, const Type * res ) 307 : Expr( loc, res ), type( ty ), member( mem ) { 300 308 assert( type ); 301 309 assert( member ); … … 305 313 306 314 OffsetPackExpr::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 ) { 310 316 assert( type ); 311 317 }
Note: See TracChangeset
for help on using the changeset viewer.