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

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

XMLWordPrintable

    • 9bdf8329a (master)

      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	
      

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

            kandeler Christian Kandeler
            mkrems Marcel Krems
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes