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

Autocompletion of nested structs/unions omits several fields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • Qt Creator 2.8.0, Qt Creator 3.0.0
    • C/C++/Obj-C++ Support
    • None

    Description

      Given a type as follows:

      typedef union
      {
          int W;
          struct
          {
              short S1;
              short S2;
          };
      } Test;
      

      Creating a variable and accessing the fields as follows

      Test t;
      t.
      

      autocomplete only shows the entry W, even though typing S1 or S2 is valid code. See also screenshot.

      Types like these are very common in the supporting codebase of microcontrollers (in my case, ARM Cortex-M3) so changing the inner struct to something with a name is not desireable. See also the screenshot attached.

      Attachments

        Issue Links

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

          Activity

            People

              kosjar Nikolai Kosjar
              derjan Jan Dohl
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes