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

Incorrect indentation with simple macros

    XMLWordPrintable

Details

    • 2524e2adb (master)

    Description

      In one of my source files, suddenly Creator wants to indent everything by 6 indents (24 spaces). This happens at any location in the source file beyond a certain point.

      I managed to create the following minimal example (which I cannot reduce further):

      #define GGG(ARG) void g() { }
      
      GGG(ARG)
      
      inline int operator >> (int, int) { }
      
      #define FFF void f() {}
      
      FFF
      

      Put this in a .h file, save it, move the cursor right after FFF and press enter. Creator will indent everything by 6 indents.

      Please ignore whether the code makes sense, it's just a minimal example. The actual code compiles fine and uses simple macros with arguments to avoid repetitive typing when interfacing with a C library.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            szhorvat Szabolcs Horvát
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes