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

Regression: macro expansion in editor not working properly, says "expected a declaration"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • Qt Creator 3.0.0, Qt Creator 3.1.0-beta
    • C/C++/Obj-C++ Support
    • None
    • Linux 32bit

    Description

      In my project I use a lot of macros and I praised QtCreator in handling it quite well. But when I upgraded QtCreator from version 2.8.1 to 3.0.0, I found a regression. The code is quite long, so here is the link to it:
      Macro definition: https://github.com/xbrukner/kontr-tests/blob/9b8e1d49286faea67082799d5f7a52ae9f3fd004/macros-types.h#L9
      (It defines a class with a lot of using declarations, a function and ends with a method of defined class, which is followed by definition from user.)

      Then when I write

      MASTER_TEST(name) {
         name("name.pl");
      }
      

      the line with name(); is underlined in red and on mouseover it says "expected a declaration". In QtCreator 2.8.1 it is handled properly.

      Attachments

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              tomas.brukner Tomas Brukner
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes