@@ -383,7 +383,6 @@ class ScopeCreator final {
383
383
384
384
// A safe way to discover this, without creating a circular request.
385
385
// Cannot call getAttachedPropertyWrappers.
386
- // rdar://55263708
387
386
static bool hasAttachedPropertyWrapper (VarDecl *vd) {
388
387
return AttachedPropertyWrapperScope::getSourceRangeOfVarDecl (vd).isValid ();
389
388
}
@@ -432,21 +431,22 @@ class ScopeCreator final {
432
431
if (auto *specializeAttr = dyn_cast<SpecializeAttr>(attr))
433
432
sortedSpecializeAttrs.push_back (specializeAttr);
434
433
}
435
- // Part of rdar://53921774 rm extra copy
434
+ // TODO: rm extra copy
436
435
for (auto *specializeAttr : sortBySourceRange (sortedSpecializeAttrs))
437
436
fn (specializeAttr);
438
437
}
439
438
440
439
std::vector<ASTNode> expandIfConfigClausesThenCullAndSortElementsOrMembers (
441
440
ArrayRef<ASTNode> input) const {
442
441
auto cleanedupNodes = sortBySourceRange (cull (expandIfConfigClauses (input)));
443
- // TODO: uncomment when working on rdar://53627317
442
+ // TODO: uncomment when working on not creating two pattern binding decls at
443
+ // same location.
444
444
// findCollidingPatterns(cleanedupNodes);
445
445
return cleanedupNodes;
446
446
}
447
447
448
448
public:
449
- // / When ASTScopes are enabled for code completion, rdar://53321156
449
+ // / When ASTScopes are enabled for code completion,
450
450
// / IfConfigs will pose a challenge because we may need to field lookups into
451
451
// / the inactive clauses, but the AST contains redundancy: the active clause's
452
452
// / elements are present in the members or elements of an IterableTypeDecl or
@@ -484,7 +484,7 @@ class ScopeCreator final {
484
484
if (auto *const cond = clause.Cond )
485
485
expansion.push_back (cond);
486
486
if (clause.isActive ) {
487
- // rdar://53922172
487
+ // TODO: Move this check into ASTVerifier
488
488
ASTScopeAssert (isInAnActiveNode, " Clause should not be marked active "
489
489
" unless it's context is active" );
490
490
// get inactive nodes that nest in active clauses
@@ -506,7 +506,8 @@ class ScopeCreator final {
506
506
// / because they overlap EnumElements and AST includes the elements in the
507
507
// / members.
508
508
std::vector<ASTNode> cull (ArrayRef<ASTNode> input) const {
509
- // When working on rdar://53971116 may have to cull more.
509
+ // TODO: Investigate whether to move the real EndLoc tracking of
510
+ // SubscriptDecl up into AbstractStorageDecl. May have to cull more.
510
511
std::vector<ASTNode> culled;
511
512
llvm::copy_if (input, std::back_inserter (culled), [&](ASTNode n) {
512
513
ASTScopeAssert (
@@ -519,7 +520,8 @@ class ScopeCreator final {
519
520
}
520
521
521
522
// / TODO: The parser yields two decls at the same source loc with the same
522
- // / kind. Call me when tackling rdar://53627317, then move this to
523
+ // / kind. TODO: me when fixing parser's proclivity to create two
524
+ // / PatternBindingDecls at the same source location, then move this to
523
525
// / ASTVerifier.
524
526
// /
525
527
// / In all cases the first pattern seems to carry the initializer, and the
@@ -584,7 +586,6 @@ class ScopeCreator final {
584
586
}
585
587
}
586
588
587
- // / See rdar://53921962
588
589
// / Templated to work on either ASTNodes, Decl*'s, or whatnot.
589
590
template <typename Rangeable>
590
591
std::vector<Rangeable>
@@ -921,9 +922,10 @@ class NodeAdder
921
922
auto *insertionPoint = parentScope;
922
923
for (unsigned i = 0 ; i < patternBinding->getPatternList ().size (); ++i) {
923
924
// TODO: Won't need to do so much work to avoid creating one without
924
- // a SourceRange once rdar://53627317 is done and
925
- // getSourceRangeOfThisASTNode for PatternEntryDeclScope is simplified to
926
- // use the PatternEntry's source range.
925
+ // a SourceRange once parser is fixed to not create two
926
+ // PatternBindingDecls with same locaiton and getSourceRangeOfThisASTNode
927
+ // for PatternEntryDeclScope is simplified to use the PatternEntry's
928
+ // source range.
927
929
auto &patternEntry = patternBinding->getPatternList ()[i];
928
930
if (!patternEntry.getOriginalInit ()) {
929
931
bool found = false ;
@@ -1027,7 +1029,6 @@ void ScopeCreator::addChildrenForAllLocalizableAccessorsInSourceOrder(
1027
1029
});
1028
1030
1029
1031
// Sort in order to include synthesized ones, which are out of order.
1030
- // Part of rdar://53921774 rm extra copy
1031
1032
for (auto *accessor : sortBySourceRange (accessorsToScope))
1032
1033
addToScopeTree (accessor, parent);
1033
1034
}
@@ -1302,7 +1303,8 @@ GenericTypeOrExtensionScope::expandAScopeThatCreatesANewInsertionPoint(
1302
1303
AnnotatedInsertionPoint
1303
1304
BraceStmtScope::expandAScopeThatCreatesANewInsertionPoint (
1304
1305
ScopeCreator &scopeCreator) {
1305
- // TODO: remove the sort after performing rdar://53254395
1306
+ // TODO: remove the sort after fixing parser to create brace statement
1307
+ // elements in source order
1306
1308
auto *insertionPoint =
1307
1309
scopeCreator.addSiblingsToScopeTree (this , this , stmt->getElements ());
1308
1310
if (auto *s = scopeCreator.getASTContext ().Stats )
@@ -1346,7 +1348,6 @@ void AbstractFunctionDeclScope::expandAScopeThatDoesNotCreateANewInsertionPoint(
1346
1348
leaf = scopeCreator.addNestedGenericParamScopesToTree (
1347
1349
decl, decl->getGenericParams (), leaf);
1348
1350
if (isLocalizable (decl) && getParmsSourceLocOfAFD (decl).isValid ()) {
1349
- // See rdar://54188611
1350
1351
// swift::createDesignatedInitOverride just clones the parameters, so they
1351
1352
// end up with a bogus SourceRange, maybe *before* the start of the
1352
1353
// function.
@@ -1441,8 +1442,6 @@ void ForEachStmtScope::expandAScopeThatDoesNotCreateANewInsertionPoint(
1441
1442
// let v: C { for b : Int -> S((array: P { }
1442
1443
// the body is implicit and it would overlap the source range of the expr
1443
1444
// above.
1444
- //
1445
- // TODO: refer to rdar://53921962
1446
1445
if (!stmt->getBody ()->isImplicit ()) {
1447
1446
if (isLocalizable (stmt->getBody ()))
1448
1447
scopeCreator.constructExpandAndInsertUncheckable <ForEachPatternScope>(
@@ -1547,7 +1546,6 @@ ASTScopeImpl *GenericTypeOrExtensionWholePortion::expandScope(
1547
1546
1548
1547
// Prevent circular request bugs caused by illegal input and
1549
1548
// doing lookups that getExtendedNominal in the midst of getExtendedNominal.
1550
- // rdar://53972776
1551
1549
if (scope->shouldHaveABody () && !scope->doesDeclHaveABody ())
1552
1550
return ip;
1553
1551
0 commit comments