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

Using subscript operator breaks indentation of next line

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 10.0.0-beta1
    • Qt Creator 3.2.1, Qt Creator 3.2.2, Qt Creator 3.3.0
    • C/C++/Obj-C++ Support
    • None

      Following indentation

      std::vector v1(5);
      std::cout << v1[0] << " "
                         << " " << v1[1];
      

      should be

      std::vector v1(5);
      std::cout << v1[0] << " "
                << " " << v1[1];
      

      .

      This is only one example. Using subscript operator when passing argument to function/constructor would also produce wrong indentation on next line.

      I.e.

      foo(a, b,
          c);
      foo(a, arr[0],
             b, arr[1]);
      

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

            kandeler Christian Kandeler
            sasavilic Sasa Vilic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes