Changeset 17fa94f for src/ResolvExpr
- Timestamp:
- Feb 11, 2025, 11:24:07 AM (8 months ago)
- Branches:
- master
- Children:
- 691bf0a
- Parents:
- 3e5e32cf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r3e5e32cf r17fa94f 1486 1486 1487 1487 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(); 1488 1490 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 ), 1491 1500 tenv ); 1492 1501 } … … 1516 1525 } 1517 1526 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 1525 1527 void Finder::postvisit( const ast::UntypedOffsetofExpr * offsetofExpr ) { 1526 1528 const ast::BaseInstType * aggInst; … … 1529 1531 else return; 1530 1532 1533 const ast::Type * sizeType = context.global.sizeType.get(); 1531 1534 for ( const ast::Decl * member : aggInst->lookup( offsetofExpr->member ) ) { 1532 1535 auto dwt = strict_dynamic_cast< const ast::DeclWithType * >( member ); 1533 1536 addCandidate( 1534 new ast::OffsetofExpr { offsetofExpr->location, aggInst, dwt }, tenv );1537 new ast::OffsetofExpr( offsetofExpr->location, aggInst, dwt, sizeType ), tenv ); 1535 1538 } 1536 1539 }
Note:
See TracChangeset
for help on using the changeset viewer.