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

Trailing return type of nested template breaks indentation

    XMLWordPrintable

Details

    • Linux/X11
    • 02f2841a4176d82d025fc25343f3d4eb6754a9e0 (qt-creator/qt-creator/master)

    Description

      Code like this breaks Creator's indentation:

      auto foo() -> std::vector<std::tuple<int, int, int>>

      After pressing enter, the indent is placed way over to the right. The part that seems to be confusing the editor is the ">>", since putting a space in-between prevents it from happening.

       

      Enabling the clang format plugin indeed fixes the issue. However, I had explicitly disabled that plugin because enabling it causes a major slowdown while editing big source files that contain tens of thousands of lines. Pressing enter for example to add a new line takes 5 seconds, which makes that plugin completely unusable as editing code with this kind of delay makes writing code impossible.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            realnc Nikos Chantziaras
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes