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

Auto creation of switch case does not work for anonymous enums

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.13.0-beta1
    • Qt Creator 2.5.0, Qt Creator 2.6.0-rc, Qt Creator 2.8.0-beta
    • C/C++/Obj-C++ Support
    • None

    Description

      The quick fix for auto creation of switch case does not work for anonymous enums.

      If we define a variable whose type is an anonymous enum, the quickfix cannot be triggered. For exemple, it does not work in this code:

        enum { A, B, C } toto;
        switch(toto) {
        }
      

      The same thing happens if the enum is not anonymous, but the variable is defined in the same statement:

        enum XXX { A2, B2, C2 } toto2;
      

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-7487
        # Subject Branch Project Status CR V

        Activity

          People

            kandeler Christian Kandeler
            typz Francois Ferrand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes