Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21408

`offset` argument of the `clang-format` utility expects bytes, but code-points are passed

    XMLWordPrintable

Details

    Description

      Clang-format utility expects bytes asĀ `offset` argument. But seems like Qt-creator passed code-points instead of them.

      Affected commands:

      • ClangFormat->FormatAtCursor
      • TextEditor->AutoIndentSelection (because, since version 4.8.0, Qt Creator starts using clang-format based indentation)

      Does not affected commands:

      • ClangFormat->FormatFile (because respective clang-format call doesn't have offset argument)

      UPDATE:
      the problem still appears. Snapshot: qtcreator-4.8.0-beta2_2595 (revision e6eb0bc032)

      UPDATE 2:

      actions to reproduce this issue has been added in the comments below

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            semenpiskarev semenpiskarev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes