[llvm-bugs] [Bug 27716] New: Source manager line numbering ignores form feed character 0x0c

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 11 12:09:18 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27716

            Bug ID: 27716
           Summary: Source manager line numbering ignores form feed
                    character 0x0c
           Product: clang
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: unassignedclangbugs at nondot.org
          Reporter: peter.elmers at yahoo.com
                CC: klimek at google.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

DXR (cross ref tool) uses libclang to emit locations (line + col) for symbols
in a file. When the file has any form feed character then the line given by
clang SourceManager is incorrect because it does not consider form feed a line
break.

Note the unicode spec, http://unicode.org/reports/tr14/#BK, that defines the
behavior.

>From some initial inspection I think the issue is in
http://clang.llvm.org/doxygen/SourceManager_8cpp_source.html#l01200, which only
considers \r and \n.

For example, see the bug filed at
https://bugzilla.mozilla.org/show_bug.cgi?id=1224516.

-- 
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/20160511/c44e4928/attachment.html>


More information about the llvm-bugs mailing list