Skip to content

Commit d62a9cb

Browse files
committed
Sema: Make isDeclarationUnavailable() static.
It's now unused outside of `TypeCheckAvailability.cpp`.
1 parent 798f0e6 commit d62a9cb

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,7 @@ AvailabilityRange TypeChecker::overApproximateAvailabilityAtLocation(
14781478
return availabilityAtLocation(loc, DC, MostRefined).getPlatformRange();
14791479
}
14801480

1481-
bool TypeChecker::isDeclarationUnavailable(
1481+
static bool isDeclarationUnavailable(
14821482
const Decl *D, const DeclContext *referenceDC,
14831483
llvm::function_ref<AvailabilityRange()> getAvailabilityRange) {
14841484
ASTContext &Context = referenceDC->getASTContext();

lib/Sema/TypeChecker.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,12 +1032,6 @@ diagnosticIfDeclCannotBePotentiallyUnavailable(const Decl *D);
10321032
/// is allowed.
10331033
std::optional<Diagnostic> diagnosticIfDeclCannotBeUnavailable(const Decl *D);
10341034

1035-
/// Same as \c checkDeclarationAvailability but doesn't give a reason for
1036-
/// unavailability.
1037-
bool isDeclarationUnavailable(
1038-
const Decl *D, const DeclContext *referenceDC,
1039-
llvm::function_ref<AvailabilityRange()> getAvailabilityRange);
1040-
10411035
/// Checks whether a declaration should be considered unavailable when
10421036
/// referred to at the given location and, if so, returns the unmet required
10431037
/// version range. Returns None is the declaration is definitely available.

0 commit comments

Comments
 (0)