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 Feb 24, 2025
1 parent 17e4666 commit c25931e
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 @@ -204,6 +204,7 @@ LANGUAGE_FEATURE(IsolatedAny2, 431, "@isolated(any) function types")
LANGUAGE_FEATURE(ObjCImplementation, 436, "@objc @implementation extensions")
LANGUAGE_FEATURE(NonescapableTypes, 446, "Nonescapable types")
LANGUAGE_FEATURE(BuiltinEmplaceTypedThrows, 0, "Builtin.emplace typed throws")
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 @@ -328,6 +328,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 c25931e

Please sign in to comment.