@@ -1554,7 +1554,7 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1554
1554
return ;
1555
1555
if (auto *Added = findAddedDecl (Node)) {
1556
1556
if (Node->getDeclKind () != DeclKind::Constructor) {
1557
- Diags.diagnose (diag::moved_decl, Node->getScreenInfo (),
1557
+ Diags.diagnose (SourceLoc (), diag::moved_decl, Node->getScreenInfo (),
1558
1558
Ctx.buffer ((Twine (getDeclKindStr (Added->getDeclKind ())) + " " +
1559
1559
Added->getFullyQualifiedName ()).str ()));
1560
1560
return ;
@@ -1566,7 +1566,7 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1566
1566
auto It = std::find_if (MemberChanges.begin (), MemberChanges.end (),
1567
1567
[&](TypeMemberDiffItem &Item) { return Item.usr == Node->getUsr (); });
1568
1568
if (It != MemberChanges.end ()) {
1569
- Diags.diagnose (diag::renamed_decl, Node->getScreenInfo (),
1569
+ Diags.diagnose (SourceLoc (), diag::renamed_decl, Node->getScreenInfo (),
1570
1570
Ctx.buffer ((Twine (getDeclKindStr (Node->getDeclKind ())) + " " +
1571
1571
It->newTypeName + " ." + It->newPrintedName ).str ()));
1572
1572
return ;
@@ -1577,7 +1577,7 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1577
1577
// refine diagnostics message instead of showing the type alias has been
1578
1578
// removed.
1579
1579
if (TypeAliasUpdateMap.find ((SDKNode*)Node) != TypeAliasUpdateMap.end ()) {
1580
- Diags.diagnose (diag::raw_type_change, Node->getScreenInfo (),
1580
+ Diags.diagnose (SourceLoc (), diag::raw_type_change, Node->getScreenInfo (),
1581
1581
Node->getAs <SDKNodeDeclTypeAlias>()->getUnderlyingType ()->getPrintedName (),
1582
1582
TypeAliasUpdateMap[(SDKNode*)Node]->getAs <SDKNodeDeclType>()->
1583
1583
getRawValueType ()->getPrintedName ());
@@ -1599,28 +1599,29 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1599
1599
}
1600
1600
if (FoundInSuperclass)
1601
1601
return ;
1602
- Diags.diagnose (diag::removed_decl, Node->getScreenInfo (), Node->isDeprecated ());
1602
+ Diags.diagnose (SourceLoc (), diag::removed_decl, Node->getScreenInfo (),
1603
+ Node->isDeprecated ());
1603
1604
return ;
1604
1605
}
1605
1606
case NodeAnnotation::Rename: {
1606
1607
auto *Count = UpdateMap.findUpdateCounterpart (Node)->getAs <SDKNodeDecl>();
1607
- Diags.diagnose (diag::renamed_decl, Node->getScreenInfo (),
1608
+ Diags.diagnose (SourceLoc (), diag::renamed_decl, Node->getScreenInfo (),
1608
1609
Ctx.buffer ((Twine (getDeclKindStr (Count->getDeclKind ())) + " " +
1609
1610
Count->getFullyQualifiedName ()).str ()));
1610
1611
return ;
1611
1612
}
1612
1613
case NodeAnnotation::NowMutating: {
1613
- Diags.diagnose (diag::decl_new_attr, Node->getScreenInfo (),
1614
+ Diags.diagnose (SourceLoc (), diag::decl_new_attr, Node->getScreenInfo (),
1614
1615
Ctx.buffer (" mutating" ));
1615
1616
return ;
1616
1617
}
1617
1618
case NodeAnnotation::NowThrowing: {
1618
- Diags.diagnose (diag::decl_new_attr, Node->getScreenInfo (),
1619
+ Diags.diagnose (SourceLoc (), diag::decl_new_attr, Node->getScreenInfo (),
1619
1620
Ctx.buffer (" throwing" ));
1620
1621
return ;
1621
1622
}
1622
1623
case NodeAnnotation::StaticChange: {
1623
- Diags.diagnose (diag::decl_new_attr, Node->getScreenInfo (),
1624
+ Diags.diagnose (SourceLoc (), diag::decl_new_attr, Node->getScreenInfo (),
1624
1625
Ctx.buffer (Node->isStatic () ? " not static" : " static" ));
1625
1626
return ;
1626
1627
}
@@ -1631,13 +1632,13 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1631
1632
return keywordOf (O);
1632
1633
};
1633
1634
auto *Count = UpdateMap.findUpdateCounterpart (Node)->getAs <SDKNodeDecl>();
1634
- Diags.diagnose (diag::decl_attr_change, Node->getScreenInfo (),
1635
+ Diags.diagnose (SourceLoc (), diag::decl_attr_change, Node->getScreenInfo (),
1635
1636
getOwnershipDescription (Node->getReferenceOwnership ()),
1636
1637
getOwnershipDescription (Count->getReferenceOwnership ()));
1637
1638
return ;
1638
1639
}
1639
1640
case NodeAnnotation::ChangeGenericSignature: {
1640
- Diags.diagnose (diag::generic_sig_change, Node->getScreenInfo (),
1641
+ Diags.diagnose (SourceLoc (), diag::generic_sig_change, Node->getScreenInfo (),
1641
1642
Node->getGenericSignature (), UpdateMap.findUpdateCounterpart (Node)->
1642
1643
getAs<SDKNodeDecl>()->getGenericSignature ());
1643
1644
return ;
@@ -1654,7 +1655,7 @@ void DiagnosisEmitter::handle(const SDKNodeDecl *Node, NodeAnnotation Anno) {
1654
1655
Ctx.buffer ((llvm::Twine (" without " ) + It->Content ).str ()):
1655
1656
Ctx.buffer ((llvm::Twine (" with " ) + It->Content ).str ());
1656
1657
if (options::Abi)
1657
- Diags.diagnose (diag::decl_new_attr, Node->getScreenInfo (), Desc);
1658
+ Diags.diagnose (SourceLoc (), diag::decl_new_attr, Node->getScreenInfo (), Desc);
1658
1659
return ;
1659
1660
}
1660
1661
}
@@ -1684,7 +1685,7 @@ void DiagnosisEmitter::visitType(SDKNodeType *Node) {
1684
1685
SDKNodeDeclAbstractFunc::getTypeRoleDescription (Ctx, Parent->getChildIndex (Node)) :
1685
1686
Ctx.buffer (" declared" );
1686
1687
if (Node->getPrintedName () != Count->getPrintedName ())
1687
- Diags.diagnose (diag::decl_type_change, Parent->getScreenInfo (),
1688
+ Diags.diagnose (SourceLoc (), diag::decl_type_change, Parent->getScreenInfo (),
1688
1689
Descriptor, Node->getPrintedName (), Count->getPrintedName ());
1689
1690
break ;
1690
1691
default :
0 commit comments