[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:
Ben Langmuir
2016-06-03 10:34:42 -07:00
parent ee85891d11
commit 73f09176e1
3 changed files with 14 additions and 1 deletions

View File

@@ -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.