mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Completion] Only provide macro completions when they are valid
Only return macros that are valid in their current position, ie. an attached macro is not valid on a nominal. Also return freestanding expression macros in code block item position and handle the new freestanding code item macros. Resolves rdar://105563583.
This commit is contained in:
@@ -13,7 +13,6 @@ func test() {
|
||||
// RUN: %FileCheck -check-prefix=NAME_UNSORTED %s < %t.orig.off
|
||||
// RUN: not %diff -u %t.orig %t.orig.off
|
||||
|
||||
// NAME_SORTED: key.name: "column"
|
||||
// NAME_SORTED: key.name: "foo(a:)"
|
||||
// NAME_SORTED-NOT: key.name:
|
||||
// NAME_SORTED: key.name: "foo(a:)"
|
||||
@@ -46,7 +45,6 @@ func test() {
|
||||
// CONTEXT: key.name: "foo(b:)"
|
||||
// CONTEXT-NOT: key.name:
|
||||
// CONTEXT: key.name: "test()"
|
||||
// CONTEXT: key.name: "column"
|
||||
// CONTEXT: key.name: "complete_sort_order"
|
||||
|
||||
// RUN: %complete-test -tok=STMT_0 %s | %FileCheck %s -check-prefix=STMT
|
||||
@@ -242,7 +240,3 @@ func test8() {
|
||||
// CALLARG: String
|
||||
// CALLARG: intVal
|
||||
}
|
||||
|
||||
// REQUIRES: swift_swift_parser
|
||||
// FIXME: Swift parser is not enabled on Linux CI yet.
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
Reference in New Issue
Block a user