Skip to content

Commit d5d48f3

Browse files
committed
[FixCode] Apply @* is now an attribute on a parameter type fixits
1 parent 338f402 commit d5d48f3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,15 @@ class JSONFixitWriter : public DiagnosticConsumer {
583583

584584
if (Kind == DiagnosticKind::Error)
585585
return true;
586+
587+
// Fixits from warnings/notes that should be applied.
586588
if (Info.ID == diag::forced_downcast_coercion.ID ||
587589
Info.ID == diag::forced_downcast_noop.ID ||
588590
Info.ID == diag::variable_never_mutated.ID ||
589591
Info.ID == diag::function_type_no_parens.ID ||
590592
Info.ID == diag::convert_let_to_var.ID ||
591-
Info.ID == diag::parameter_extraneous_double_up.ID)
593+
Info.ID == diag::parameter_extraneous_double_up.ID ||
594+
Info.ID == diag::attr_decl_attr_now_on_type.ID)
592595
return true;
593596
return false;
594597
}

test/FixCode/fixits-apply.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,5 @@ protocol NonObjCProtocol {}
195195
}
196196

197197
@IBDesignable extension SomeProt {}
198+
199+
func attrNowOnType(@noescape foo: ()->()) {}

test/FixCode/fixits-apply.swift.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,5 @@ protocol NonObjCProtocol {}
198198
}
199199

200200
@IBDesignable extension SomeProt {}
201+
202+
func attrNowOnType(foo: @noescape ()->()) {}

0 commit comments

Comments
 (0)