Skip to content

Commit 60e4985

Browse files
committed
[Migrator] Set language version to 4 for the fix-it passes
When running the fix-it passes, we should explicitly set the effective language version to 4, since passing language version 3 may be the default at first. rdar://problem/31854159
1 parent 62b6b3b commit 60e4985

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Migrator/Migrator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Migrator::performAFixItMigration() {
9696
CompilerInvocation Invocation { StartInvocation };
9797
Invocation.clearInputs();
9898
Invocation.addInputBuffer(InputBuffer.get());
99+
Invocation.getLangOptions().EffectiveLanguageVersion = { 4, 0, 0 };
99100

100101
CompilerInstance Instance;
101102
if (Instance.setup(Invocation)) {

0 commit comments

Comments
 (0)