File tree Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Expand file tree Collapse file tree 1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -356,24 +356,12 @@ static bool usesFeatureExtensionMacroAttr(Decl *decl) {
356356
357357static bool usesFeatureTypedThrows (Decl *decl) {
358358 if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
359- struct Walker : public TypeWalker {
360- bool hasTypedThrows = false ;
361-
362- Action walkToTypePre (Type ty) override {
363- if (auto funcType = ty->getAs <AnyFunctionType>()) {
364- if (funcType->hasThrownError ()) {
365- hasTypedThrows = true ;
366- return Action::Stop;
367- }
368- }
369-
370- return Action::Continue;
371- }
372- };
359+ return usesTypeMatching (decl, [](Type ty) {
360+ if (auto funcType = ty->getAs <AnyFunctionType>())
361+ return funcType->hasThrownError ();
373362
374- Walker walker;
375- func->getInterfaceType ().walk (walker);
376- return walker.hasTypedThrows ;
363+ return false ;
364+ });
377365 }
378366
379367 return false ;
You can’t perform that action at this time.
0 commit comments