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

Switch with previous parameter: Wrong char count with macros

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • Qt Creator 2.5.0-beta
    • C/C++/Obj-C++ Support
    • None

    Description

      #define BAZ 12345
      int foo(int bar, int baz = BAZ);

      Try to replace baz with previous parameter. This results in:

      int foo(int baz = BAZ);, int bar

      It looks like the character count is based on the macro expansion.

      I found this out with a more common example:

      int foo(Foo *bar = NULL, Foo *baz = NULL);

      NULL is defined to be __null, that breaks it...

      Attachments

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

        Activity

          People

            erikv Erik Verbruggen
            orgads Orgad Shaneh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes