Skip to content

Commit

Permalink
Add RawIdentifiers as a language feature.
Browse files Browse the repository at this point in the history
This lets clients test `#if hasFeature(RawIdentifiers)` to
determine compiler support.
  • Loading branch information
allevato committed Jan 8, 2025
1 parent 88364f1 commit f5ee709
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/swift/Basic/Features.def
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ CONDITIONALLY_SUPPRESSIBLE_LANGUAGE_FEATURE(IsolatedAny, 431, "@isolated(any) fu
LANGUAGE_FEATURE(IsolatedAny2, 431, "@isolated(any) function types")
LANGUAGE_FEATURE(ObjCImplementation, 436, "@objc @implementation extensions")
LANGUAGE_FEATURE(NonescapableTypes, 446, "Nonescapable types")
LANGUAGE_FEATURE(RawIdentifiers, 451, "Raw identifiers")

// Swift 6
UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
Expand Down
1 change: 1 addition & 0 deletions lib/AST/FeatureSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ UNINTERESTING_FEATURE(DebugDescriptionMacro)
UNINTERESTING_FEATURE(ReinitializeConsumeInMultiBlockDefer)
UNINTERESTING_FEATURE(SE427NoInferenceOnExtension)
UNINTERESTING_FEATURE(TrailingComma)
UNINTERESTING_FEATURE(RawIdentifiers)

static bool usesFeatureAllowUnsafeAttribute(Decl *decl) {
return decl->getAttrs().hasAttribute<UnsafeAttr>();
Expand Down

0 comments on commit f5ee709

Please sign in to comment.