Implement @_downgrade_exhaustivity_check

Dispatch requests the ability to add a new case, but to treat missing
instances of that case in patterns as warnings instead of errors.  It is
still an error to make reference to the annotated case in at least one
pattern then not cover the rest of the space, but it is not an error
to omit the space of patterns referencing the case entirely.

This attribute is private and uglified to intentionally discourage
its use outside just this one use case.
This commit is contained in:
Robert Widmann
2017-05-25 09:13:08 -07:00
parent 55e4b04505
commit 4f35068772
11 changed files with 352 additions and 61 deletions

View File

@@ -729,6 +729,7 @@ std::vector<UIdent> SwiftLangSupport::UIDsFromDeclAttributes(const DeclAttribute
// Ignore these.
case DAK_ShowInInterface:
case DAK_RawDocComment:
case DAK_DowngradeExhaustivityCheck:
continue;
default:
break;