Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Jordan Rose bbe0175255 Re-apply r160319 "Don't crash when emitting fixits following Unicode chars"
This time, make sure we don't try to print fixits with newline characters,
since they don't have a valid column width, and they don't look good anyway.

PR13417 (and originally <rdar://problem/11877454>)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160561 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 18:50:51 +00:00
Nico Weber 4397289861 Revert r160319, it caused PR13417. Add a test for PR13417.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 06:44:52 +00:00
Jordan Rose b04a45720b Weaken Unicode fixit test to work even if the character is printed escaped.
This should fix the failure on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160324 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 22:18:33 +00:00
Ted Kremenek ee07db7d91 This test appears to fail on win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160322 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 21:43:16 +00:00
Jordan Rose 6f977c3e79 Don't crash when emitting fixits following Unicode characters.
This code is very sensitive to the difference between "columns" as printed
and "bytes" (SourceManager columns). All variables are now named explicitly
and our assumptions are (hopefully) documented as both comment and assertion.

Whether parseable fixits should use byte offsets or Unicode character counts
is pending discussion on the mailing list; currently the implementation uses
bytes (and has no problems on lines containing multibyte characters).
This has been added to the user manual.

<rdar://problem/11877454>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160319 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 20:52:12 +00:00
Benjamin Kramer c7bd9fbecd Be lax about trailing whitespace when checking fixit formatting, this depends on locale settings.
If a non-unicode locale is used, the unicode character is escaped and any
byte that is in the escaped representation but not the semicolon will
become whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160113 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12 08:34:31 +00:00
Benjamin Kramer af082c3b16 PR13312: Don't crash when printing a fixit that ends in a unicode character.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160112 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12 08:20:49 +00:00