<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Source manager line numbering ignores form feed character 0x0c"
   href="https://llvm.org/bugs/show_bug.cgi?id=27716">27716</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Source manager line numbering ignores form feed character 0x0c
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>libclang
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>peter.elmers@yahoo.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>klimek@google.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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, <a href="http://unicode.org/reports/tr14/#BK">http://unicode.org/reports/tr14/#BK</a>, that defines the
behavior.

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

For example, see the bug filed at
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1224516">https://bugzilla.mozilla.org/show_bug.cgi?id=1224516</a>.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>