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

Autoindent parser fails to correctly indent c++14 code.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • Qt Creator 4.12.0
    • C/C++/Obj-C++ Support
    • None

    Description

      Tuple unpacking causes erroneous indentation example: 

       

      auto fun()

      { int a; double b; return std::make_tuple(a,b) }

       

      void bar()

      { auto [a, b]= fun();                                 int i;  // should not be indented                                 }

                                      int main(){}

      The parser is weak for lots of valid c++11 and up, but this one is annoying. 

       

       

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              midjji mikael persson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes