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

QtC misindents multi-line static_assert()

    XMLWordPrintable

Details

    • 0142ff8d5 (master)

    Description

      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:

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes