Skip to content

Commit 3dbfd5c

Browse files
committed
[fixcode] Accept the warning fixit for extraneous duplicate parameter label.
1 parent 852686b commit 3dbfd5c

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,8 @@ class JSONFixitWriter : public DiagnosticConsumer {
567567
return true;
568568
if (Info.ID == diag::forced_downcast_coercion.ID ||
569569
Info.ID == diag::forced_downcast_noop.ID ||
570-
Info.ID == diag::variable_never_mutated.ID)
570+
Info.ID == diag::variable_never_mutated.ID ||
571+
Info.ID == diag::parameter_extraneous_double_up.ID)
571572
return true;
572573
return false;
573574
}

test/FixCode/fixits-apply.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,5 @@ func ftest1() {
6262
// Don't replace the variable name with '_'
6363
let myvar = 0
6464
}
65+
66+
func ftest2(x x: Int) {}

test/FixCode/fixits-apply.swift.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ func ftest1() {
6565
// Don't replace the variable name with '_'
6666
let myvar = 0
6767
}
68+
69+
func ftest2(x: Int) {}

0 commit comments

Comments
 (0)