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

Code model confused by struct type alias in a namespace

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11

      Description

      When there is a using type alias for a struct inside a namespace, the code model gets confused and thinks that subsequent functions are in the namespace named as the alias:

      #include "myclass.h"
      
      namespace ns {
      
      using StructType = struct {
          int a;
          char b;
      };
      
      MyClass::MyClass()
      {
      }
      
      void MyClass::Function()
      {
      }
      
      } //ns
      

      This results in the following model:

      Consequently, this causes the Function() to be unreachable when ctrl+LMB cliked in the header.

      When I remove the using StructType it's ok again.

      Whole project attached.

        Attachments

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

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            mikom Miłosz Kosobucki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes