[LLVMbugs] [Bug 18405] New: Wrong SourceLocation start/end if non-english letters in the text

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 6 22:14:13 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18405

            Bug ID: 18405
           Summary: Wrong SourceLocation start/end if non-english letters
                    in the text
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dev at antonsmirnov.name
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

clang_tokenize() (via libclang C-API) returns wrong SourceLocation start/end if
there are non-English characters in the UnsavedFile content. It seems that each
character is counter with length 2.

For example:
unsaved file content:
"//йц
1"

tokens:
#1: start=0, end=6, kind=comment
#2: start=7, end=8, kind=literal

The error is that #1 end must be 4 and #2 must be shifted to beginning
(start=5, end=6)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140107/5a3a6e72/attachment.html>


More information about the llvm-bugs mailing list