File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed
test/SourceKit/Refactoring Expand file tree Collapse file tree 5 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -350,9 +350,7 @@ bool ide::initCompilerInvocation(
350
350
FrontendOpts.IndexStorePath .clear ();
351
351
ImporterOpts.IndexStorePath .clear ();
352
352
353
- // Force the action type to be -typecheck. This affects importing the
354
- // SwiftONoneSupport module.
355
- FrontendOpts.RequestedAction = FrontendOptions::ActionType::Typecheck;
353
+ FrontendOpts.RequestedAction = Action;
356
354
357
355
// We don't care about LLVMArgs
358
356
FrontendOpts.LLVMArgs .clear ();
Original file line number Diff line number Diff line change 1
1
source.edit.kind.active:
2
2
8:9-8:10 source.refactoring.range.kind.basename
3
- source.edit.kind.active :
3
+ source.edit.kind.inactive :
4
4
10:16-10:17 source.refactoring.range.kind.basename
5
5
source.edit.kind.inactive:
6
6
12:16-12:17 source.refactoring.range.kind.basename
Original file line number Diff line number Diff line change @@ -118,8 +118,15 @@ struct Foo {
118
118
}
119
119
120
120
// RUN: %empty-directory(%t.result)
121
+
122
+ // Ensure that a syntactic rename request does not require the stdlib
123
+ // RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/empty.json %s -- -resource-dir /no/stdlib/here
124
+
121
125
// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/x.in.json %s >> %t.result/x.expected
122
126
// RUN: %diff -u %S/syntactic-rename/x.expected %t.result/x.expected
127
+
128
+ // Note: Even though the #if is true, it is not evaluated since we only parse.
129
+ // Thus, both the #if and #else are inactive
123
130
// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/z.in.json %s >> %t.result/z.expected
124
131
// RUN: %diff -u %S/syntactic-rename/z.expected %t.result/z.expected
125
132
// RUN: %sourcekitd-test -req=syntactic-rename -rename-spec %S/syntactic-rename/foo.in.json %s >> %t.result/foo_arity1.expected
Original file line number Diff line number Diff line change
1
+ []
Original file line number Diff line number Diff line change 1
1
source.edit.kind.active:
2
2
8:9-8:10 "foo"
3
- source.edit.kind.active :
3
+ source.edit.kind.inactive :
4
4
10:16-10:17 "foo"
5
5
source.edit.kind.inactive:
6
6
12:16-12:17 "foo"
You can’t perform that action at this time.
0 commit comments