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

Inconsistent indenting in try/catch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • Qt Creator 14.0.0
    • Qt Creator 11.0.0, Qt Creator 12.0.2
    • C/C++/Obj-C++ Support
    • None
    • 812326ead (master)

      With clang format disabled the indenting of catch depends on the content of the catch parameters

      void f()
         {
         try
         {
         int i;        // here indenting of block is right
         }
         catch(...)
         {
         int j;        // here indenting of block is right
         }
         catch(ex& e)  // when having a parameter in the catch
         {
            int k;     // indenting of content and
            }          // closing block brace is wrong
         } 

      It looks like catch(ex& e) is partly detected as a function?

        1. qt2.xml
          2 kB
          Michael Möllney
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            moellney Michael Möllney
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes