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

QuickFix "Swap Operands" breaks code when an operand contains a macro

    XMLWordPrintable

Details

    • 9bdf8329a (master)

    Description

      When you use the "Swap Operands" QuickFix with an operand, that contains a macro it moves the first operand out of the if statement.
      If the macro is on the left side of the expression the "Swap Operands" QuickFix isn't even available.

      Before activating the QuickFix:

      if (false && i != 5) {
      }
      
      if (false && i != TEST) {
      }
      
      #define TEST 5
      if (false && i != TEST) {
      }
      

      After:

      if (i != 5 && false) {
      }
      
      if (i != TEST && false) {
      }
      
      #define TEST 5
      if (i != TEST) {
      }
      	 && false	
      

      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
              mkrems Marcel Krems
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes