Skip to content

Commit 48a063e

Browse files
committed
[FixCode] Follow-up for b4a2b53, ignore another diagnostic fixit that is messing with argument labels.
1 parent 6c4acf2 commit 48a063e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ class JSONFixitWriter : public DiagnosticConsumer {
560560
// The following interact badly with the swift migrator, they are undoing
561561
// migration of arguments to preserve the no-label for first argument.
562562
if (Info.ID == diag::witness_argument_name_mismatch.ID ||
563-
Info.ID == diag::missing_argument_labels.ID)
563+
Info.ID == diag::missing_argument_labels.ID ||
564+
Info.ID == diag::override_argument_name_mismatch.ID)
564565
return false;
565566

566567
if (Kind == DiagnosticKind::Error)

test/FixCode/fixits-apply.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,8 @@ class Test2 : SomeProt {
8686
func instMeth(p: Int) {}
8787
func instMeth2(p: Int, p2: Int) {}
8888
}
89+
class SubTest2 : Test2 {
90+
override func instMeth(_ p: Int) {}
91+
}
8992
Test2().instMeth(0)
9093
Test2().instMeth2(0, p2:1)

test/FixCode/fixits-apply.swift.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,8 @@ class Test2 : SomeProt {
8989
func instMeth(p: Int) {}
9090
func instMeth2(p: Int, p2: Int) {}
9191
}
92+
class SubTest2 : Test2 {
93+
override func instMeth(_ p: Int) {}
94+
}
9295
Test2().instMeth(0)
9396
Test2().instMeth2(0, p2:1)

0 commit comments

Comments
 (0)