File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -295,7 +295,7 @@ bool LangOptions::isCustomConditionalCompilationFlagSet(StringRef Name) const {
295295}
296296
297297bool LangOptions::FeatureState::isEnabled () const {
298- return this ->state != FeatureState::Kind::Off ;
298+ return this ->state == FeatureState::Kind::Enabled ;
299299}
300300
301301bool LangOptions::FeatureState::isEnabledForAdoption () const {
Original file line number Diff line number Diff line change @@ -6411,8 +6411,10 @@ class ExistentialTypeSyntaxChecker : public ASTWalker {
64116411 return false ;
64126412 }
64136413
6414- // A missing `any` or `some` is always diagnosed if this feature is enabled.
6415- if (ctx.LangOpts .hasFeature (Feature::ExistentialAny)) {
6414+ // A missing `any` or `some` is always diagnosed if this feature not
6415+ // disabled.
6416+ auto featureState = ctx.LangOpts .getFeatureState (Feature::ExistentialAny);
6417+ if (featureState.isEnabled () || featureState.isEnabledForAdoption ()) {
64166418 return true ;
64176419 }
64186420
You can’t perform that action at this time.
0 commit comments