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 {
295
295
}
296
296
297
297
bool LangOptions::FeatureState::isEnabled () const {
298
- return this ->state != FeatureState::Kind::Off ;
298
+ return this ->state == FeatureState::Kind::Enabled ;
299
299
}
300
300
301
301
bool LangOptions::FeatureState::isEnabledForAdoption () const {
Original file line number Diff line number Diff line change @@ -6411,8 +6411,10 @@ class ExistentialTypeSyntaxChecker : public ASTWalker {
6411
6411
return false ;
6412
6412
}
6413
6413
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 ()) {
6416
6418
return true ;
6417
6419
}
6418
6420
You can’t perform that action at this time.
0 commit comments