- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r525f7ad r85855b0 696 696 void postvisit( const ast::UntypedInitExpr * initExpr ); 697 697 void postvisit( const ast::QualifiedNameExpr * qualifiedExpr ); 698 void postvisit( const ast::CountExpr * countExpr );699 698 700 699 const ast::Expr * makeEnumOffsetCast( const ast::EnumInstType * src, … … 1528 1527 addCandidate( *choice, new ast::SizeofExpr{ sizeofExpr->location, choice->expr } ); 1529 1528 } 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 );1539 1529 } 1540 1530
Note:
See TracChangeset
for help on using the changeset viewer.