Skip to content

Commit

Permalink
[SourceKitStressTester] Ignore ifconfig regions when producing expect…
Browse files Browse the repository at this point in the history
…ed code completion results as they may be inactive
  • Loading branch information
Nathan Hawes committed Nov 14, 2019
1 parent 225cbd4 commit 575c650
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ private struct ActionToken {
// FIXME: test dollar identifiers once code completion reports them
if case .dollarIdentifier = token.tokenKind { return nil }

// FIXME: completely ignore ifconfig clauses (conditions and code blocks)
if token.ancestors.contains(where: { $0.is(IfConfigClauseListSyntax.self) }) { return nil }

guard let parent = token.parent else { return nil }

// Report argument label completions for any arguments other than the first
Expand Down

0 comments on commit 575c650

Please sign in to comment.