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

Clang: No "Remove constant" for OR

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • Qt Creator 4.4.0-beta1
    • C/C++/Obj-C++ Support
    • Ubuntu 16.10 64 bit

    Description

      1. Run Creator with enabled Clang Code Model.
      2. Have a simple conditional in your code:
        if (1 || 0)
            return;
        
      3. Move the cursor into the condition and ask for quick fixes using Alt+Enter.
        There is no quick fix for removing the constant.

      When the if-statement uses the AND-operator (&&), there is a quick fix for removing a constant. This should be available for the OR-operator, too.

      Attachments

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

        Activity

          People

            kosjar Nikolai Kosjar
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes