Skip to content

Commit 864a4d7

Browse files
committed
[Sema] NFC: Remove some unused code
1 parent e770bbe commit 864a4d7

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

lib/Sema/TypeCheckPattern.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -225,39 +225,7 @@ struct ExprToDeclRefTypeRepr : public ASTVisitor<ExprToDeclRefTypeRepr, bool> {
225225
};
226226
} // end anonymous namespace
227227

228-
229-
namespace {
230-
class UnresolvedPatternFinder : public ASTWalker {
231-
bool &HadUnresolvedPattern;
232-
public:
233-
234-
UnresolvedPatternFinder(bool &HadUnresolvedPattern)
235-
: HadUnresolvedPattern(HadUnresolvedPattern) {}
236-
237-
MacroWalking getMacroWalkingBehavior() const override {
238-
return MacroWalking::Arguments;
239-
}
240-
241-
PreWalkResult<Expr *> walkToExprPre(Expr *E) override {
242-
// If we find an UnresolvedPatternExpr, return true.
243-
if (isa<UnresolvedPatternExpr>(E)) {
244-
HadUnresolvedPattern = true;
245-
return Action::SkipChildren(E);
246-
}
247-
248-
return Action::Continue(E);
249-
}
250-
251-
static bool hasAny(Expr *E) {
252-
bool HasUnresolvedPattern = false;
253-
E->walk(UnresolvedPatternFinder(HasUnresolvedPattern));
254-
return HasUnresolvedPattern;
255-
}
256-
};
257-
} // end anonymous namespace
258-
259228
namespace {
260-
261229
class ResolvePattern : public ASTVisitor<ResolvePattern,
262230
/*ExprRetTy=*/Pattern*,
263231
/*StmtRetTy=*/void,
@@ -652,7 +620,6 @@ class ResolvePattern : public ASTVisitor<ResolvePattern,
652620

653621
} // end anonymous namespace
654622

655-
656623
/// Perform top-down syntactic disambiguation of a pattern. Where ambiguous
657624
/// expr/pattern productions occur (tuples, function calls, etc.), favor the
658625
/// pattern interpretation if it forms a valid pattern; otherwise, leave it as

0 commit comments

Comments
 (0)