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

Auto-indent works incorrectly with C++11 list initialization

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.1.0
    • Fix Version/s: None
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None

      Description

      See the code snippet:

      static void f()
      {
      	struct A {int x;};
      	QList<A> list;
      	list << A{1 << 1};
      	list << A{2};
      }
      

      Auto-indent makes it as

      static void f()
      {
      	struct A {int x;};
      	QList<A> list;
      	list << A{1 << 1};
      			list << A{2};
      }
      

        Attachments

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

          Activity

            People

            • Assignee:
              kosjar Nikolai Kosjar
              Reporter:
              hellclown Dmitry Yelizarov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes