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

Find References doesn't work for auto and make_unique

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 5.0.2, Qt Creator 6.0.0-beta2
    • Fix Version/s: Qt Creator 6.0.0-rc1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      f6c974fc1bf20211d7f6cc9c464a0fd00ba79168 (qt-creator/qt-creator/6.0)

      Description

      This is a regression between Qt Creator 4.15.2 and 5.0.0.

      Find references doesn't work on members when auto value initialized with std::make_unique

      #include <memory>
      
      struct MyStruct
      {
          int value = 1;
      };
      
      int main()
      {
          auto myStruct = std::make_unique<MyStruct>();
          return myStruct->value; // find usages doesn't work for "value"
      }
      

      It worked fine on 4.15.2, but is broken on 5.0.0 and 5.0.2

       

        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:
            volodymyr_zibarov Volodymr Zibarov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes