File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
SourceKitStressTester/Sources/StressTester Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,31 @@ private struct ActionToken {
529529 }
530530 }
531531
532+ // Avoid matching for underscored attributes since we hide completions for
533+ // those.
534+ do {
535+ var parent = parent
536+ if let label = parent. as ( LabeledExprSyntax . self) ,
537+ let labelParent = label. parent, label. label == token {
538+ parent = labelParent
539+ } else if let nextParent = parent. parent {
540+ parent = nextParent
541+ if let label = parent. as ( LabeledExprSyntax . self) ,
542+ let labelParent = label. parent {
543+ parent = labelParent
544+ }
545+ }
546+ if let exprList = parent. as ( LabeledExprListSyntax . self) ,
547+ let listParent = exprList. parent {
548+ parent = listParent
549+ }
550+ if let attr = parent. as ( AttributeSyntax . self) ,
551+ let ident = attr. attributeName. as ( IdentifierTypeSyntax . self) ,
552+ ident. name. text. hasPrefix ( " _ " ) {
553+ return nil
554+ }
555+ }
556+
532557 let result = expectedResultImpl ( for: token, parent: parent)
533558
534559 // If the argument labels are passing along `file` and `line` arguments,
You can’t perform that action at this time.
0 commit comments