mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Add new declaration - using
Initially this declaration is going to be used to determine
per-file default actor isolation i.e. `using @MainActor` and
`using nonisolated` but it could be extended to support other
file-global settings in the future.
(cherry picked from commit aabfebec03)
This commit is contained in:
@@ -2151,6 +2151,7 @@ static bool shouldSerializeMember(Decl *D) {
|
||||
case DeclKind::Extension:
|
||||
case DeclKind::Module:
|
||||
case DeclKind::PrecedenceGroup:
|
||||
case DeclKind::Using:
|
||||
if (D->getASTContext().LangOpts.AllowModuleWithCompilerErrors)
|
||||
return false;
|
||||
llvm_unreachable("decl should never be a member");
|
||||
@@ -5269,6 +5270,10 @@ public:
|
||||
llvm_unreachable("import decls should not be serialized");
|
||||
}
|
||||
|
||||
void visitUsingDecl(const UsingDecl *) {
|
||||
llvm_unreachable("using decls should not be serialized");
|
||||
}
|
||||
|
||||
void visitEnumCaseDecl(const EnumCaseDecl *) {
|
||||
llvm_unreachable("enum case decls should not be serialized");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user