Changeset 525f7ad for src/ResolvExpr/CandidateFinder.cpp
- Timestamp:
- Jun 19, 2024, 3:20:39 PM (4 months ago)
- Branches:
- master
- Children:
- 57e43cd
- Parents:
- 1725989
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r1725989 r525f7ad 696 696 void postvisit( const ast::UntypedInitExpr * initExpr ); 697 697 void postvisit( const ast::QualifiedNameExpr * qualifiedExpr ); 698 void postvisit( const ast::CountExpr * countExpr ); 698 699 699 700 const ast::Expr * makeEnumOffsetCast( const ast::EnumInstType * src, … … 1527 1528 addCandidate( *choice, new ast::SizeofExpr{ sizeofExpr->location, choice->expr } ); 1528 1529 } 1530 } 1531 1532 void Finder::postvisit( const ast::CountExpr * countExpr ) { 1533 assert( countExpr->type ); 1534 auto enumInst = countExpr->type.as<ast::EnumInstType>(); 1535 if ( !enumInst ) { 1536 SemanticError( countExpr, "Count Expression only supports Enum Type as operand: "); 1537 } 1538 addCandidate( ast::ConstantExpr::from_ulong(countExpr->location, enumInst->base->members.size()), tenv ); 1529 1539 } 1530 1540
Note: See TracChangeset
for help on using the changeset viewer.