@@ -36,7 +36,7 @@ using namespace swift;
3636LangOptions::LangOptions () {
3737 // Add all promoted language features
3838#define LANGUAGE_FEATURE (FeatureName, SENumber, Description ) \
39- this -> enableFeature (Feature::FeatureName);
39+ enableFeature (Feature::FeatureName);
4040#define UPCOMING_FEATURE (FeatureName, SENumber, Version )
4141#define EXPERIMENTAL_FEATURE (FeatureName, AvailableInProd )
4242#define OPTIONAL_LANGUAGE_FEATURE (FeatureName, SENumber, Description )
@@ -45,16 +45,16 @@ LangOptions::LangOptions() {
4545 // Special case: remove macro support if the compiler wasn't built with a
4646 // host Swift.
4747#if !SWIFT_BUILD_SWIFT_SYNTAX
48- this -> disableFeature (Feature::Macros);
49- this -> disableFeature (Feature::FreestandingExpressionMacros);
50- this -> disableFeature (Feature::AttachedMacros);
51- this -> disableFeature (Feature::ExtensionMacros);
48+ disableFeature (Feature::Macros);
49+ disableFeature (Feature::FreestandingExpressionMacros);
50+ disableFeature (Feature::AttachedMacros);
51+ disableFeature (Feature::ExtensionMacros);
5252#endif
5353
5454 // Note: Introduce default-on language options here.
55- this -> enableFeature (Feature::NoncopyableGenerics);
56- this -> enableFeature (Feature::BorrowingSwitch);
57- this -> enableFeature (Feature::MoveOnlyPartialConsumption);
55+ enableFeature (Feature::NoncopyableGenerics);
56+ enableFeature (Feature::BorrowingSwitch);
57+ enableFeature (Feature::MoveOnlyPartialConsumption);
5858
5959 // Enable any playground options that are enabled by default.
6060#define PLAYGROUND_OPTION (OptionName, Description, DefaultOn, HighPerfOn ) \
@@ -295,14 +295,14 @@ bool LangOptions::isCustomConditionalCompilationFlagSet(StringRef Name) const {
295295}
296296
297297bool LangOptions::FeatureState::isEnabled () const {
298- return this -> state == FeatureState::Kind::Enabled;
298+ return state == FeatureState::Kind::Enabled;
299299}
300300
301301bool LangOptions::FeatureState::isEnabledForAdoption () const {
302- ASSERT (isFeatureAdoptable (this -> feature ) &&
302+ ASSERT (isFeatureAdoptable (feature) &&
303303 " You forgot to make the feature adoptable!" );
304304
305- return this -> state == FeatureState::Kind::EnabledForAdoption;
305+ return state == FeatureState::Kind::EnabledForAdoption;
306306}
307307
308308LangOptions::FeatureStateStorage::FeatureStateStorage ()
@@ -312,23 +312,23 @@ void LangOptions::FeatureStateStorage::setState(Feature feature,
312312 FeatureState::Kind state) {
313313 auto index = size_t (feature);
314314
315- this -> states [index] = state;
315+ states[index] = state;
316316}
317317
318318LangOptions::FeatureState
319319LangOptions::FeatureStateStorage::getState (Feature feature) const {
320320 auto index = size_t (feature);
321321
322- return FeatureState (feature, this -> states [index]);
322+ return FeatureState (feature, states[index]);
323323}
324324
325325LangOptions::FeatureState LangOptions::getFeatureState (Feature feature) const {
326- auto state = this -> featureStates .getState (feature);
326+ auto state = featureStates.getState (feature);
327327 if (state.isEnabled ())
328328 return state;
329329
330330 if (auto version = getFeatureLanguageVersion (feature)) {
331- if (this -> isSwiftVersionAtLeast (*version)) {
331+ if (isSwiftVersionAtLeast (*version)) {
332332 return FeatureState (feature, FeatureState::Kind::Enabled);
333333 }
334334 }
@@ -337,7 +337,7 @@ LangOptions::FeatureState LangOptions::getFeatureState(Feature feature) const {
337337}
338338
339339bool LangOptions::hasFeature (Feature feature) const {
340- if (this -> featureStates .getState (feature).isEnabled ())
340+ if (featureStates.getState (feature).isEnabled ())
341341 return true ;
342342
343343 if (auto version = getFeatureLanguageVersion (feature))
@@ -361,15 +361,14 @@ bool LangOptions::hasFeature(llvm::StringRef featureName) const {
361361void LangOptions::enableFeature (Feature feature, bool forAdoption) {
362362 if (forAdoption) {
363363 ASSERT (isFeatureAdoptable (feature));
364- this ->featureStates .setState (feature,
365- FeatureState::Kind::EnabledForAdoption);
364+ featureStates.setState (feature, FeatureState::Kind::EnabledForAdoption);
366365 } else {
367- this -> featureStates .setState (feature, FeatureState::Kind::Enabled);
366+ featureStates.setState (feature, FeatureState::Kind::Enabled);
368367 }
369368}
370369
371370void LangOptions::disableFeature (Feature feature) {
372- this -> featureStates .setState (feature, FeatureState::Kind::Off);
371+ featureStates.setState (feature, FeatureState::Kind::Off);
373372}
374373
375374void LangOptions::setHasAtomicBitWidth (llvm::Triple triple) {
0 commit comments