@@ -744,14 +744,6 @@ TypeChecker::checkDeclarationAvailability(const Decl *D, SourceLoc referenceLoc,
744
744
return UnavailabilityReason::requiresVersionRange (version);
745
745
}
746
746
747
- void TypeChecker::diagnosePotentialUnavailability (
748
- const ValueDecl *D, SourceRange ReferenceRange,
749
- const DeclContext *ReferenceDC,
750
- const UnavailabilityReason &Reason) {
751
- diagnosePotentialUnavailability (D, D->getName (), ReferenceRange,
752
- ReferenceDC, Reason);
753
- }
754
-
755
747
// / A class that walks the AST to find the innermost (i.e., deepest) node that
756
748
// / contains a target SourceRange and matches a particular criterion.
757
749
// / This class finds the innermost nodes of interest by walking
@@ -1382,8 +1374,9 @@ void TypeChecker::diagnosePotentialOpaqueTypeUnavailability(
1382
1374
}
1383
1375
1384
1376
void TypeChecker::diagnosePotentialUnavailability (
1385
- const Decl *D, DeclName Name, SourceRange ReferenceRange,
1386
- const DeclContext *ReferenceDC, const UnavailabilityReason &Reason) {
1377
+ const ValueDecl *D, SourceRange ReferenceRange,
1378
+ const DeclContext *ReferenceDC,
1379
+ const UnavailabilityReason &Reason) {
1387
1380
ASTContext &Context = ReferenceDC->getASTContext ();
1388
1381
1389
1382
// We only emit diagnostics for API unavailability, not for explicitly
@@ -1398,7 +1391,7 @@ void TypeChecker::diagnosePotentialUnavailability(
1398
1391
auto Err =
1399
1392
Context.Diags .diagnose (
1400
1393
ReferenceRange.Start , diag::availability_decl_only_version_newer,
1401
- Name , prettyPlatformString (targetPlatform (Context.LangOpts )),
1394
+ D-> getName () , prettyPlatformString (targetPlatform (Context.LangOpts )),
1402
1395
Reason.getRequiredOSVersionRange ().getLowerEndpoint ());
1403
1396
1404
1397
// Direct a fixit to the error if an existing guard is nearly-correct
0 commit comments