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

Bad auto indent after structured binding

    XMLWordPrintable

Details

    • f99094a0b8 (qt-creator/qt-creator/7.0) f99094a0b8 (qt-creator/qt-creator/master) f99094a0b8 (qt-creator/qt-creator/qds-3.3)

    Description

      After assigning variables with structured binding inserting a newline results in two extra indent levels (I'm guessing because of lambda-related reasons).

      Example:

      #include <tuple>
      
      extern std::tuple<int, char> tuple_func();
      
      void function()
      {
      	auto [a, b] = tuple_func();
      			// Next line starts here
      	// Should have started here, works with clang-format
      }
      

      Attachments

        Activity

          People

            kandeler Christian Kandeler
            gpery G Pery
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: