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

QtC misindents multi-line static_assert()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 17.0.0
    • Qt Creator 14.0.2, Qt Creator 16.0.0
    • C/C++/Obj-C++ Support
    • None
    • 0142ff8d5 (master)

      Given the following snippet:

      template <typename T>
      void foo() {
          static_assert(sizeof(T) > 0, "incomplete type");
      }
      

      When: placing the cursor after the , and hitting return

      Then: the following line is indented 8 SP w.r..t to the static_assert:

      Not even CTRL-I will change that.

      Expected: indented to one after the opening ( of the static_assert:

      Rationale: If it looks like a function, it should be formatted like a function. If I change static_assert to a function, it indents as expected:

        For Gerrit Dashboard: QTCREATORBUG-32667
        # Subject Branch Project Status CR V

            kandeler Christian Kandeler
            mmutz Marc Mutz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes