mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[FixCode] Don't accept fixit that inserts commas; they break placeholders
These fixits interact poorly with code that has <#editor placeholder#>s in it, inserting commas inside the placeholder. rdar://problem/26623964
This commit is contained in:
@@ -555,7 +555,8 @@ private:
|
||||
return true;
|
||||
|
||||
// Do not add a semi as it is wrong in most cases during migration
|
||||
if (Info.ID == diag::statement_same_line_without_semi.ID)
|
||||
if (Info.ID == diag::statement_same_line_without_semi.ID ||
|
||||
Info.ID == diag::expected_separator.ID)
|
||||
return false;
|
||||
// The following interact badly with the swift migrator, they are undoing
|
||||
// migration of arguments to preserve the no-label for first argument.
|
||||
|
||||
Reference in New Issue
Block a user