@@ -3103,9 +3103,19 @@ void CompletionLookup::getAttributeDeclCompletions(bool IsInSil,
31033103}
31043104
31053105void CompletionLookup::getAttributeDeclParamCompletions (
3106- CustomSyntaxAttributeKind AttrKind, int ParamIndex, bool HasLabel) {
3106+ ParameterizedDeclAttributeKind AttrKind, int ParamIndex, bool HasLabel) {
31073107 switch (AttrKind) {
3108- case CustomSyntaxAttributeKind::Available:
3108+ case ParameterizedDeclAttributeKind::Unowned:
3109+ addDeclAttrParamKeyword (" safe" , /* Parameters=*/ {}, " " , false );
3110+ addDeclAttrParamKeyword (" unsafe" , /* Parameters=*/ {}, " " , false );
3111+ break ;
3112+ case ParameterizedDeclAttributeKind::Nonisolated:
3113+ addDeclAttrParamKeyword (" unsafe" , /* Parameters=*/ {}, " " , false );
3114+ break ;
3115+ case ParameterizedDeclAttributeKind::AccessControl:
3116+ addDeclAttrParamKeyword (" set" , /* Parameters=*/ {}, " " , false );
3117+ break ;
3118+ case ParameterizedDeclAttributeKind::Available:
31093119 if (ParamIndex == 0 ) {
31103120 addDeclAttrParamKeyword (" *" , /* Parameters=*/ {}, " Platform" , false );
31113121
@@ -3126,15 +3136,15 @@ void CompletionLookup::getAttributeDeclParamCompletions(
31263136 " Specify version number" , true );
31273137 }
31283138 break ;
3129- case CustomSyntaxAttributeKind ::FreestandingMacro:
3130- case CustomSyntaxAttributeKind ::AttachedMacro:
3139+ case ParameterizedDeclAttributeKind ::FreestandingMacro:
3140+ case ParameterizedDeclAttributeKind ::AttachedMacro:
31313141 switch (ParamIndex) {
31323142 case 0 :
31333143 for (auto role : getAllMacroRoles ()) {
31343144 bool isRoleSupported = isMacroSupported (role, Ctx);
3135- if (AttrKind == CustomSyntaxAttributeKind ::FreestandingMacro) {
3145+ if (AttrKind == ParameterizedDeclAttributeKind ::FreestandingMacro) {
31363146 isRoleSupported &= isFreestandingMacro (role);
3137- } else if (AttrKind == CustomSyntaxAttributeKind ::AttachedMacro) {
3147+ } else if (AttrKind == ParameterizedDeclAttributeKind ::AttachedMacro) {
31383148 isRoleSupported &= isAttachedMacro (role);
31393149 }
31403150 if (isRoleSupported) {
@@ -3162,7 +3172,7 @@ void CompletionLookup::getAttributeDeclParamCompletions(
31623172 break ;
31633173 }
31643174 break ;
3165- case CustomSyntaxAttributeKind ::StorageRestrictions: {
3175+ case ParameterizedDeclAttributeKind ::StorageRestrictions: {
31663176 bool suggestInitializesLabel = false ;
31673177 bool suggestAccessesLabel = false ;
31683178 bool suggestArgument = false ;
@@ -3296,7 +3306,7 @@ void CompletionLookup::getPrecedenceGroupCompletions(
32963306void CompletionLookup::getPoundAvailablePlatformCompletions () {
32973307
32983308 // The platform names should be identical to those in @available.
3299- getAttributeDeclParamCompletions (CustomSyntaxAttributeKind ::Available, 0 ,
3309+ getAttributeDeclParamCompletions (ParameterizedDeclAttributeKind ::Available, 0 ,
33003310 /* HasLabel=*/ false );
33013311}
33023312
0 commit comments