@@ -225,39 +225,7 @@ struct ExprToDeclRefTypeRepr : public ASTVisitor<ExprToDeclRefTypeRepr, bool> {
225
225
};
226
226
} // end anonymous namespace
227
227
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
-
259
228
namespace {
260
-
261
229
class ResolvePattern : public ASTVisitor <ResolvePattern,
262
230
/* ExprRetTy=*/ Pattern*,
263
231
/* StmtRetTy=*/ void ,
@@ -652,7 +620,6 @@ class ResolvePattern : public ASTVisitor<ResolvePattern,
652
620
653
621
} // end anonymous namespace
654
622
655
-
656
623
// / Perform top-down syntactic disambiguation of a pattern. Where ambiguous
657
624
// / expr/pattern productions occur (tuples, function calls, etc.), favor the
658
625
// / pattern interpretation if it forms a valid pattern; otherwise, leave it as
0 commit comments