aboutsummaryrefslogtreecommitdiff
path: root/docs/UsersManual.html
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-16 20:52:12 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-16 20:52:12 +0000
commit6f977c3e7918f9a668164f3ce27f1baa9557eb82 (patch)
tree1a45c49bbc08bba0d9bb3858f58ad76976ece0e6 /docs/UsersManual.html
parent980343b9a1d0e85f960fa289c2c9a727004964f2 (diff)
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
Diffstat (limited to 'docs/UsersManual.html')
-rw-r--r--docs/UsersManual.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/UsersManual.html b/docs/UsersManual.html
index 130fcefde0..22d44ceea1 100644
--- a/docs/UsersManual.html
+++ b/docs/UsersManual.html
@@ -229,6 +229,9 @@ print something like:
<p>When this is disabled, Clang will print "test.c:28: warning..." with no
column number.</p>
+
+<p>The printed column numbers count bytes from the beginning of the line; take
+care if your source contains multibyte characters.</p>
</dd>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -395,6 +398,9 @@ exprs.c:47:15:{47:8-47:14}{47:17-47:24}: error: invalid operands to binary expre
</pre>
<p>The {}'s are generated by -fdiagnostics-print-source-range-info.</p>
+
+<p>The printed column numbers count bytes from the beginning of the line; take
+care if your source contains multibyte characters.</p>
</dd>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
@@ -415,6 +421,9 @@ respectively). Both the file name and the insertion string escape backslash (as
&quot;\\&quot;), tabs (as &quot;\t&quot;), newlines (as &quot;\n&quot;), double
quotes(as &quot;\&quot;&quot;) and non-printable characters (as octal
&quot;\xxx&quot;).</p>
+
+<p>The printed column numbers count bytes from the beginning of the line; take
+care if your source contains multibyte characters.</p>
</dd>
<dt id="opt_fno-elide-type">