Skip to content

Commit d924349

Browse files
committed
Sema: Rename AvailabilityWalker to ExprAvailabilityWalker
1 parent 2822baf commit d924349

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ bool swift::diagnoseExplicitUnavailability(
23992399
}
24002400

24012401
namespace {
2402-
class AvailabilityWalker : public ASTWalker {
2402+
class ExprAvailabilityWalker : public ASTWalker {
24032403
/// Describes how the next member reference will be treated as we traverse
24042404
/// the AST.
24052405
enum class MemberAccessContext : unsigned {
@@ -2423,7 +2423,7 @@ class AvailabilityWalker : public ASTWalker {
24232423
ExportContext Where;
24242424

24252425
public:
2426-
AvailabilityWalker(ExportContext Where)
2426+
explicit ExprAvailabilityWalker(ExportContext Where)
24272427
: Context(Where.getDeclContext()->getASTContext()), Where(Where) {}
24282428

24292429
bool shouldWalkIntoSeparatelyCheckedClosure(ClosureExpr *expr) override {
@@ -2694,7 +2694,7 @@ class AvailabilityWalker : public ASTWalker {
26942694
/// Diagnose uses of unavailable declarations. Returns true if a diagnostic
26952695
/// was emitted.
26962696
bool
2697-
AvailabilityWalker::diagnoseDeclRefAvailability(
2697+
ExprAvailabilityWalker::diagnoseDeclRefAvailability(
26982698
ConcreteDeclRef declRef, SourceRange R, const ApplyExpr *call,
26992699
DeclAvailabilityFlags Flags) const {
27002700
if (!declRef)
@@ -2806,8 +2806,8 @@ static bool isIntegerOrFloatingPointType(Type ty, DeclContext *DC,
28062806
/// If this is a call to an unavailable ++ / -- operator, try to diagnose it
28072807
/// with a fixit hint and return true. If not, or if we fail, return false.
28082808
bool
2809-
AvailabilityWalker::diagnoseIncDecRemoval(const ValueDecl *D, SourceRange R,
2810-
const AvailableAttr *Attr) const {
2809+
ExprAvailabilityWalker::diagnoseIncDecRemoval(const ValueDecl *D, SourceRange R,
2810+
const AvailableAttr *Attr) const {
28112811
// We can only produce a fixit if we're talking about ++ or --.
28122812
bool isInc = D->getBaseName() == "++";
28132813
if (!isInc && D->getBaseName() != "--")
@@ -2870,10 +2870,10 @@ AvailabilityWalker::diagnoseIncDecRemoval(const ValueDecl *D, SourceRange R,
28702870
/// If this is a call to an unavailable sizeof family function, diagnose it
28712871
/// with a fixit hint and return true. If not, or if we fail, return false.
28722872
bool
2873-
AvailabilityWalker::diagnoseMemoryLayoutMigration(const ValueDecl *D,
2874-
SourceRange R,
2875-
const AvailableAttr *Attr,
2876-
const ApplyExpr *call) const {
2873+
ExprAvailabilityWalker::diagnoseMemoryLayoutMigration(const ValueDecl *D,
2874+
SourceRange R,
2875+
const AvailableAttr *Attr,
2876+
const ApplyExpr *call) const {
28772877

28782878
if (!D->getModuleContext()->isStdlibModule())
28792879
return false;
@@ -2946,7 +2946,7 @@ void swift::diagnoseExprAvailability(const Expr *E, DeclContext *DC) {
29462946
auto where = ExportContext::forFunctionBody(DC);
29472947
if (where.isImplicit())
29482948
return;
2949-
AvailabilityWalker walker(where);
2949+
ExprAvailabilityWalker walker(where);
29502950
const_cast<Expr*>(E)->walk(walker);
29512951
}
29522952

0 commit comments

Comments
 (0)