Changes in src/ResolvExpr/Resolver.cc [4559b34:b230091]
- File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (39 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r4559b34 rb230091 9 9 // Author : Aaron B. Moss 10 10 // Created On : Sun May 17 12:17:01 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Feb 1 16:27:14202213 // Update Count : 24 511 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Mar 18 10:41:00 2022 13 // Update Count : 247 14 14 // 15 15 … … 997 997 /// Calls the CandidateFinder and finds the single best candidate 998 998 CandidateRef findUnfinishedKindExpression( 999 const ast::Expr * untyped, const ast::SymbolTable & symtab, const std::string & kind,999 const ast::Expr * untyped, const ResolveContext & context, const std::string & kind, 1000 1000 std::function<bool(const Candidate &)> pred = anyCandidate, ResolvMode mode = {} 1001 1001 ) { … … 1007 1007 ++recursion_level; 1008 1008 ast::TypeEnvironment env; 1009 CandidateFinder finder { symtab, env };1009 CandidateFinder finder( context, env ); 1010 1010 finder.find( untyped, recursion_level == 1 ? mode.atTopLevel() : mode ); 1011 1011 --recursion_level; … … 1129 1129 1130 1130 ast::ptr< ast::Expr > resolveInVoidContext( 1131 const ast::Expr * expr, const ast::SymbolTable & symtab, ast::TypeEnvironment & env 1131 const ast::Expr * expr, const ResolveContext & context, 1132 ast::TypeEnvironment & env 1132 1133 ) { 1133 1134 assertf( expr, "expected a non-null expression" ); … … 1136 1137 ast::ptr< ast::CastExpr > untyped = new ast::CastExpr{ expr }; 1137 1138 CandidateRef choice = findUnfinishedKindExpression( 1138 untyped, symtab, "", anyCandidate, ResolvMode::withAdjustment() );1139 untyped, context, "", anyCandidate, ResolvMode::withAdjustment() ); 1139 1140 1140 1141 // a cast expression has either 0 or 1 interpretations (by language rules); … … 1149 1150 /// context. 1150 1151 ast::ptr< ast::Expr > findVoidExpression( 1151 const ast::Expr * untyped, const ast::SymbolTable & symtab1152 const ast::Expr * untyped, const ResolveContext & context 1152 1153 ) { 1153 1154 ast::TypeEnvironment env; 1154 ast::ptr< ast::Expr > newExpr = resolveInVoidContext( untyped, symtab, env );1155 ast::ptr< ast::Expr > newExpr = resolveInVoidContext( untyped, context, env ); 1155 1156 finishExpr( newExpr, env, untyped->env ); 1156 1157 return newExpr; … … 1163 1164 /// lowest cost, returning the resolved version 1164 1165 ast::ptr< ast::Expr > findKindExpression( 1165 const ast::Expr * untyped, const ast::SymbolTable & symtab,1166 const ast::Expr * untyped, const ResolveContext & context, 1166 1167 std::function<bool(const Candidate &)> pred = anyCandidate, 1167 1168 const std::string & kind = "", ResolvMode mode = {} … … 1169 1170 if ( ! untyped ) return {}; 1170 1171 CandidateRef choice = 1171 findUnfinishedKindExpression( untyped, symtab, kind, pred, mode );1172 findUnfinishedKindExpression( untyped, context, kind, pred, mode ); 1172 1173 ResolvExpr::finishExpr( choice->expr, choice->env, untyped->env ); 1173 1174 return std::move( choice->expr ); … … 1176 1177 /// Resolve `untyped` to the single expression whose candidate is the best match 1177 1178 ast::ptr< ast::Expr > findSingleExpression( 1178 const ast::Expr * untyped, const ast::SymbolTable & symtab1179 const ast::Expr * untyped, const ResolveContext & context 1179 1180 ) { 1180 1181 Stats::ResolveTime::start( untyped ); 1181 auto res = findKindExpression( untyped, symtab);1182 auto res = findKindExpression( untyped, context ); 1182 1183 Stats::ResolveTime::stop(); 1183 1184 return res; … … 1186 1187 1187 1188 ast::ptr< ast::Expr > findSingleExpression( 1188 const ast::Expr * untyped, const ast::Type * type, const ast::SymbolTable & symtab 1189 const ast::Expr * untyped, const ast::Type * type, 1190 const ResolveContext & context 1189 1191 ) { 1190 1192 assert( untyped && type ); 1191 1193 ast::ptr< ast::Expr > castExpr = new ast::CastExpr{ untyped, type }; 1192 ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, symtab);1193 removeExtraneousCast( newExpr, symtab );1194 ast::ptr< ast::Expr > newExpr = findSingleExpression( castExpr, context ); 1195 removeExtraneousCast( newExpr, context.symtab ); 1194 1196 return newExpr; 1195 1197 } … … 1217 1219 /// Resolve `untyped` as an integral expression, returning the resolved version 1218 1220 ast::ptr< ast::Expr > findIntegralExpression( 1219 const ast::Expr * untyped, const ast::SymbolTable & symtab1221 const ast::Expr * untyped, const ResolveContext & context 1220 1222 ) { 1221 return findKindExpression( untyped, symtab, hasIntegralType, "condition" );1223 return findKindExpression( untyped, context, hasIntegralType, "condition" ); 1222 1224 } 1223 1225 … … 1249 1251 // for work previously in GenInit 1250 1252 static InitTweak::ManagedTypes_new managedTypes; 1253 ResolveContext context; 1251 1254 1252 1255 bool inEnumDecl = false; … … 1254 1257 public: 1255 1258 static size_t traceId; 1256 Resolver_new() = default; 1257 Resolver_new( const ast::SymbolTable & syms ) { symtab = syms; } 1259 Resolver_new( const ast::TranslationGlobal & global ) : 1260 context{ symtab, global } {} 1261 Resolver_new( const ResolveContext & context ) : 1262 ast::WithSymbolTable{ context.symtab }, 1263 context{ symtab, context.global } {} 1258 1264 1259 1265 const ast::FunctionDecl * previsit( const ast::FunctionDecl * ); … … 1272 1278 const ast::AsmStmt * previsit( const ast::AsmStmt * ); 1273 1279 const ast::IfStmt * previsit( const ast::IfStmt * ); 1274 const ast::WhileDoStmt * previsit( const ast::WhileDoStmt * );1280 const ast::WhileDoStmt * previsit( const ast::WhileDoStmt * ); 1275 1281 const ast::ForStmt * previsit( const ast::ForStmt * ); 1276 1282 const ast::SwitchStmt * previsit( const ast::SwitchStmt * ); 1277 const ast::Case Stmt * previsit( const ast::CaseStmt* );1283 const ast::CaseClause * previsit( const ast::CaseClause * ); 1278 1284 const ast::BranchStmt * previsit( const ast::BranchStmt * ); 1279 1285 const ast::ReturnStmt * previsit( const ast::ReturnStmt * ); 1280 1286 const ast::ThrowStmt * previsit( const ast::ThrowStmt * ); 1281 const ast::Catch Stmt * previsit( const ast::CatchStmt* );1282 const ast::Catch Stmt * postvisit( const ast::CatchStmt* );1287 const ast::CatchClause * previsit( const ast::CatchClause * ); 1288 const ast::CatchClause * postvisit( const ast::CatchClause * ); 1283 1289 const ast::WaitForStmt * previsit( const ast::WaitForStmt * ); 1284 1290 const ast::WithStmt * previsit( const ast::WithStmt * ); … … 1299 1305 1300 1306 void resolve( ast::TranslationUnit& translationUnit ) { 1301 ast::Pass< Resolver_new >::run( translationUnit );1307 ast::Pass< Resolver_new >::run( translationUnit, translationUnit.global ); 1302 1308 } 1303 1309 1304 1310 ast::ptr< ast::Init > resolveCtorInit( 1305 const ast::ConstructorInit * ctorInit, const ast::SymbolTable & symtab1311 const ast::ConstructorInit * ctorInit, const ResolveContext & context 1306 1312 ) { 1307 1313 assert( ctorInit ); 1308 ast::Pass< Resolver_new > resolver { symtab };1314 ast::Pass< Resolver_new > resolver( context ); 1309 1315 return ctorInit->accept( resolver ); 1310 1316 } 1311 1317 1312 1318 const ast::Expr * resolveStmtExpr( 1313 const ast::StmtExpr * stmtExpr, const ast::SymbolTable & symtab1319 const ast::StmtExpr * stmtExpr, const ResolveContext & context 1314 1320 ) { 1315 1321 assert( stmtExpr ); 1316 ast::Pass< Resolver_new > resolver { symtab };1322 ast::Pass< Resolver_new > resolver( context ); 1317 1323 auto ret = mutate(stmtExpr->accept(resolver)); 1318 1324 strict_dynamic_cast< ast::StmtExpr * >( ret )->computeResult(); … … 1321 1327 1322 1328 namespace { 1323 const ast::Attribute * handleAttribute(const CodeLocation & loc, const ast::Attribute * attr, const ast::SymbolTable & symtab) {1329 const ast::Attribute * handleAttribute(const CodeLocation & loc, const ast::Attribute * attr, const ResolveContext & context) { 1324 1330 std::string name = attr->normalizedName(); 1325 1331 if (name == "constructor" || name == "destructor") { 1326 1332 if (attr->params.size() == 1) { 1327 1333 auto arg = attr->params.front(); 1328 auto resolved = ResolvExpr::findSingleExpression( arg, new ast::BasicType( ast::BasicType::LongLongSignedInt ), symtab);1334 auto resolved = ResolvExpr::findSingleExpression( arg, new ast::BasicType( ast::BasicType::LongLongSignedInt ), context ); 1329 1335 auto result = eval(arg); 1330 1336 … … 1369 1375 1370 1376 for (auto & attr: mutDecl->attributes) { 1371 attr = handleAttribute(mutDecl->location, attr, symtab);1377 attr = handleAttribute(mutDecl->location, attr, context ); 1372 1378 } 1373 1379 … … 1379 1385 for (auto & typeParam : mutDecl->type_params) { 1380 1386 symtab.addType(typeParam); 1381 mutType->forall.emplace_back(new ast::TypeInstType(typeParam ->name, typeParam));1387 mutType->forall.emplace_back(new ast::TypeInstType(typeParam)); 1382 1388 } 1383 1389 for (auto & asst : mutDecl->assertions) { 1384 asst = fixObjectType(asst.strict_as<ast::ObjectDecl>(), symtab);1390 asst = fixObjectType(asst.strict_as<ast::ObjectDecl>(), context); 1385 1391 symtab.addId(asst); 1386 1392 mutType->assertions.emplace_back(new ast::VariableExpr(functionDecl->location, asst)); … … 1394 1400 1395 1401 for (auto & param : mutDecl->params) { 1396 param = fixObjectType(param.strict_as<ast::ObjectDecl>(), symtab);1402 param = fixObjectType(param.strict_as<ast::ObjectDecl>(), context); 1397 1403 symtab.addId(param); 1398 1404 paramTypes.emplace_back(param->get_type()); 1399 1405 } 1400 1406 for (auto & ret : mutDecl->returns) { 1401 ret = fixObjectType(ret.strict_as<ast::ObjectDecl>(), symtab);1407 ret = fixObjectType(ret.strict_as<ast::ObjectDecl>(), context); 1402 1408 returnTypes.emplace_back(ret->get_type()); 1403 1409 } … … 1470 1476 // enumerator initializers should not use the enum type to initialize, since the 1471 1477 // enum type is still incomplete at this point. Use `int` instead. 1472 1473 if (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base) { // const ast::PointerType & 1474 const ast::Type * enumBase = (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get()); 1475 const ast::PointerType * enumBaseAsPtr = dynamic_cast<const ast::PointerType *>(enumBase); 1476 1477 if ( enumBaseAsPtr ) { 1478 const ast::Type * pointerBase = enumBaseAsPtr->base.get(); 1479 if ( dynamic_cast<const ast::BasicType *>(pointerBase) ) { 1480 objectDecl = fixObjectType(objectDecl, symtab); 1481 if (dynamic_cast<const ast::BasicType *>(pointerBase)->kind == ast::BasicType::Char) 1482 currentObject = ast::CurrentObject{ 1483 objectDecl->location, new ast::PointerType{ 1484 new ast::BasicType{ ast::BasicType::Char } 1485 } }; 1486 } else { 1487 objectDecl = fixObjectType(objectDecl, symtab); 1488 currentObject = ast::CurrentObject{objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } }; 1489 } 1490 } 1491 } else { 1492 objectDecl = fixObjectType(objectDecl, symtab); 1493 currentObject = ast::CurrentObject{ 1494 objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } }; 1495 } 1496 1478 objectDecl = fixObjectType(objectDecl, context); 1479 currentObject = ast::CurrentObject{ 1480 objectDecl->location, new ast::BasicType{ ast::BasicType::SignedInt } }; 1497 1481 } 1498 1482 else { 1499 1483 if (!objectDecl->isTypeFixed) { 1500 auto newDecl = fixObjectType(objectDecl, symtab);1484 auto newDecl = fixObjectType(objectDecl, context); 1501 1485 auto mutDecl = mutate(newDecl); 1502 1486 … … 1529 1513 // nested type decls are hoisted already. no need to do anything 1530 1514 if (auto obj = member.as<ast::ObjectDecl>()) { 1531 member = fixObjectType(obj, symtab);1515 member = fixObjectType(obj, context); 1532 1516 } 1533 1517 } … … 1552 1536 return ast::mutate_field( 1553 1537 assertDecl, &ast::StaticAssertDecl::cond, 1554 findIntegralExpression( assertDecl->cond, symtab) );1538 findIntegralExpression( assertDecl->cond, context ) ); 1555 1539 } 1556 1540 1557 1541 template< typename PtrType > 1558 const PtrType * handlePtrType( const PtrType * type, const ast::SymbolTable & symtab) {1542 const PtrType * handlePtrType( const PtrType * type, const ResolveContext & context ) { 1559 1543 if ( type->dimension ) { 1560 ast::ptr< ast::Type > sizeType = ast::sizeType;1544 ast::ptr< ast::Type > sizeType = context.global.sizeType; 1561 1545 ast::mutate_field( 1562 1546 type, &PtrType::dimension, 1563 findSingleExpression( type->dimension, sizeType, symtab) );1547 findSingleExpression( type->dimension, sizeType, context ) ); 1564 1548 } 1565 1549 return type; … … 1567 1551 1568 1552 const ast::ArrayType * Resolver_new::previsit( const ast::ArrayType * at ) { 1569 return handlePtrType( at, symtab);1553 return handlePtrType( at, context ); 1570 1554 } 1571 1555 1572 1556 const ast::PointerType * Resolver_new::previsit( const ast::PointerType * pt ) { 1573 return handlePtrType( pt, symtab);1557 return handlePtrType( pt, context ); 1574 1558 } 1575 1559 … … 1579 1563 1580 1564 return ast::mutate_field( 1581 exprStmt, &ast::ExprStmt::expr, findVoidExpression( exprStmt->expr, symtab) );1565 exprStmt, &ast::ExprStmt::expr, findVoidExpression( exprStmt->expr, context ) ); 1582 1566 } 1583 1567 … … 1586 1570 1587 1571 asmExpr = ast::mutate_field( 1588 asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, symtab) );1572 asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, context ) ); 1589 1573 1590 1574 return asmExpr; … … 1600 1584 const ast::IfStmt * Resolver_new::previsit( const ast::IfStmt * ifStmt ) { 1601 1585 return ast::mutate_field( 1602 ifStmt, &ast::IfStmt::cond, findIntegralExpression( ifStmt->cond, symtab) );1586 ifStmt, &ast::IfStmt::cond, findIntegralExpression( ifStmt->cond, context ) ); 1603 1587 } 1604 1588 1605 1589 const ast::WhileDoStmt * Resolver_new::previsit( const ast::WhileDoStmt * whileDoStmt ) { 1606 1590 return ast::mutate_field( 1607 whileDoStmt, &ast::WhileDoStmt::cond, findIntegralExpression( whileDoStmt->cond, symtab) );1591 whileDoStmt, &ast::WhileDoStmt::cond, findIntegralExpression( whileDoStmt->cond, context ) ); 1608 1592 } 1609 1593 … … 1611 1595 if ( forStmt->cond ) { 1612 1596 forStmt = ast::mutate_field( 1613 forStmt, &ast::ForStmt::cond, findIntegralExpression( forStmt->cond, symtab) );1597 forStmt, &ast::ForStmt::cond, findIntegralExpression( forStmt->cond, context ) ); 1614 1598 } 1615 1599 1616 1600 if ( forStmt->inc ) { 1617 1601 forStmt = ast::mutate_field( 1618 forStmt, &ast::ForStmt::inc, findVoidExpression( forStmt->inc, symtab) );1602 forStmt, &ast::ForStmt::inc, findVoidExpression( forStmt->inc, context ) ); 1619 1603 } 1620 1604 … … 1626 1610 switchStmt = ast::mutate_field( 1627 1611 switchStmt, &ast::SwitchStmt::cond, 1628 findIntegralExpression( switchStmt->cond, symtab) );1612 findIntegralExpression( switchStmt->cond, context ) ); 1629 1613 currentObject = ast::CurrentObject{ switchStmt->location, switchStmt->cond->result }; 1630 1614 return switchStmt; 1631 1615 } 1632 1616 1633 const ast::Case Stmt * Resolver_new::previsit( const ast::CaseStmt* caseStmt ) {1617 const ast::CaseClause * Resolver_new::previsit( const ast::CaseClause * caseStmt ) { 1634 1618 if ( caseStmt->cond ) { 1635 1619 std::deque< ast::InitAlternative > initAlts = currentObject.getOptions(); … … 1639 1623 ast::ptr< ast::Expr > untyped = 1640 1624 new ast::CastExpr{ caseStmt->location, caseStmt->cond, initAlts.front().type }; 1641 ast::ptr< ast::Expr > newExpr = findSingleExpression( untyped, symtab);1625 ast::ptr< ast::Expr > newExpr = findSingleExpression( untyped, context ); 1642 1626 1643 1627 // case condition cannot have a cast in C, so it must be removed here, regardless of … … 1647 1631 } 1648 1632 1649 caseStmt = ast::mutate_field( caseStmt, &ast::Case Stmt::cond, newExpr );1633 caseStmt = ast::mutate_field( caseStmt, &ast::CaseClause::cond, newExpr ); 1650 1634 } 1651 1635 return caseStmt; … … 1660 1644 branchStmt = ast::mutate_field( 1661 1645 branchStmt, &ast::BranchStmt::computedTarget, 1662 findSingleExpression( branchStmt->computedTarget, target, symtab) );1646 findSingleExpression( branchStmt->computedTarget, target, context ) ); 1663 1647 } 1664 1648 return branchStmt; … … 1670 1654 returnStmt = ast::mutate_field( 1671 1655 returnStmt, &ast::ReturnStmt::expr, 1672 findSingleExpression( returnStmt->expr, functionReturn, symtab) );1656 findSingleExpression( returnStmt->expr, functionReturn, context ) ); 1673 1657 } 1674 1658 return returnStmt; … … 1685 1669 throwStmt = ast::mutate_field( 1686 1670 throwStmt, &ast::ThrowStmt::expr, 1687 findSingleExpression( throwStmt->expr, exceptType, symtab) );1671 findSingleExpression( throwStmt->expr, exceptType, context ) ); 1688 1672 } 1689 1673 return throwStmt; 1690 1674 } 1691 1675 1692 const ast::Catch Stmt * Resolver_new::previsit( const ast::CatchStmt * catchStmt) {1676 const ast::CatchClause * Resolver_new::previsit( const ast::CatchClause * catchClause ) { 1693 1677 // Until we are very sure this invarent (ifs that move between passes have then) 1694 1678 // holds, check it. This allows a check for when to decode the mangling. 1695 if ( auto ifStmt = catch Stmt->body.as<ast::IfStmt>() ) {1679 if ( auto ifStmt = catchClause->body.as<ast::IfStmt>() ) { 1696 1680 assert( ifStmt->then ); 1697 1681 } 1698 1682 // Encode the catchStmt so the condition can see the declaration. 1699 if ( catch Stmt->cond ) {1700 ast::Catch Stmt * stmt = mutate( catchStmt);1701 stmt->body = new ast::IfStmt( stmt->location, stmt->cond, nullptr, stmt->body );1702 stmt->cond = nullptr;1703 return stmt;1704 } 1705 return catch Stmt;1706 } 1707 1708 const ast::Catch Stmt * Resolver_new::postvisit( const ast::CatchStmt * catchStmt) {1683 if ( catchClause->cond ) { 1684 ast::CatchClause * clause = mutate( catchClause ); 1685 clause->body = new ast::IfStmt( clause->location, clause->cond, nullptr, clause->body ); 1686 clause->cond = nullptr; 1687 return clause; 1688 } 1689 return catchClause; 1690 } 1691 1692 const ast::CatchClause * Resolver_new::postvisit( const ast::CatchClause * catchClause ) { 1709 1693 // Decode the catchStmt so everything is stored properly. 1710 const ast::IfStmt * ifStmt = catch Stmt->body.as<ast::IfStmt>();1694 const ast::IfStmt * ifStmt = catchClause->body.as<ast::IfStmt>(); 1711 1695 if ( nullptr != ifStmt && nullptr == ifStmt->then ) { 1712 1696 assert( ifStmt->cond ); 1713 1697 assert( ifStmt->else_ ); 1714 ast::Catch Stmt * stmt = ast::mutate( catchStmt);1715 stmt->cond = ifStmt->cond;1716 stmt->body = ifStmt->else_;1698 ast::CatchClause * clause = ast::mutate( catchClause ); 1699 clause->cond = ifStmt->cond; 1700 clause->body = ifStmt->else_; 1717 1701 // ifStmt should be implicately deleted here. 1718 return stmt;1719 } 1720 return catch Stmt;1702 return clause; 1703 } 1704 return catchClause; 1721 1705 } 1722 1706 … … 1729 1713 1730 1714 ast::TypeEnvironment env; 1731 CandidateFinder funcFinder { symtab, env };1715 CandidateFinder funcFinder( context, env ); 1732 1716 1733 1717 // Find all candidates for a function in canonical form … … 1943 1927 ); 1944 1928 1945 clause2.target.args.emplace_back( findSingleExpression( init, symtab) );1929 clause2.target.args.emplace_back( findSingleExpression( init, context ) ); 1946 1930 } 1947 1931 1948 1932 // Resolve the conditions as if it were an IfStmt, statements normally 1949 clause2.cond = findSingleExpression( clause.cond, symtab);1933 clause2.cond = findSingleExpression( clause.cond, context ); 1950 1934 clause2.stmt = clause.stmt->accept( *visitor ); 1951 1935 … … 1962 1946 ast::ptr< ast::Type > target = 1963 1947 new ast::BasicType{ ast::BasicType::LongLongUnsignedInt }; 1964 timeout2.time = findSingleExpression( stmt->timeout.time, target, symtab);1965 timeout2.cond = findSingleExpression( stmt->timeout.cond, symtab);1948 timeout2.time = findSingleExpression( stmt->timeout.time, target, context ); 1949 timeout2.cond = findSingleExpression( stmt->timeout.cond, context ); 1966 1950 timeout2.stmt = stmt->timeout.stmt->accept( *visitor ); 1967 1951 … … 1976 1960 ast::WaitForStmt::OrElse orElse2; 1977 1961 1978 orElse2.cond = findSingleExpression( stmt->orElse.cond, symtab);1962 orElse2.cond = findSingleExpression( stmt->orElse.cond, context ); 1979 1963 orElse2.stmt = stmt->orElse.stmt->accept( *visitor ); 1980 1964 … … 1997 1981 for (auto & expr : exprs) { 1998 1982 // only struct- and union-typed expressions are viable candidates 1999 expr = findKindExpression( expr, symtab, structOrUnion, "with expression" );1983 expr = findKindExpression( expr, context, structOrUnion, "with expression" ); 2000 1984 2001 1985 // if with expression might be impure, create a temporary so that it is evaluated once … … 2023 2007 ast::ptr< ast::Expr > untyped = new ast::UntypedInitExpr{ 2024 2008 singleInit->location, singleInit->value, currentObject.getOptions() }; 2025 ast::ptr<ast::Expr> newExpr = findSingleExpression( untyped, symtab);2009 ast::ptr<ast::Expr> newExpr = findSingleExpression( untyped, context ); 2026 2010 const ast::InitExpr * initExpr = newExpr.strict_as< ast::InitExpr >(); 2027 2011
Note:
See TracChangeset
for help on using the changeset viewer.