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

Broken indentation leak with two explicit ctors and conditional expression

    XMLWordPrintable

Details

    Description

      struct S

      { int x; }

      ;

      S f(int x)
      {
      return S{int{x ? 1 : 0}};
      }

      will break indentation down the code (see screenshot).

      The workaround is to use classic ctor (S()).

      Deleting conditional expression (S{int{x}}) makes the bug disappear.

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            adobriyan A D
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: